Skip to content

martinsutka/onedrive.browser

Repository files navigation

OneDrive Browser

Simple browser application that makes requests to the OneDrive API.

Turn on the Drive API

  1. Register your own application on the Microsoft application portal https://apps.dev.microsoft.com.
  2. Click Add an app.
  3. Name your application OneDrive Browser and click Create application.
  4. Click Save.
  5. The Application Id displayed in the Properties section will be the value of the client_id in the API Builder credential.
  6. You also need to create a client_secretand set the clientId and redirectUri variables accordingly.
  7. Click Generate New Password. The value displayed will be your client_secret, this is the only time it's visible, so make a note of the value and don't lose it. If you lose it, you can repeat this step to generate a new client secret.
  8. You need to add OAuth support to your application and add the redirect URI. Under Platforms, click Add Platform.
  9. Select Web. This will add a Web panel to the Platforms list.
  10. Check Allow Implicit Flow (your application will be doing an implicit grant).
  11. Set the Redirect URLs to http://localhost:8020/callback.
  12. In order to read the users files click Add next to Delegated Permissions. From the list select:
    • Files.Read
    • Files.Read.All
    • User.Read
    • Sites.Read.All
    • offline_access
  13. Click Ok and if you haven't already done it, save your application.

Run the sample

  1. Download the source code of this repository.
  2. Open the folder with Visual Studio Code.
  3. In order to build the project install node.js.
  4. Run the restore task by pressing Ctrl + Shift + B and choose restore.
  5. To build the application run the build:Debug task by pressing Ctrl + Shift + B and choose build:Debug.
  6. Run the application by pressing Ctrl + Shift + B and choose launch:Debug.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published