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

Event ID 1210: An extranet lockout event has occurred

Written by AD FS Extranet Smart Lockout when a user is locked out for extranet sign-ins, with the user, the client addresses, the bad password count and the threshold in an XML document. Read by the library's lockout rule.

Log source
AD FS auditing
Detection value
Supporting
Volume
Low (estimate)
Last updated
Log
AD FS auditing (AD FS Auditing, off by default)
Logged on
Member servers only
Event versions
Not published
Detects
1 attack (1 rule · 1 detection logic)
MITRE ATT&CK
2 techniques in 1 tactic
Threat groups
14 groups that MITRE ATT&CK records using these techniques
Fields the rules read
The event ID and the provider only

When it is written

AD FS writes 1210 to the Security log of the AD FS server, under the event source AD FS Auditing, when Extranet Smart Lockout locks a user out. Microsoft's lockout page says it is written each time a user is locked out. The support article that introduced smart lockout for AD FS in Windows Server 2016 describes the same audit as written when a request is rejected because the account is over the lockout threshold, so it can repeat while the lockout lasts. Microsoft gives the text and an example of the XML in that article without the event number; the lockout page gives 1210 the same layout.

Extranet lockout counts bad passwords per user only for user name and password requests that come through the Web Application Proxy (or a third-party proxy that supports MS-ADFSPIP); requests that reach AD FS directly from the intranet are not counted. Smart lockout keeps separate counts for a user's familiar and unfamiliar locations. Once a count passes ExtranetLockoutThreshold, AD FS refuses that user's password requests from those locations until ExtranetObservationWindow has passed, then allows one attempt per window. Active Directory lockout works independently: AD FS does not lock the domain account.

The events are written only while smart lockout runs in Log-Only or Enforce mode and AD FS auditing reaches the Security log. In log-only mode AD FS writes the event but refuses nothing. Microsoft does not say whether the older extranet lockout mode (ADPasswordCounter) writes 1210; the lockout audits it describes for that mode in Windows Server 2012 R2 are 512, 515 and 516.

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 extranet lockout turned on (EnableExtranetLockout true) in Extranet Smart Lockout mode, Log-Only (AdfsSmartLockoutLogOnly) or Enforce (AdfsSmartLockoutEnforce), and AD FS auditing reaching the Security log. Get-AdfsProperties shows EnableExtranetLockout, ExtranetLockoutMode, ExtranetLockoutThreshold and ExtranetObservationWindow.

Smart lockout came to AD FS in Windows Server 2016 with the 2018 updates (Microsoft's page asks for the June 2018 updates and the 2016 farm behavior level) and is built into AD FS in Windows Server 2019. Microsoft recommends a threshold below the Active Directory lockout threshold (10 against 20 in its example) and an observation window of 30 minutes.

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.
XMLDocument with the details of the lockout (Additional Data, XML in Microsoft's example), of type ExtranetLockoutAudit. Besides the elements below, Microsoft's example holds the audit type and result, the relying party, the claims provider, the authentication protocol, the network location and the proxy and network addresses. Check the elements in your own events before you build a parser.
UserIdElement with the user the lockout applies to, in DOMAIN\user form in Microsoft's example.
IpAddressElement 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 lockout page. It can hold more than one address.
EndpointElement with the AD FS endpoint the request reached, /adfs/ls in Microsoft's example. Microsoft recommends disabling legacy endpoints such as /adfs/services/trust/13/usernamemixed, which Exchange ActiveSync clients reach through Exchange Online, where they are not needed.
UserAgentStringElement with the user agent of the client, a browser string in Microsoft's example. Supplied by the client.
CurrentBadPasswordCountElement with the user's bad password count when the event was written; 5 in Microsoft's example, the same as the configured count.
ConfigBadPasswordCountElement with the configured bad password threshold; 5 in Microsoft's example.
LastBadAttemptElement with the time of the user's last bad password attempt.
LockoutWindowConfigElement with the configured lockout window; 00:30:00 in Microsoft's example, the 30 minutes Microsoft recommends for ExtranetObservationWindow.
FailureTypeElement with the kind of failure; ExtranetLockoutError in Microsoft's example.
ErrorCodeElement with the error code of the audit; AccountRestrictedAudit in Microsoft's example.

Values to know

IpAddress

ValueMeaningSignal
First addressx-ms-forwarded-client-ipMicrosoft lists the addresses in the order x-ms-forwarded-client-ip, x-forwarded-for, x-ms-proxy-client-ip. The first is the client that reached the proxy, or the submitter behind Exchange Online.Worth knowing
One address, lockouts for many usersA password spray from that addressA spray that came back often enough to pass the threshold for several accounts.Attack signal
The user's own familiar addressA device of the user with an old passwordCheck with Get-ADFSAccountActivity and have the saved password updated.Noise

Activity ID

ValueMeaningSignal
00000000-0000-0000-0000-000000000000Legacy authenticationMicrosoft says legacy authentication through Exchange Online has this activity ID.Worth knowing

ErrorCode

ValueMeaningSignal
AccountRestrictedAuditThe value in Microsoft's example of the lockout eventShown with FailureType ExtranetLockoutError and AuditResult Failure in the same example.Worth knowing

Volume and noise

Lockouts are rare without an attack. The usual harmless cause is a phone or mail client that keeps submitting a user's old password from the user's own address; Microsoft's lockout troubleshooting also names applications with cached credentials and service accounts whose password changed. Lockouts whose address is a Microsoft one come from legacy authentication sent through Exchange Online.

Expect more events during log-only mode, which Microsoft recommends for 3 to 7 days before enforce mode so that AD FS learns the familiar locations of each user: nothing is blocked then, so a device with an old password keeps failing.

Keeping it manageable

  • Keep every 1210: the library's lockout rule reads each one, and the volume is low.
  • Parse UserId and IpAddress from the XML in the SIEM. The rule matches only the event ID and the provider, so a count of lockouts per client address (a spray) has to be built there.
  • To tell a device with an old password from an attack, compare the address with the user's familiar addresses: Get-ADFSAccountActivity lists them and the bad password counts, as Microsoft suggests during log-only mode.
  • Use the log-only period to list the users and addresses that lock out without an attack, and have those devices updated before you move to enforce mode.

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Does an AD FS extranet lockout lock the account in Active Directory?

No. Active Directory lockout works independently of extranet lockout, and AD FS only refuses the user's password requests from the extranet. Microsoft recommends an extranet threshold below the domain's lockout threshold, so that guessing through AD FS stops before it can lock the domain account. A lockout in the domain is event 4740 on the domain controllers.

Why do I see event 1210 although nothing is blocked?

In log-only mode, which Microsoft recommends for 3 to 7 days before enforce mode, AD FS writes the lockout audits but refuses no request. The event shows who would have been locked out. Check the mode with Get-AdfsProperties.

Where are the user and the client address in event 1210?

In the XML document of the event: the UserId element holds the user and the IpAddress element the client addresses, the forwarded client address first. The library's lockout rule matches only the event ID and the provider, so parse the XML in the SIEM to group lockouts by address.

References