M365 Mailbox Count M365 Monitor

Microsoft.SystemCenter.M365.Monitor.MailboxCountM365 (UnitMonitor)

This monitor determines the number of mailboxes that exist under M365 and the associated organization's location.

Knowledge Base article:

Summary

This monitor utilizes the Microsoft Graph API to determine the number of mailboxes that exist under M365 and the associated organization's location. This monitor has two health states, healthy and critical. The health state is simply determined by whether the count and location are obtained.

Causes

An error state is caused by having issues with connecting to Microsoft 365 or fetching data. It can be caused by the following:

Resolutions

Resolution depends on the specific error. Verify and/or fix the following:

Element properties:

TargetMicrosoft.SystemCenter.M365.WatcherNodeApplication.M365MailFlow
Parent MonitorMicrosoft.SystemCenter.M365.Monitor.Availability.WatcherNode.M365MailFlow
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.M365.Monitor.MailboxCountM365.UnitMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
M365 Mailbox Count M365 Monitor: Failure
This monitor is unable to determine the number of mailboxes that exist under M365 and/or the associated organization's location.
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.M365.Monitor.MailboxCountM365" Accessibility="Public" Enabled="true" Target="Microsoft.SystemCenter.M365.WatcherNodeApplication.M365MailFlow" ParentMonitorID="Microsoft.SystemCenter.M365.Monitor.Availability.WatcherNode.M365MailFlow" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter.M365.Monitor.MailboxCountM365.UnitMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.M365.Monitor.MailboxCountM365.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='Alert Message']$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Healthy" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Critical" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>900</IntervalSeconds>
<AzureADEndpoint>$Target/Host/Property[Type="Microsoft.SystemCenter.M365.WatcherNodeApplication"]/AzureADEndpoint$</AzureADEndpoint>
<GraphEndpoint>$Target/Host/Property[Type="Microsoft.SystemCenter.M365.WatcherNodeApplication"]/GraphEndpoint$</GraphEndpoint>
<TenantId>$Target/Host/Property[Type="Microsoft.SystemCenter.M365.WatcherNodeApplication"]/TenantId$</TenantId>
<ApplicationClientId>$RunAs[Name="Microsoft.SystemCenter.M365.RunAsProfile.ApplicationClient"]/UserName$</ApplicationClientId>
<ApplicationClientCredentials>$RunAs[Name="Microsoft.SystemCenter.M365.RunAsProfile.ApplicationClient"]/Password$</ApplicationClientCredentials>
<DelegatedUserId>$RunAs[Name="Microsoft.SystemCenter.M365.RunAsProfile.DelegatedMailSender"]/UserName$</DelegatedUserId>
<DelegatedUserCredentials>$RunAs[Name="Microsoft.SystemCenter.M365.RunAsProfile.DelegatedMailSender"]/Password$</DelegatedUserCredentials>
<MatchCount>1</MatchCount>
</Configuration>
</UnitMonitor>