This article applies as of PRTG 20
Credentials for Microsoft 365 and permission for the Office 365 Management API
Before you can set up the Microsoft 365 Service Status sensor or the Microsoft 365 Service Status Advanced sensor, you need to define credentials for Microsoft 365 in settings that are higher in the object hierarchy, for example, in the settings of the parent device.
The credentials you need are the Tenant ID, the Client ID, and the Client Secret. You obtain the credentials in the Microsoft Azure Portal. There you can also set the permission that the Microsoft 365 sensors require to read data from the Office 365 Management APIs.
The following step-by-step guide shows you how to obtain the necessary credentials and how to set the required API permission.
Log in to the Microsoft Azure Portal under https://portal.azure.com and follow
- Step 1: Get the client ID and the tenant ID
- Step 2: Get the client secret
- Step 3: Set the permissions for the Office 365 Management APIs
- Step 4: Authorize the new application
Step 1: Get the client ID and the tenant ID
Take the following steps to register your application with Azure AD to be assigned a client ID.
- Go to the App registrations tab.

Click to enlarge.
- Click New registration to open the Register an application dialog.

Click to enlarge.
- Enter a display name, for example, Microsoft 365 Service Status.
- Leave all other settings as they are.
- Enter the redirect URI where the authorization server sends you after the registration and authorization of the app. This is required for most authentication scenarios. Note that there are specific rules for the redirect URI.
- Click Register to register the new application. The Overview tab of the newly registered application opens.

Click to enlarge.
- Copy the Application (client) ID and the Directory (tenant) ID. These are the client ID and the tenant ID that you need to enter in PRTG.
Step 2: Get the client secret
Take the following steps to create an application password, also known as client secret.
- Go to the Certificates & secrets tab.

Click to enlarge.
- Click New client secret to open the Add a client secret dialog.

Click to enlarge.
- Enter a Description, for example, Microsoft 365 Client Secret.
- Select a period after which the client secret expires.
- Click Add to create and display the new client secret for your application.

Click to enlarge.
- Copy the client secret to enter it in PRTG.
Note: Make sure that you directly copy the client secret after you created it. If you leave the page, the client secret is not shown anymore. You have to create a new client secret.
Step 3: Set the permission for the Office 365 Management APIs
Take the following steps to set the required permission for the Microsoft 365 sensors to be able to query data from the Office 365 Management APIs.
- Go to the API permissions tab.

Click to enlarge.
- Click Add a permission to open the Request API permissions dialog.
- Select the Office 365 Management APIs tile.

Click to enlarge.
- Click Application permissions.
- Enable the check box next to ServiceHealth.Read.
- Click Add permissions to add the required permission.
Step 4: Authorize the new application
Take the following steps to authorize the new application.
- Use the following URL:
https://login.windows.net/common/oauth2/authorize?response_type=code&resource=https%3A%2F%2Fmanage.office.com&client_id={your_client_id}
- For your_client_ID, enter the client ID of the newly created application.
- Click Accept to accept the request.
And that’s it. Now you can enter your tenant ID, client ID, and client secret in PRTG to start monitoring with the Microsoft 365 sensors.
More
Add comment