PowerShell module to retrieve Microsoft 365 service status information from the Office 365 Service Communications API.
- Create an app registration
- Add
http://localhost
as reply URL (PowerShell 7) - Add
https://login.microsoftonline.com/common/oauth2/nativeclient
as reply URL (PowerShell 5.1)
- Add
- Install the module from PowerShell Gallery
Install-Module -Name Microsoft365ServiceStatus
Obtain an access token via MSAL PS (feel free to use another authentication flow):
$accessToken = Get-MsalToken -ClientId "10d3c3cb-8b79-481c-bf48-1c35eceb0c75" -TenantId "nicolasuter.ch" -Scope "https://manage.office.com/ServiceHealth.Read"
Store the token within script context:
Set-MsalToken -MsalToken $accessToken
Service status:
Get-M365ServiceStatus
Service status (brief):
Get-M365ServiceStatus -Brief
Service status messages:
Get-M365ServiceMessage
Retrieve specific service status message:
Get-M365ServiceMessage -MessageID EX213379
Service status history:
Get-M365ServiceHistoricalStatus