Exchange to M365 Mail Flow Monitor

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

This monitor logs into Exchange using the OnPrem Sender Profile and sends a test message to the M365 Receiver Profile. It then logs into the account specified in the M365 Receiver Profile and verifies receipt of the email from the OnPrem Sender Profile.

Knowledge Base article:

Summary

This monitor utilizes synthetic transactions to verify the flow of email from an Exchange email account to an M365 email account. This monitor has two health states, healthy and critical. The health state is determined if the synthetic transaction is or is not able to successfully complete for any reason. The synthetic transaction works by logging into a sender account using the "Microsoft 365 Exchange Sender Profile" and sending a test email to the receiver account specified in the "M365 Email Receiver email address". The monitor then logs into the receiver account using the "M365 Email Receiver email address" to verify the test email was received.

This monitor contains the following overridable parameters.

-Interval (seconds)- Default Value: 900 seconds - This sets how long the monitor waits until running the synthetic transaction again. The default value can be left or can be adjusted to fit the environment.

-Enabled- Default Value: False -This need to be overridden to true for all watcher nodes. This allows the monitor to run the synthetic transaction workflows.

-GraphEndpoint- Default Value: None - This needs to be overridden and populated with the URL for the GraphAPI Endpoint URL utilized in your environment.

-Exchange URL- Default Value: None - This needs to be overridden and populated with the URL for the Exchange EWS URL utilized in your environment.

-SleepInterval- Default Value: 5 seconds - This value determines how long the monitor waits between search attempts during each run of the synthetic transaction. The synthetic transaction will attempt to search for the received email 10 times. The default value can be left or can be adjusted to fit the environment.

Causes

An error state is caused by having issues with connecting to Microsoft Exchange or 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.HybridMailFlow
Parent MonitorMicrosoft.SystemCenter.M365.Monitor.Availability.WatcherNode.HybridMailFlow
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.M365.Monitor.ExchangeToM365MailFlow.UnitMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Exchange to M365 Mail Flow Monitor: Failure
This monitor has detected a mail flow issue while attempting to send email from an Exchange email account to an M365 email account.
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.M365.Monitor.ExchangeToM365MailFlow" Accessibility="Public" Enabled="true" Target="Microsoft.SystemCenter.M365.WatcherNodeApplication.HybridMailFlow" ParentMonitorID="Microsoft.SystemCenter.M365.Monitor.Availability.WatcherNode.HybridMailFlow" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter.M365.Monitor.ExchangeToM365MailFlow.UnitMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.M365.Monitor.ExchangeToM365MailFlow.Alert.Message">
<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.DelegatedMailReceiver"]/UserName$</DelegatedUserId>
<DelegatedUserCredentials>$RunAs[Name="Microsoft.SystemCenter.M365.RunAsProfile.DelegatedMailReceiver"]/Password$</DelegatedUserCredentials>
<SenderUser>$RunAs[Name="Microsoft.SystemCenter.M365.RunAsProfile.Exchange.Sender"]/UserName$</SenderUser>
<SenderPassword>$RunAs[Name="Microsoft.SystemCenter.M365.RunAsProfile.Exchange.Sender"]/Password$</SenderPassword>
<ReceiverUser>$Target/Host/Property[Type="Microsoft.SystemCenter.M365.WatcherNodeApplication"]/M365EmailReceiver$</ReceiverUser>
<ExchangeURL>$Target/Host/Property[Type="Microsoft.SystemCenter.M365.WatcherNodeApplication"]/ExchangeURL$</ExchangeURL>
<SleepInterval>5</SleepInterval>
<MatchCount>1</MatchCount>
</Configuration>
</UnitMonitor>