1. Resources
  2. Detection sources
  3. Event ID 1202

Event ID 1202: The Federation Service validated a new credential

Written by an AD FS server for each sign-in whose fresh credentials, such as a user name and password, it validated. The success counterpart of 1203: a 1202 from an address that just failed for many users marks a guessed password.

Log source
AD FS auditing
Detection value
Supporting
Volume
Medium (estimate)
Last updated
Log
AD FS auditing (AD FS Auditing, off by default)
Logged on
Member servers only
Event versions
Not published
Detects
2 attacks (3 detection logic)
MITRE ATT&CK
3 techniques in 1 tactic
Threat groups
14 groups that MITRE ATT&CK records using these techniques

When it is written

AD FS writes 1202 to the Security log of the AD FS server that handled the request, under the event source AD FS Auditing, when the Federation Service validates fresh credentials successfully: credentials presented with this request, as opposed to an existing single sign-on session. Microsoft names it Fresh Credential Validation Success and lists the protocols it covers: WS-Trust, WS-Federation, SAML-P (the first leg, which creates the single sign-on session) and the OAuth authorize endpoints. A later request that uses the single sign-on cookie produces the token event 1200 instead. The failed counterpart is 1203.

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 success audits reach the Security log. For AD FS in Windows Server 2012 R2, Microsoft's password spray playbook names audit event 412 as the successful sign-in instead. Microsoft does not print the text of 1202; the other events of the model carry two values, the activity ID of the request and an XML document with its details, and its extranet lockout page says the audit logs list the client addresses in the <IpAddress> element.

When Extranet Smart Lockout is on, a successful sign-in has a second effect that Microsoft describes: the addresses of the request are added to the user's familiar locations and the bad password count is reset. Microsoft notes that if an attacker has guessed the password, the sign-in is successful and the attacker's address becomes a familiar one.

Why a defender reads it next to the events the rules read: the library's password spraying rules read the failures (1203 and 411), the lockouts and event 515, and its detection logic looks for a 1202 from a client address that has just failed for many users, the moment a spray finds a password. Its Golden SAML detection logic uses 1200 and 1202 as the farm's record of what it issued: a federated sign-in to Microsoft Entra ID with no matching AD FS record points to a token made outside the farm.

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:

  1. 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.
  2. 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.
  3. 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.

Check the Application Generated subcategory
auditpol /get /subcategory:"Application Generated"
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9222-69AE-11D9-BED3-505054503030}"
Based on vendor documentation.
Turn the subcategory on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Application Generated" /success:enable /failure:enable
Based on vendor documentation.
Show the audit level and the extranet lockout settings of the farm
Get-AdfsProperties | Format-List AuditLevel, LogLevel, EnableExtranetLockout, ExtranetLockoutMode, ExtranetLockoutThreshold, ExtranetObservationWindow
Based on vendor documentation.
Log every audit event, including 411 (AD FS 2016 and later; much more volume)
Set-AdfsProperties -AuditLevel Verbose
Based on vendor documentation.

Needs AD FS auditing to reach the Security log: the user right, the Application Generated subcategory for success and failure, and, in the Federation Service properties, both Success audits and Failure audits, as Microsoft's steps select them (1202 is the success event of the pair 1202 and 1203). 1202 is part of the default Basic audit level, so the level only has to be other than None. Microsoft Defender for Identity lists 1202 among the events it requires on AD FS servers.

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.

FieldWhat it holds
Activity IDGUID 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. All zeros for legacy authentication proxied by Exchange Online. Microsoft documents this label for 1203 and 1210, not for 1202 itself.
XMLDocument with the details of the validation. Microsoft publishes no example of it for 1202. Its example of the extranet lockout event (1210) holds the audit result, 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.
IpAddressElement 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

IpAddress

ValueMeaningSignal
An address that failed for many users just beforeA successful validation from the source of a password sprayWhat the library's spray detection logic looks for. Treat the user's password as known to the attacker and check the user's later sign-ins.Attack signal
An address the user has not used beforeA sign-in from a new locationWith Extranet Smart Lockout, Microsoft adds it to the user's familiar locations after this success, so a guessed password also makes the attacker's address familiar.Worth knowing
The user's usual office or device addressesOrdinary sign-inExpected

Activity ID

ValueMeaningSignal
00000000-0000-0000-0000-000000000000Legacy 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 GUIDThe request's own activity IDThe same ID is in every AD FS event of the request, which ties the 1202 to the token events that follow.Expected

Volume and noise

Almost every 1202 is an ordinary sign-in: each user who types a password into the AD FS sign-in page, and each client that sends credentials through WS-Trust, produces one, so the event follows the working day of the organization. Sign-ins whose network address is a Microsoft one come from legacy authentication that Exchange Online sends on the user's behalf (activity ID of all zeros), with the submitter in the forwarded address.

A single 1202 means nothing on its own. It matters in context: after failures for many users from the same address, after a lockout of the same user, or as the record that the farm itself validated a sign-in that a relying party accepted.

Keeping it manageable

  • Keep every 1202 from every AD FS server: the library's spray detection logic joins it with the failures per client address, and its Golden SAML detection logic compares it with federated sign-ins in Microsoft Entra ID, which needs all of them.
  • Parse the user and the first client address from the XML in the SIEM, where the <IpAddress> element lists the forwarded client address first.
  • Do not alert on single events. Join 1202 with the addresses of recent failures (1203, 411), and give first place to successes from an address that failed for many users, as Microsoft's password spray playbook prioritizes them.
  • Collect the Security log of the AD FS servers, not of the Web Application Proxy servers: each AD FS server logs only the requests it handled.

Attacks this event reveals

Detection logic (hypotheses that join this event with others) for:

Frequently asked questions

What is AD FS event 1202?

Fresh Credential Validation Success: an AD FS server validated the credentials presented with a request, such as a user name and password, for WS-Trust, WS-Federation, the first SAML-P leg or an OAuth authorize request. It is the success counterpart of 1203 and is written at the default Basic audit level from AD FS in Windows Server 2016.

How do I find a successful password spray in AD FS logs?

Find the client addresses that produced failed validations (1203, and 411 where the farm writes it) for many users, then look for a 1202 from the same addresses. Its user is the account whose password the attacker now knows. Microsoft's password spray playbook adds that a sign-in and sign-out in the same second can be an indicator of a guessed password being tried, and that successful sign-ins from the attacker's address come first in the findings.

Why do I not see event 1202?

Check that the AD FS service account holds Generate security audits, that Audit Application Generated is on for success and failure, that Success audits and Failure audits are selected in the Federation Service properties, and that the audit level is not None. On AD FS in Windows Server 2012 R2 the model differs, and Microsoft's playbook names 412 as the successful sign-in.

What is the difference between AD FS events 1202 and 1200?

1202 records a successful validation of fresh credentials. 1200 records a security token issued by the Federation Service; for WS-Federation and SAML-P it is logged when the request is processed with the single sign-on artifact, such as the cookie. A first sign-in can produce both, sharing the activity ID.

References