OAuth artifact REST endpoint request authorization failed

Microsoft.ActiveDirectoryFederationServices.2016.ArtifactServiceOAuthRESTEndpointFailedMonitor (UnitMonitor)

Knowledge Base article:

Summary

This monitor checks for repeated errors on requests to resolve OAuth authorization codes between AD FS Servers in a farm.

If no errors occur again within 15 minutes, the health state of this monitor will change back to a Green state and the alert associated will be closed automatically.

Causes

This error occurs when the request comes from an unauthorized user account. Only the AD FS Windows Service account has permission to resolve authorization codes.

Resolutions

Verify that all AD FS servers in the farm are running under the same service account. If discrepancies are found, re-join the affected nodes using AD FS Windows PowerShell cmdlets, supplying the right service account credentials.

Element properties:

TargetMicrosoft.ActiveDirectoryFederationServices.2016.ArtifactService
Parent MonitorSystem.Health.ConfigurationState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.RepeatedEventLogTimer2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
OAuth artifact REST endpoint request failed
Please see the alert context for details.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.ActiveDirectoryFederationServices.2016.ArtifactServiceOAuthRESTEndpointFailedMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.ActiveDirectoryFederationServices.2016.ArtifactService" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.RepeatedEventLogTimer2StateMonitorType" ConfirmDelivery="true">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.ActiveDirectoryFederationServices.2016.ArtifactServiceOAuthRESTEndpointFailedMonitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="RepeatedEventRaised" MonitorTypeStateID="RepeatedEventRaised" HealthState="Warning"/>
<OperationalState ID="TimerEventRaised" MonitorTypeStateID="TimerEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<RepeatedComputerName>$Target/Host/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</RepeatedComputerName>
<RepeatedLogName>AD FS/Admin</RepeatedLogName>
<RepeatedExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1100</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>(^AD FS$)</Pattern>
</RegExExpression>
</Expression>
</And>
</RepeatedExpression>
<Consolidator>
<ConsolidationProperties/>
<TimeControl>
<WithinTimeSchedule>
<Interval>60</Interval>
</WithinTimeSchedule>
</TimeControl>
<CountingCondition>
<Count>10</Count>
<CountMode>OnNewItemTestOutputRestart_OnTimerSlideByOne</CountMode>
</CountingCondition>
</Consolidator>
<TimerWaitInSeconds>900</TimerWaitInSeconds>
</Configuration>
</UnitMonitor>