Skip to content

How to create your own application to use with onedrivecmd

David Zhuang edited this page Aug 11, 2017 · 2 revisions

WARNING: For Office 365 users: An Admin MUST EXIST in order to get authorization code!

Since Microsoft's documentations are just...... not made for human beings, you probably want to follow this instruction.

OneDrive Personal

This is quite easy.

  1. Go to https://apps.dev.microsoft.com/ , login.

Onedrive Apps Login

  1. Add an app, make a name and continue.

  1. The "Application Id" is the "client_id_normal" in static.py.

  1. Create a password. This is the "client_secret_normal".

  1. Add web platform.

Set the "redirect_uri" to the URL you like. You can still use https://od.cnbeining.com , or just fork [https://github.com/cnbeining/onedrivecmd/tree/gh-pages](that branch) and make your own URL.

  1. Add Application permissions.

Now you are all set.

Onedrive Business(Office 365)

This is f**king tricky, for I spent a whole day trying to squeeze a way between the documentations, 4 control panels, 4 API endpoints and 3 different SDKs. (One is not even importable!)

  1. Make sure you have one of the following:
  • An MSDN subscription
  • An existing Office 365 subscription
  • Free trial
  • annual developer subscription for $99.00 per year

and you are the admin of the group.

  1. Sign up a Azure account at https://account.windowsazure.com/SignUp . You do not need to have a credit card.

  2. Login to the portal at https://portal.azure.com/ .

  3. Fine Azure AD.

  1. Create an application.

  1. Add an application.

  1. Add some permissions:

  1. Create secret key.

Change the values in static.py .

Now you can login with Office 365 accounts.

Clone this wiki locally