Solution:
Root Cause: Hybrid Account Lockout Propagation via Entra Connect
In hybrid environments using Password Hash Synchronization (PHS) with Enforce Cloud Password Policy for Password Hashes enabled, or Pass-Through Authentication (PTA), account lockout states are governed by on-premises Active Directory Domain Controllers. Bad password attempts made in the cloud are sent to on-premises AD via PTA agents or evaluated locally. When on-premises AD threshold (
LockoutThreshold) is exceeded, the account sets the
badPwdCount and
lockoutTime attributes, disabling authentication across both environments.
Diagnostic Verification:
Open PowerShell on a Domain Controller and inspect bad password count and lockout status:powershell
Get-ADUser -Identity "username" -Properties AccountLockoutTime, BadLogonCount, LastBadPasswordAttempt, LockedOut | Format-List
Review Event Viewer Log Security on Domain Controllers for Event ID 4740 (*A user account was locked out*) to locate the originating caller computer name.Step-by-Step Fix:
1.Identify and Terminate Lockout Source Process:
Search for Event ID 4740 in the DC Security log to identify Caller Computer Name.Log onto the caller machine and use LockoutStatus.exe or PowerShell to identify services, scheduled tasks, persistent drives, or stale browser sessions running under the target user credentials.2.Unlock Account in Active Directory:
powershell
Unlock-ADAccount -Identity "username"
3.Force Delta Synchronization via Entra Connect Sync:
Log onto the Microsoft Entra Connect server and run: powershell
Start-ADSyncSyncCycle -PolicyType Delta
4.Verify Cloud State Resolution:
Check Entra Admin Center to confirm the lockout flag clears after the sync cycle completes.Prevention & Long-Term Monitoring:
Enable Microsoft Entra Password Protection for Active Directory Domain Controllers to synchronize banned password lists and smart lockout logic between cloud and on-premises environments.