Spyglass MTG Blog

Transitioning a M365 Service Health Project from O365 Management API to Graph API

Written by Gautam Yadav | May 31, 2022 2:15:00 PM

In early 2021, Spyglass helped a large client develop a solution for monitoring the Office 365 (now called Microsoft 365) service health. The solution was to fetch the Office 365 (O365) service health messages using O365 Management APIs and save them to SharePoint Online lists for better and targeted distribution. It involved the development of a custom connector to fetch the data from an O365 admin center, and then custom connector would call in a Power Automate to push the data to desired location. In my case, it was SharePoint online lists to store the data for better distribution to targeted audiences. The solution was intended to cut down most of the manual efforts of the administrators and get the messages to the impacted users directly and in an automated fashion. Please refer to this blog post.

 

In June 2021, Microsoft started moving the focus for Azure AD from Azure AD Graph API to the generic Microsoft Graph API. This resulted in to transitioning older REST APIs built for Microsoft Cloud services to Microsoft Graph. Similarly, the solutions developed using O365 Management APIs needed to be transitioned to Graph APIs.

 

Outlined below, I have put together the steps to update the project from the old O365 Management API to Microsoft Graph API.

 

The first step remains the same - in order to get the data from the message center, we register an application in Azure Active Directory - App Registrations.

 

Click on “Add a permission” to request API permissions

 

 

Then click on Microsoft Graph and select “Application permissions"

Scroll down and select the “ServiceHealth.Read.All” and “ServiceMessage.Read.All”

Create new secret

In the 2nd step with the Graph API, we don’t need the custom connector, so you can go ahead and delete it. We will be making direct calls to Graph API in the Power Automate to fetch the Microsoft 365 service health messages.

In the final step, we will update the Power Automate which runs on a schedule, gets the messages from message center with Graph API and distributes the messages in categorized SharePoint Online lists. The Power Automate also takes care of notifying the impacted users about incidents, service health, and product updates etc.

Below is one of the SharePoint lists that holds the messages from O365 admin center health.

If you would like to discuss this topic further or need help migrating your own projects from O365 Management API to Graph API, please contact us today!