Skip to main content
Setting up OneDrive OAuth App

This article will guide you through how to setup a OneDrive OAuth app on Azure Portal

B
Written by Ben Keeling
Updated over 3 months ago

Step 1: Sign in to Azure Portal

  1. Sign in to the Azure portal.

  2. If it asks if you want a tour select "Maybe Later"
    โ€‹

Step 2: Register a New Application

  1. In the left-hand navigation pane, click on "Microsoft Entra ID." If you cannot see the navigation panel click on the three lines in the top left of the page next to the Microsoft Azure logo.

  2. Click on "App registrations."

  3. Click on "New Registration"

  4. Enter a name for your application, such as "Medialake - OneDrive.

  5. Select the supported account type. Please select the "Accounts in this organisational directory only".

  6. Enter your Redirect URI. This is the URL where users will be redirected after they authenticate with Microsoft and should look something like this, where your domain is followed by the subdirectory: https://YOUR_DOMAIN/onedrive-redirect

  7. Make sure the platform is selected as "web".

  8. Click on the "Register" button.


Step 3: Configure Permissions

  1. Click on "API permissions" on the left hand side navigation panel. This brings you to the API Permissions page. A Microsoft Graph permission for User.Read should already be filled out for you.

  2. Click on "Add a permission."

  3. Select the API you want to access. In this case we will be adding a permission for the Graph API.

  4. Select the Delegated permissions option.

  5. Either type the following permissions in you wish to add, or search for them in the dropdown lists on the page. Please enable by ticking:

Files.Read.All
User.Read

Step 4: Create a Client Secret

  1. Click on "Certificates & secrets" in the navigation bar on the left hand side of the page. If you can't see the navigation bar, you can click the small arrow in the top left of the page

  2. Click on "New client secret."

  3. Enter a description for the secret, such as "Medialake.ai ", select its expiration, and then click "Add." We suggest putting a date as far in the future as possible to avoid repeating this process regularly when the permission expires.

  4. Copy the value of the secret ID. You will need it to enter on the settings page in the medialake.ai website. This secret will not be shown again, so if you do not copy it correctly, you will have to create a new one.


Step 5: Obtain the Application (client) ID and Directory (tenant) ID

  1. Click on "Overview."

  2. Copy the "Application (client) ID" and "Directory (tenant) ID." You will also need to these values along with the client secret to configure OAuth in the Medialake settings.

Did this answer your question?