Table of Contents
Registering a Microsoft Graph application
Step 1 – Register a new App
Before the Graph APIs can be used, an Azure app needs to be registered. Visit the Azure App Registrations page and click the New Registration button.
Provide an App Name and for Account Type, choose ‘Accounts in this organizational directory only’. Leave the Return URI blank. Then click Register.
Step 2 – Setting App Permissions
Now the App has been created, we need to define the App’s permissions. From the left-hand navigation, click API Permissions and then click Add a Permission.
Next, click the large Microsoft Graph banner:
Next, click Application permissions:
Scroll through the list of permissions until you reach Sites and from there, select Sites.Read.All and Sites.ReadWrite.All. As our Excel file will be stored in OneDrive/SharePoint, these permissions will allow our App to access and update our file.
When both have been selected, click the Add Permissions button.
Once these permissions have been added, you’ll be returned to the list of permissions for your new App. You will then need to grant them consent by clicking the Grant admin consent for <your domain> button:
Step 3 – Generating an App Secret
For our Power Automate Flow to authenticate with our App, we need to generate an App Secret. From the Certificates & Secrets page, click the New client secret button. Enter a description and expiry date for the secret and click Add.
When you are returned to the list of Client secrets, you’ll see your newly-added record. Make a note of the long string under Value.
Step 4 – Record App and Tenant details
In order to link the Power Automate Flow that we will be building to our new App, we will need to make a note of some other key information. Return to the App Overview page and copy the Application (client ID) value.
We will also need the Tenant ID. This can be obtained from Azure Admin Center via this direct link.
Now we have all the information we need, we are ready to start building our Flow.
Next: Creating the Power Automate Flow