Simple browser application that makes requests to the OneDrive API.
- Register your own application on the Microsoft application portal https://apps.dev.microsoft.com.
- Click Add an app.
- Name your application
OneDrive Browser
and click Create application. - Click Save.
- The Application Id displayed in the Properties section will be the value of the
client_id
in the API Builder credential. - You also need to create a
client_secret
and set theclientId
andredirectUri
variables accordingly. - 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. - You need to add OAuth support to your application and add the redirect URI. Under Platforms, click Add Platform.
- Select Web. This will add a Web panel to the Platforms list.
- Check Allow Implicit Flow (your application will be doing an implicit grant).
- Set the Redirect URLs to
http://localhost:8020/callback
. - 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
- Click Ok and if you haven't already done it, save your application.
- Download the source code of this repository.
- Open the folder with Visual Studio Code.
- In order to build the project install node.js.
- Run the
restore
task by pressingCtrl + Shift + B
and chooserestore
. - To build the application run the
build:Debug
task by pressingCtrl + Shift + B
and choosebuild:Debug
. - Run the application by pressing
Ctrl + Shift + B
and chooselaunch:Debug
.