Skip to content

App Registrations Setup

Sam Betts edited this page Jul 7, 2026 · 5 revisions

App registrations setup

The solution uses two Entra ID app registrations: an installer account to create the Azure resources, and a runtime account to read Microsoft 365 data. Create and configure both before running the installer (Deployment Guidance) or a manual install. For the permissions these need, see Prerequisites -> Permissions.

For both accounts follow this process:

Create Runtime Application

Create an app registration with Entra ID. Find the Entra ID section:

AAD in Azure Portal

Add new app registration through portal.azure.com – the Entra ID blade.

New app registration

New registration name: Microsoft 365 Advanced Analytics - Runtime or Microsoft 365 Advanced Analytics - Installer (you need to repeat this process for each registration).

Create app registration. 1st step

Leave the "redirect URIs" for now, but we will need to add them later for the runtime application. Click "Register" to create the application registration.

You should now be sent to the new application you've just created. Next, we need to add a client secret.

Adding a new secret

Create a new client secret for the app registration with the following information:

  • Description: whatever you want. Blank is fine.
  • Expires: the maximum amount you can (or a date you'll have to change the secret & update configuration).

Click "add" and the secret will be generated. Copy & store the key that is shown.

Add button

Remember to save the secret value – we will need this later. Do NOT copy the Key ID.

Copy the secret value

Go to application overview. Copy & store application registration ID and the directory ID:

App registration details

The application should be now created. You need the client ID, secret value, and directory ID for both installer & runtime applications.

Important: both accounts need to be in the same Entra ID directory.

Grant permissions to the Office 365 Management and Graph APIs

The runtime service principal must have permissions granted to the activity and Graph API. This is not something granted by default, so needs to be added after registration.

The list of permissions can be found in the prerequisites docs.

In the runtime app registration, add the permissions in the following screenshot. Click "API permissions" and then "Add a permission".

There are two sources we need to read data from: Office 365 Management API and Microsoft Graph.

The permissions for the Office runtime application should look like this if you need all the permissions used (see your solution specific documentation):

API permissions

When permissions are added initially, they are not granted until an Entra ID administrator can consent to them.

Important: grant admin consent to the application to complete configuration.

Admin consent button

This may take some time internally within your organisation to get approved.

All Entra ID permissions should now be configured for the runtime application.

Testing Runtime application

Once the permissions above have been set, you can validate them in the installer application easily. Open the installer/control-panel, and just fill out these fields:

Credentials tab in the installer

Then on the Install tab, click "Test Configuration"

Test results shown

When testing configuration, no changes are made in any way to anything. The installer just simulates similar reads the importer web-jobs will do and reports their success.

Add Platform configurations to Runtime application

For the web application to correctly authenticate users, its URL must be registered as a reply URL (redirect URI) on the runtime app registration, and ID tokens must be enabled.

This is documented on its own page — including the exact URL format (the HTTPS root with a trailing slash), the token settings to enable, handling multiple environments, and how to troubleshoot the common AADSTS50011 redirect-URI-mismatch error:

📄 Runtime app reply URLs

Note: this step requires the URL of the Azure App Service you have (or will have) created. You may need to come back to it once the app service exists — but don't skip it, as it's required for the website to work.

Create Installation application

Follow the same process above to create a runtime service principal. For this account, no permissions are added, we just need an application registration & secret.

Create Azure resource group

For the installer we need to grant it permissions to an existing resource group in the Azure subscription. From the portal, create a new resource group:

Create a resource group

Once created we can add the installer permissions to it.

Grant Installer permissions

In the resource group, add the installer account to list of role assignments:

Resource group IAM

Next find the role owner.

Add role assignment

Next pick who we want to add as "owner" to this group.

Select the service principal as member

Select members and search for the installer account. Selecting it will add it to the select list.

Select button

Confirm we have the right permissions:

Double check everything

Click "review + assign" to verify one last time.

Triple check again

When you click this a 2nd time, Azure will add the role:

Azure banner showing the status

The installer account has been added to the resource group.

Next, we need to do the same for the subscription, but with reader permissions. Go to the subscription that hosts the resource group:

Subscriptions list

In access control, add a new role:

Subscription IAM

This time add reader role:

Assgn the role

Great! The installer should now be able to create all the resources needed.

Finally, register the web app's URL as a reply URL on the runtime app registration so users can sign in to the website — see Runtime app reply URLs (we recommend doing this once the app service exists, as you'll need its URL).

Clone this wiki locally