In order to create an App Registration in Azure to allow Oauth methods when contacting the Office 365 Service Communications API follow these steps if using delegated permissions.
NB: Grant any permission your current task requires.
- Open portal.azure.com and go to App Registrations.
- Choose + New registration
- In the Register an application form provide a name (O365ServiceApi)
- Select Accounts in this organizational directory only
- Choose Register
Here is a visual representation of those steps:
Now let's give the app some permissions.
NB: You could choose any permissions for any API that suits your needs.
- On the Overview page, select API permissions
- Choose + Add a permission
- In the Microsoft APIs tab, choose Office 365 Management APIs
- In the Request API permission form, select Delegated permissions, check ServiceHealth.Read
- Below Grant consent, select Grant admin consent for "tenant-name" and when prompted choose Yes
- Select Overview in the navigation panel, record the Display name, Application ID, and Directory ID values from the app registration to a notepad file.
- In the navigation panel, select Certificates & Secrets
- Under Secrets, choose New Client Secret
- Set a description and expiration duration
- Copy the Secret and back this up in the same way the rest
This process can be modified somewhat in terms of permissions, but I will leave you to explore the masses of data there is out there on this subject.
Now you are ready to go.
Thanks for reading.