/Microsoft365ServiceStatus

PowerShell module to retrieve Microsoft 365 service status from the Office 365 Service Communications API

Primary LanguagePowerShellMIT LicenseMIT

Microsoft 365 Service Status

PowerShell Gallery Version PowerShell Gallery GitHub

PowerShell module to retrieve Microsoft 365 service status information from the Office 365 Service Communications API.

Get-M365ServiceStatus

Set-up

Initial

  1. Create an app registration
    1. Add http://localhost as reply URL (PowerShell 7)
    2. Add https://login.microsoftonline.com/common/oauth2/nativeclient as reply URL (PowerShell 5.1)
  2. Install the module from PowerShell Gallery
    1. Install-Module -Name Microsoft365ServiceStatus

Authenticating to the Office 365 Service Communications API

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

Cmdlets

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