In order to synchronize data from Microsoft 365, an Application must be created on the Office 365 portal.
Log into the Azure portal https://portal.azure.com using an account with permission to register applications and with Microsoft.Authorization/*/Write access.
When signed into the Microsoft Windows Azure Management Portal, create and configure the Application on the App registrations blade as follows:
- in the resource panel on the left click on Azure Active Directory.
If not shown, click All services, and select Azure Active Directory from the IDENTITY section;
- in the Active Directory blade create an application registration:
- select App registrations;
- select New registration;
- enter a name for the application, e.g. Schemus;
- select Accounts in this organizational directory only;
- do not provide a Redirect URI;
- select Register.
- make a note of the Application (client) ID;
- add and grant permissions to the application registration. To grant permission to read Groups, Group members, Users and Contacts:
- select the Application;
- select API Permissions;
- select Add a permission;
- select Microsoft Graph;
- select Application permissions;
- expand Group and select Group.Read.All;
- expand GroupMember and select GroupMember.Read.All;
- expand OrgContact and select OrgContact.Read.All;
- expand User and select User.Read.All;
- select Add permissions;
- select Grant admin consent and confirm by selecting Yes;
- ensure that no permissions are granted for write access.
- Create a key:
- select Certificates & secrets;
- select New client secret;
- enter a description e.g. Schemus key;
- select a duration for the key in the EXPIRES column;
- select Save.
Note: The key can not be accessed again after the blade is closed, so be sure it is copied first.