When it is written
AD FS writes 1203 to the Security log of the AD FS server that handled the request, under the event source AD FS Auditing, when the Federation Service fails to validate fresh credentials: credentials presented with this request, as opposed to an existing single sign-on session. Microsoft lists the protocols it covers as WS-Trust, WS-Federation, SAML-P (the first leg, which creates the single sign-on session) and the OAuth authorize endpoints, and its extranet lockout page says the event is written for each bad password attempt. The successful counterpart is 1202.
The event belongs to the audit model of AD FS in Windows Server 2016 and later and is part of the default Basic audit level, so it is written as soon as AD FS auditing reaches the Security log. Microsoft's password spray playbook lists 1203 for AD FS 2016 and 2019; for AD FS 2012 R2 it names 411 and 516 instead.
The event data is two values: the activity ID of the request and an XML document with its details. Microsoft does not publish an example of the 1203 document. Its extranet lockout page says the client addresses appear in the <IpAddress> element, and its example of the lockout event 1210 carries the user in <UserId>.
How to turn it on
AD FS Auditing writes the event to the AD FS auditing (Event Viewer > Windows Logs > Security (event source AD FS Auditing)), which is off by default. Microsoft
AD FS writes its audit events to the Security log of each AD FS server, with AD FS Auditing as the event source. Microsoft says these audit logs are not enabled by default; its Connect Health steps add that the two Federation Service check boxes should already be selected. Three settings must all be in place:
- The user right. The AD FS service account must hold Generate security audits (Local Security Policy > Security Settings > Local Policies > User Rights Assignment). Where AD FS runs on a domain controller, Microsoft points to the Default Domain Controllers Policy instead of the local policy.
- The audit subcategory. Audit Application Generated (Object Access) for success and failure, by Group Policy (Advanced Audit Policy Configuration > Audit Policies > Object Access) or locally with
auditpol. Microsoft warns that a Group Policy can turn AD FS auditing off. - The Federation Service audits. In AD FS Management, Edit Federation Service Properties > Events: Success audits and Failure audits. Connect Health's steps make this change on the primary server only, because it is a setting of the farm.
From Windows Server 2016 the farm also has an audit level, shown as AuditLevel by Get-AdfsProperties: Basic, the default, logs no more than five events per request and includes 1200 to 1203; Verbose logs every event, including 411, 412 and 501 (Microsoft's Connect Health tables); None logs nothing. Microsoft Defender for Identity and Connect Health ask for Verbose.
Audit every AD FS server of the farm, because each one logs only the requests it handled. The Web Application Proxy servers do not need auditing. The extranet lockout events (512, 515, 516, 1210) also need extranet lockout to be enabled; the check command below shows its settings.
auditpol /get /subcategory:"Application Generated"auditpol /get /subcategory:"{0CCE9222-69AE-11D9-BED3-505054503030}"auditpol /set /subcategory:"Application Generated" /success:enable /failure:enableGet-AdfsProperties | Format-List AuditLevel, LogLevel, EnableExtranetLockout, ExtranetLockoutMode, ExtranetLockoutThreshold, ExtranetObservationWindowSet-AdfsProperties -AuditLevel VerboseNeeds AD FS auditing to reach the Security log (the user right, the Application Generated subcategory and the Federation Service audits) and an audit level other than None. 1203 is part of the default Basic level, so the level does not have to be raised for it.
Fields
The template of this event is not part of client Windows and Microsoft does not publish its XML field names, so the fields are named by the labels of Microsoft’s documentation.
| Field | What it holds |
|---|---|
| Activity ID | GUID that AD FS assigns to the request and logs in every event of it, in the audit, admin and debug logs and on every server the request passed through. AD FS also shows it to the user when a sign-in fails, which ties a help desk call to the events. All zeros for legacy authentication proxied by Exchange Online. |
| XML | Document with the details of the failed validation. Microsoft publishes no example of it for 1203. Its example of the extranet lockout event (1210) holds the audit result, failure type and error code, the relying party, the user (UserId), the protocol, the network location, the client addresses, the user agent and the endpoint. Check the elements in your own events before you build a parser. |
| IpAddress | Element of the XML document with the client addresses AD FS saw, in the order x-ms-forwarded-client-ip, x-forwarded-for, x-ms-proxy-client-ip, according to Microsoft's extranet lockout page. It can hold more than one address. |
Values to know
Activity ID
| Value | Meaning | Signal |
|---|---|---|
00000000-0000-0000-0000-000000000000 | Legacy authenticationMicrosoft says legacy authentication has this activity ID. Exchange Online signs in on the user's behalf, so its server is the network address and the submitter is in x-ms-forwarded-client-ip. | Worth knowing |
Any other GUID | The request's own activity IDThe same ID is in every AD FS event of the request and is shown to the user when the sign-in fails. | Expected |
IpAddress
| Value | Meaning | Signal |
|---|---|---|
First address | x-ms-forwarded-client-ipMicrosoft lists the addresses in the order x-ms-forwarded-client-ip, x-forwarded-for, x-ms-proxy-client-ip. For an extranet request the first is the client that reached the Web Application Proxy. | Worth knowing |
One address, many users | Failures for many accounts from one clientWhat a password spray looks like and what the library's spray hypothesis counts. | Attack signal |
Many addresses, one user | Failures for one account from many clientsPassword guessing, or a spray spread over many addresses that a count per address misses. | Attack signal |
Volume and noise
Every farm has a steady level of 1203: mistyped passwords, and clients that keep submitting an old password. Microsoft's lockout troubleshooting names applications that cache credentials and service accounts whose password changed without the application being updated as common causes of repeated failures for one user. Failures that show a Microsoft address come from legacy authentication that Exchange Online sends on the user's behalf (activity ID of all zeros): the submitter is in the forwarded address.
One event on its own rarely means anything. A spray raises the number of distinct users that fail from one client address; password guessing raises the number of failures for one user.
Keeping it manageable
- Keep every 1203 from every AD FS server: the library's rule reports each failure, and its spray hypotheses count distinct users per client address, which needs all of them.
- Parse the XML in the SIEM. The rule matches only the event ID and the provider, so the user and the address have to come from the document, where the
<IpAddress>element lists the forwarded client address first. - Alert on counts per client address and per user, not on single events, and keep a list of shared addresses (offices, carriers, Microsoft's Exchange Online servers) that reach the counts without an attack.
- Collect the Security log of the AD FS servers, not of the Web Application Proxy servers: the proxies need no auditing and each AD FS server logs only the requests it handled.
Attacks this event reveals
Detection rules that read this event:
Frequently asked questions
What is the difference between AD FS events 1203 and 411?
Both record a failed password sign-in on an AD FS server. 1203 belongs to the audit model of AD FS in Windows Server 2016 and later, is written at the default Basic audit level and carries its details in an XML document. 411, a failed token validation with the user principal name and the submitter's address as separate values, is the event Microsoft tells administrators to search on AD FS for Windows Server 2012 R2 and 2016, and from 2016 it is part of the Verbose audit level. Collect both where the farm writes both.
Why does event 1203 show a Microsoft IP address?
In legacy (basic) authentication, Exchange Online submits the user name and password to AD FS for the client, so the network address is one of Microsoft's. Microsoft says these requests have an activity ID of all zeros and that the submitter's own address is in x-ms-forwarded-client-ip, which AD FS lists first in the IpAddress element.
How do I find a password spray in AD FS event 1203?
Parse the user and the first client address from the XML, count the distinct users that fail per address in short windows (the library's hypothesis starts at 10 users in 30 minutes), then look for a successful validation (1202) from the same address and for lockouts (1210, 516). Count failures per user as well, because a spray spread over many addresses stays below a count per address.
References
- Troubleshoot AD FS with events and logging (Microsoft)
- AD FS Extranet Lockout and Extranet Smart Lockout overview (Microsoft)
- Microsoft Entra Connect Health agents for AD FS, audit level events (Microsoft)
- Auditing enhancements to AD FS in Windows Server 2016 (Microsoft)
- Password spray investigation (Microsoft)
- Troubleshoot account lockout in AD FS on Windows Server (Microsoft)
- AD FS frequently asked questions, client IP claims (Microsoft)