Populating an Excel table with Power Automate & Microsoft Graph

Populating an Excel table with Power Automate & Microsoft Graph

John PhillipsProduct Updates

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.

New App Registration

Provide an App Name and for Account Type, choose ‘Accounts in this organizational directory only’. Leave the Return URI blank. Then click Register.

App Registration Page

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.

Setting API Permissions 1

Next, click the large Microsoft Graph banner:

Microsoft Graph Permissions

Next, click Application permissions:

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.

Sites Permissions

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:

Grant Admin Consent

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.

Generate App Secret

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.

Copy App Secret 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.

App Overview

We will also need the Tenant ID. This can be obtained from Azure Admin Center via this direct link.

Get Azure Tenant ID

Now we have all the information we need, we are ready to start building our Flow.

Next: Creating the Power Automate Flow