Introduction
AD FS Extranet Smart Lockout protects against brute force attacks by tracking failed authentication attempts. When thresholds are misconfigured, legitimate users can be locked out after normal login failures (wrong password, expired password, MFA timeout).
Symptoms
User locked out:
```powershell PS C:\> Get-AdfsExtranetLockout -User "john@company.com"
IsExtranetLockout : True LockoutTimestamp : 2026-04-15 10:30:00 FailedAttempts : 15 ```
AD FS error:
Event ID 121: The extranet lockout threshold has been exceeded for user john@company.com.
The account will be locked out for the extranet observation window duration.User report:
User receives: "Your account has been locked. Please contact your administrator."
User cannot authenticate even with correct password.Common Causes
- 1.Threshold too low - Lockout after few failed attempts
- 2.Observation window too long - Lockout lasts longer than needed
- 3.Smart lockout mode wrong - Using "AdfsSmartLockoutLogOnly" or "AdfsSmartLockoutEnforce"
- 4.Familiar location not recognized - User IP not in familiar list
- 5.Password expiration - Users failing due to expired password
- 6.MFA failures counted - MFA failures counted as auth failures
Step-by-Step Fix
Step 1: Check Smart Lockout Configuration
```powershell # Get current smart lockout settings Get-AdfsExtranetLockoutConfiguration
# Output shows: # LockoutThreshold: Number of failed attempts before lockout # ObservationWindow: Duration of lockout in seconds # ExtranetLockoutThreshold: Similar threshold # ExtranetObservationWindow: Similar window
# Check current mode Get-AdfsProperties | Select-Object ExtranetLockoutMode
# Modes: # AdfsSmartLockoutLogOnly - Log only, no enforcement # AdfsSmartLockoutEnforce - Enforce lockout # UnknownFamiliarLocation - Block only unfamiliar IPs ```
Step 2: Review Failed Authentication Events
```powershell # Get AD FS audit events for failed auths Get-WinEvent -LogName "Security" | Where-Object { $_.Id -eq 411 -or $_.Id -eq 121 } | Select-Object TimeCreated, Message -First 20
# Event 411: Token validation failure # Event 121: Extranet lockout triggered
# Get specific user's failed attempts Get-WinEvent -LogName "AD FS Auditing" | Where-Object { $_.Message -like "*john@company.com*" -and $_.Id -eq 411 } | Select-Object TimeCreated, Message
# Check if failures are legitimate (wrong password) vs attack pattern # Attack: Many failures from different IPs quickly # Legitimate: Few failures from same IP, user requests help ```
Step 3: Check User Lockout Status
```powershell # Check if user is in smart lockout Get-AdfsExtranetLockout -UserPrincipalName "john@company.com"
# Check all locked users Get-AdfsExtranetLockedUserList
# Clear user lockout Set-AdfsExtranetLockout -UserPrincipalName "john@company.com" -Reset
# Verify unlock Get-AdfsExtranetLockout -UserPrincipalName "john@company.com" # Should show: IsExtranetLockout : False ```
Step 4: Adjust Lockout Threshold
```powershell # Increase lockout threshold to reduce false positives Set-AdfsExtranetLockoutConfiguration -LockoutThreshold 50 -ObservationWindow (New-TimeSpan -Minutes 20)
# Recommended thresholds: # Normal environment: 15-20 failed attempts # High security: 10-15 failed attempts # Permissive (reduce false positives): 50+ failed attempts
# The observation window is how long lockout lasts # Recommended: 10-20 minutes # Too long causes user frustration
# Verify new settings Get-AdfsExtranetLockoutConfiguration ```
Step 5: Configure Familiar Locations
```powershell # Smart lockout tracks familiar IPs to reduce false positives # Check current familiar locations Get-AdfsExtranetSmartLockoutFamiliarLocationList
# Add familiar IP for user's office Add-AdfsExtranetSmartLockoutFamiliarLocation -IpAddress "10.0.0.0/24"
# Add VPN range Add-AdfsExtranetSmartLockoutFamiliarLocation -IpAddress "192.168.100.0/24"
# Users from familiar locations get higher threshold tolerance # AD FS learns familiar locations over time
# Clear and rebuild familiar list Clear-AdfsExtranetSmartLockoutFamiliarLocationList
# Force AD FS to relearn # Let users authenticate normally for few days ```
Step 6: Set Smart Lockout Mode
```powershell # Set lockout mode to balance security and usability
# Mode 1: Log only (testing/safe) Set-AdfsProperties -ExtranetLockoutMode AdfsSmartLockoutLogOnly # Lockouts logged but not enforced
# Mode 2: Enforce with familiar location check (recommended) Set-AdfsProperties -ExtranetLockoutMode UnknownFamiliarLocation # Only lockout unfamiliar IPs # Familiar IPs allowed more attempts
# Mode 3: Full enforcement (strict) Set-AdfsProperties -ExtranetLockoutMode AdfsSmartLockoutEnforce # All IPs subject to lockout
# Verify mode Get-AdfsProperties | Select-Object ExtranetLockoutMode ```
Step 7: Check Password Expiration Issues
```powershell # Check if users failing due to expired password # Get users with expired passwords Search-ADAccount -PasswordExpired | Select-Object Name, UserPrincipalName
# Check password policy Get-ADDefaultDomainPasswordPolicy | Select-Object MaxPasswordAge
# Users with expired password may trigger multiple failed attempts
# Solution: Set up password change notification # Or configure AD FS to handle password change requests
# Enable password change on AD FS Set-AdfsProperties -EnableChangePasswordPage $true ```
Step 8: Exclude MFA from Failure Count
```powershell # Check if MFA failures are counted as auth failures # MFA timeout or wrong code may trigger lockout
# Review MFA configuration Get-AdfsAuthenticationProvider | Where-Object {$_.Name -like "*MFA*"}
# Some MFA providers count as additional auth step # Configure MFA to not count toward lockout
# Or increase threshold to account for MFA retries Set-AdfsExtranetLockoutConfiguration -LockoutThreshold 30
# Alternative: Use Azure AD Conditional Access for MFA # MFA handled before AD FS, reducing failure count ```
Step 9: Monitor Smart Lockout Activity
```powershell # Set up monitoring for lockout events # Create scheduled task
$action = New-ScheduledTaskAction -Execute 'PowerShell.exe' -Argument ' $lockouts = Get-WinEvent -LogName "Security" | Where-Object { $_.Id -eq 121 -and $_.TimeCreated -gt (Get-Date).AddHours(-1) } if ($lockouts.Count -gt 5) { Send-MailMessage -To "admin@company.com" -Subject "ALERT: AD FS Lockout Spike" -Body ($lockouts | Out-String) -SmtpServer "smtp.company.com" } '
$trigger = New-ScheduledTaskTrigger -Hourly Register-ScheduledTask -TaskName "MonitorAdfsLockouts" -Action $action -Trigger $trigger -User "SYSTEM"
# Or use Azure Monitor with AD FS Health # Enable alerts for lockout events ```
Step 10: Enable Audit Logging
```powershell # Ensure AD FS audit logging enabled # Check audit settings Get-AdfsProperties | Select-Object LogLevel
# Should include: Success, Failure, Information
# Enable failure logging if not set Set-AdfsProperties -LogLevel @("Success", "Failure", "Information")
# Ensure security audit enabled auditpol /get /subcategory:"Application Generated"
# If disabled, enable auditpol /set /subcategory:"Application Generated" /success:enable /failure:enable
# Review audit log regularly Get-WinEvent -LogName "Security" | Where-Object {$_.Id -in @(411,121,501)} | Select-Object -Last 100 ```
Smart Lockout Recommended Settings
| Setting | Default | Recommended (False Positive Prevention) |
|---|---|---|
| LockoutThreshold | 15 | 30-50 |
| ObservationWindow | 20min | 10-20min |
| Mode | LogOnly | UnknownFamiliarLocation |
Verification
```powershell # After adjusting settings
# 1. Verify new threshold Get-AdfsExtranetLockoutConfiguration | Select-Object LockoutThreshold, ObservationWindow
# 2. Verify mode Get-AdfsProperties | Select-Object ExtranetLockoutMode
# 3. Test user authentication # Have user try authentication # Check if locked incorrectly
# 4. Monitor for new lockouts Get-WinEvent -LogName "Security" | Where-Object {$_.Id -eq 121} | Select-Object -Last 10
# 5. Check locked user count Get-AdfsExtranetLockedUserList | Measure-Object
# Should decrease over time with correct settings
# 6. Review familiar locations learned Get-AdfsExtranetSmartLockoutFamiliarLocationList | Measure-Object
# Should have office IPs after users authenticate ```
Prevention
To prevent AD FS Extranet Smart Lockout issues from recurring, implement these proactive measures:
1. Monitor Lockout Events
groups:
- name: ad-fs-lockout
rules:
- alert: ADFSHighLockoutRate
expr: |
rate(adfs_extranet_lockouts_total[5m]) > 0.1
for: 5m
labels:
severity: warning
annotations:
summary: "High rate of AD FS extranet lockouts"2. Configure Smart Lockout Thresholds
```powershell # Set appropriate lockout thresholds Set-AdfsProperties -ExtranetLockoutThreshold 15 -ExtranetObservationWindow (New-TimeSpan -Hours 1)
# Enable Smart Lockout Set-AdfsProperties -EnableExtranetSmartLockout $true
# Configure trusted IPs (bypass lockout) Set-AdfsProperties -ExtranetLockoutRequirePDC $false ```
3. Monitor for Attack Patterns
```powershell # Check lockout events Get-WinEvent -LogName "AD FS/Admin" | Where-Object {$_.Id -eq 312} | Select-Object TimeCreated, Message
# Check failed logins per user Get-AdfsDeviceRegistration | Select-Object *
# Export failed login analysis Get-WinEvent -LogName "Security" | Where-Object {$_.Id -eq 4625} | Select-Object TimeCreated, @{N='User';E={$_.Properties[5].Value}}, @{N='IP';E={$_.Properties[19].Value}} | Export-Csv failed_logins.csv ```
Best Practices Checklist
- [ ] Monitor lockout events
- [ ] Configure appropriate thresholds
- [ ] Enable Smart Lockout
- [ ] Document trusted IP ranges
- [ ] Test lockout recovery procedure
- [ ] Train helpdesk on lockout resolution
Related Issues
- [Fix AD FS Token Signature Validation Fails](/articles/fix-ad-fs-token-signature-validation-fails-key-rollover)
- [Fix Azure AD Connect Staging Mode Triggers Production Sync](/articles/fix-ad-connect-staging-mode-triggers-production-sync)
- [Fix AD FS Authentication Failed](/articles/fix-ad-fs-authentication-failed)
Related Articles
- [WordPress troubleshooting: Fix S3 Configuration Error - Complete Tr](fix-s3-configuration-error)
- [WordPress troubleshooting: Fix RDS Configuration Error - Complete T](fix-rds-configuration-error)
- [Technical troubleshooting: Fix Certificate Based Client Authentication Mtls C](certificate-based-client-authentication-mtls-cert-cn-mismatch)
- [Fix Fix 8021x Clients Still Authenticating Against Old Policy Server After Migration Issue in Identity & Access](fix-8021x-clients-still-authenticating-against-old-policy-server-after-migration)
- [Fix Active Directory Account Lockout Policy Too Aggressive](fix-active-directory-account-lockout-policy-too-aggressive)
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "TechArticle", "headline": "Fix AD FS Extranet Smart Lockout Blocks Legitimate Users", "description": "Troubleshoot AD FS smart lockout blocking legitimate users. Calibrate thresholds, check audit logs, and adjust settings.", "url": "https://www.fixwikihub.com/fix-ad-fs-extranet-smart-lockout-blocks-legitimate-users", "publisher": { "@type": "Organization", "name": "FixWikiHub", "url": "https://www.fixwikihub.com" }, "author": { "@type": "Person", "name": "FixWikiHub Editorial Team" }, "datePublished": "2026-04-03T19:53:46.576Z", "dateModified": "2026-04-03T19:53:46.576Z" } </script>