How to upload file to one drive via application without client id and secret key

%3CLINGO-SUB%20id%3D%22lingo-sub-568749%22%20slang%3D%22en-US%22%3EHow%20to%20upload%20file%20to%20one%20drive%20via%20application%20without%20client%20id%20and%20secret%20key%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-568749%22%20slang%3D%22en-US%22%3E%3CP%20class%3D%22%22%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20seen%20so%20may%20posts%20for%20uploading%20file%20to%20one%20drive.%20But%20If%20we%20look%20at%20the%20steps%2C%20First%20mandatory%20thing%20I%20saw%20is%20to%20create%20App%20in%20one%20drive%20and%20generate%20client%20id%20and%20secret%20key.%20This%20client%20id%20and%20secret%20key%20is%20need%20to%20pass%20as%20a%20part%20of%20authentication%20url.%20Also%20redirect_uri%20is%20also%20need%20to%20specify.%3C%2FP%3E%3CP%3EIf%20we%20manually%20upload%20file%20to%20onedrive%2C%20we%20just%20need%20user%20name%20and%20password%20and%20there%20is%20no%20need%20of%20any%20explicit%20application%20creation.%3C%2FP%3E%3CP%3EMy%20question%20is%2C%20Is%20there%20any%20other%20way%20to%20upload%20file%20to%20onedrive%20without%20creating%20app%20on%20onedrive%3F%20I%20mean%20Just%20by%20using%20authentication%20prompt%20for%20username%20and%20password.%3C%2FP%3E%3CP%3ETIA%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-568749%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-569529%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20upload%20file%20to%20one%20drive%20via%20application%20without%20client%20id%20and%20secret%20key%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-569529%22%20slang%3D%22en-US%22%3EAbsolutely%2C%20you%20can%20ask%20the%20username%20and%20password%20to%20your%20users%20and%20then%20use%20in%20the%20code%20you%20have%20in%20your%20application...you%20can%20find%20many%20PowerShell%20Scripts%20that%20work%20in%20that%20way%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-572403%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20upload%20file%20to%20one%20drive%20via%20application%20without%20client%20id%20and%20secret%20key%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-572403%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%26nbsp%3BThanks%20for%20reply.%20actually%20I%20am%20looking%20for%20some%20python%20script%20or%20c%2B%2B%20code.%20I%20need%20to%20check%20powershell%20script%20as%20I%20haven't%20used%20it%20before.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-572982%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20upload%20file%20to%20one%20drive%20via%20application%20without%20client%20id%20and%20secret%20key%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-572982%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20tried%20with%20powershell%20script%20which%20works%20fine%20for%20others%20but%20I%20am%20getting%20error%20as%3CBR%20%2F%3EException%20calling%20%E2%80%9CExecuteQuery%E2%80%9D%20with%20%E2%80%9C0%E2%80%9D%20argument(s)%3A%20%E2%80%9CThe%20sign-in%20name%20or%20password%20does%20not%20match%20one%20in%20the%20Microsoft%20account%20system.%E2%80%9D%3C%2FP%3E%3CP%3EBut%20the%20account%20do%20exists.%3C%2FP%3E%3CP%3EThe%20account%20is%20working%20if%20I%20login%20through%20webportal.%3C%2FP%3E%3CP%3EAm%20I%20missed%20some%20pre-requisite%20settings%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi,

I have seen so may posts for uploading file to one drive. But If we look at the steps, First mandatory thing I saw is to create App in one drive and generate client id and secret key. This client id and secret key is need to pass as a part of authentication url. Also redirect_uri is also need to specify.

If we manually upload file to onedrive, we just need user name and password and there is no need of any explicit application creation.

My question is, Is there any other way to upload file to onedrive without creating app on onedrive? I mean Just by using authentication prompt for username and password.

TIA

3 Replies
Highlighted
Absolutely, you can ask the username and password to your users and then use in the code you have in your application...you can find many PowerShell Scripts that work in that way
Highlighted

@Juan Carlos González Martín Thanks for reply. actually I am looking for some python script or c++ code. I need to check powershell script as I haven't used it before.

Highlighted

@Juan Carlos González Martín 

I tried with powershell script which works fine for others but I am getting error as
Exception calling “ExecuteQuery” with “0” argument(s): “The sign-in name or password does not match one in the Microsoft account system.”

But the account do exists.

The account is working if I login through webportal.

Am I missed some pre-requisite settings?