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

Copper 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
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

@jcgonzalezmartin 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.

@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?