Skip to content

Latest commit

 

History

History
85 lines (47 loc) · 4.89 KB

setting-up-microsoft-developer-program.md

File metadata and controls

85 lines (47 loc) · 4.89 KB

Setting up Microsoft Developer Program

To use and develop this service you will need an Azure application and a user. If you don't have them, this tutorial will guide you through the setup of your Microsoft Developer Program account and the rest of the requirements needed for this service to function.

Setting up your Microsoft Account

Navigate to the Microsoft 365 Developer Program. If you already have a Microsoft account, log in, otherwise create one. Afterwards click the "Join now" button and go through the form to enter the developer program.

Microsoft Developer Program website

Microsoft Developer Program form first part

Microsoft Developer Program form second part

Microsoft Developer Program form third part

Microsoft Developer Program form fourth part Make sure to select the Instant sandbox, as it will contain useful default configuration!

Microsoft Developer Program form fifth part Make sure to remember the password you provide here, as you will need it later to log into the Azure portal.

Microsoft Developer Program form sixth part You will need to provide a valid phone number to finish this process.

After going through the form you should have created a sandbox that allows you to create all the resources needed for this service. Make note of the administrator email address, you will need it to log into the Azure portal.

Microsoft Developer Program with created sandbox

Setting up the Azure application

Navigate to the Azure portal and log in with the admin account you just created. Azure portal login page

Use the search bar to look for "App registrations" and click it. Azure portal search for app registration

You will now create a new app registration that will be used for this service.

Empty Azure app registration overview The form to create an app registration in Azure The overview page of the newly created app registration

Write down the Application (client) ID and the Directory (tenant) ID, they're the values of the environment variables CLIENT_ID and TENANT_ID.

You still need a way for your service to authenticate with Microsoft's infrastructure, for that you will need a "client secret". Go to the Certificates & secrets tab and create a new client secret (the name you give it doesn't really matter).

Client secrets overview with the "New client secret" button hovered

Make sure to store the secret's value, as soon as you leave this page the value gets hidden and you need it for the CLIENT_SECRET environment variable.

The form to create a new client secret

The newly created client secret

Your application still needs the correct permissions for uploading files. Go to the API permissions tab and add a new permission. Empty API permissions overview with the "Add a permission" button hovered

The permission type must be Microsoft Graph Application permission.

The form to add an app permission with the "Microsoft Graph" option hovered

The form to add an app permission with the "Application permission" option hovered

The permission itself is Files.ReadWrite.All.

The form to add an app permission with the "Files.ReadWrite.All" permission selected

After adding the permission you still need to Grant admin consent for the permission.

The API permissions overview with the "Grand admin consent to MSFT" button hovered

You still need to get a user ID. You can use your admin user for this, as the service just needs to be able to upload files to the user's OneDrive root.

To get the ID go to Users in the Azure portal.

The Azure portal search bar with the "Users" result hovered

Get the ID of the user you want to use by clicking on their name.

The overview of users with the admin user hovered

Assign the value of the Object ID field to the USER_ID environment variable.

The detail page of the admin user with its object ID ready to be copied