Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | AADSTS50057 | Azure AD sign-in logs or Windows event logs | -> Indicates user account is disabled |
| Affected OS build range | Windows 11 22H2 | Microsoft Entra ID documentation | -> Applies to all versions of Windows 11 |
| Registry key or OMA-URI involved | None | Entra ID troubleshooting guide | -> Error is Azure AD-specific, no local registry involvement |
| Relevant service/endpoint URL | https://portal.azure.com/#blade/Microsoft_AAD_IAM/UserManagementMenuBlade/member/userId/ | Azure AD admin center | -> Use to enable user account |
| Log line signature | AADSTS50057: User account is disabled | Entra ID sign-in activity logs | -> Appears in Azure AD audit logs |
Log Files to Check
C:\ProgramData\Microsoft\Azure AD Connect\Trace.logC:\Program Files\Microsoft Azure Active Directory Connect\ADSyncLog\ADSync.logC:\Windows\System32\winevt\Logs\Security.evtx
What This Error Actually Means
The error code AADSTS50057 indicates that a user account has been disabled in Azure Active Directory (Azure AD), preventing successful sign-in. This specific error is generated by the Azure AD authentication service when it detects that an account has been explicitly disabled by an administrator, through automated lifecycle management policies, or due to synchronization conflicts with on-premises directories. The error message typically appears in Windows event logs or Azure AD sign-in activity logs and is accompanied by a detailed description: "AADSTS50057: User account is disabled." This issue primarily affects users attempting to authenticate to resources protected by Azure AD, such as Microsoft 365 services, managed applications, or hybrid environments where Azure AD sync with on-premises Active Directory (AD) is configured. The error can manifest during interactive logins, application sign-ins, or automated processes relying on Azure AD tokens.Affected Versions and Scope
This error is specific to Windows 11 22H2 and does not affect other operating systems or versions of Windows. However, the underlying issue (disabled user accounts) can occur in any environment where Azure AD is used for authentication, regardless of the client OS. The problem is tenant-wide if a lifecycle management policy disables accounts across the entire directory but may also be isolated to specific users or groups affected by administrative actions or sync issues. The error does not occur in environments where: - Users are enabled and have valid credentials. - Azure AD synchronization with on-premises AD is functioning correctly without conflicts. - Lifecycle management policies are not configured to disable accounts automatically.Where To Look First: Logs and Event IDs
To diagnose this issue, examine the following log files and event IDs: 1. **Windows Security Log (C:\Windows\System32\winevt\Logs\Security.evtx):** - Search for Event ID 4625, which indicates an account disabled failure during authentication. - Use PowerShell to filter these events:Get-WinEvent -LogName "Security" -FilterXPath "*[System[(EventID=4625)]]"
2. **Azure AD Sign-In Logs (/var/log/azuread_signin_logs.json):**
- Look for the exact error string: "AADSTS50057: User account is disabled."
- Use jq or similar tools to parse JSON logs:
jq '.[] | select(.error_code == "AADSTS50057")' /var/log/azuread_signin_logs.json
3. **Azure AD Activity Logs (via Azure Portal):**
- Navigate to the Microsoft Entra admin center and review sign-in activity for disabled account events.
Azure AD Connect Logs
If sync issues are suspected, check the following log files on the sync server:
C:\ProgramData\Microsoft\Azure AD Connect\Trace.log— primary synchronisation trace logC:\Program Files\Microsoft Azure Active Directory Connect\ADSyncLog\ADSync.log— connector operations log
Open the log with PowerShell: Get-Content "C:\ProgramData\Microsoft\Azure AD Connect\Trace.log" -Tail 100
Root Causes
The AADSTS50057 error can stem from several distinct causes:1. Administrative Account Disablement
An administrator may have explicitly disabled a user account in Azure AD, either through the Azure Portal or via PowerShell cmdlets likeDisable-AzureADUserAccount. This is often done as part of user offboarding or due to suspected security risks.
2. Sync Conflict with On-Premises AD
If your organization uses Azure AD Connect for directory synchronization, a conflict between on-premises and cloud directories can result in accounts being disabled. For example, if an account is deleted in on-premises AD but not properly synchronized to Azure AD, it may remain disabled.
3. Automated Lifecycle Management Policies
Azure AD lifecycle management policies can automatically disable accounts based on criteria such as inactivity periods or specific dates. Review these policies via the Azure Portal to ensure they are configured correctly and not inadvertently disabling valid users.
Fix Procedure
Follow these steps to resolve the AADSTS50057 error:
- Enable the Disabled Account:
- Navigate to the Microsoft Entra admin center:
https://portal.azure.com/#blade/Microsoft_AAD_IAM/UserManagementMenuBlade/member/userId/.
- Locate the disabled user and enable their account under the "Account" section.
- Alternatively, use PowerShell:
Enable-AzureADUserAccount -ObjectId [user-object-id]
- Resolve Sync Conflicts:
- Check Azure AD Connect synchronization status via
Get-ADSyncWaitStatistics.
- Force a directory sync using Start-ADSyncSyncCycle -Type Initial.
- Investigate and resolve discrepancies between on-premises AD and Azure AD.
- Review Lifecycle Management Policies:
- Navigate to "Lifecycle management" in the Microsoft Entra admin center.
- Modify or disable policies that may be incorrectly flagging valid users for disabling.
- Use PowerShell to list lifecycle policies:
Get-MgIdentityGovernanceLifecyclePolicy
- Verify Account Status:
- After enabling the account, confirm its status via:
Get-MgUser -UserId [user-object-id] | Select-Object accountEnabled
Important: Enabling accounts in Azure AD does not automatically propagate to on-premises AD. Ensure synchronization is functioning correctly or manually enable the account in your on-premises directory if necessary.
Error Code Variants
https://portal.azure.com/#blade/Microsoft_AAD_IAM/UserManagementMenuBlade/member/userId/.
- Locate the disabled user and enable their account under the "Account" section.
- Alternatively, use PowerShell:
Enable-AzureADUserAccount -ObjectId [user-object-id]
Get-ADSyncWaitStatistics.
- Force a directory sync using Start-ADSyncSyncCycle -Type Initial.
- Investigate and resolve discrepancies between on-premises AD and Azure AD.
Get-MgIdentityGovernanceLifecyclePolicy
Get-MgUser -UserId [user-object-id] | Select-Object accountEnabled
| Error Code | Description |
|---|---|
| AADSTS50057 | User account is disabled (this error) |
| AADSTS50106 | Account locked due to too many failed login attempts |
| AADSTS50058 | Password change required; user must reset password before proceeding |
Verification
After implementing the fix, verify success by: - Checking Azure AD sign-in logs for successful authentication attempts. - Confirming that the affected user can log in to Azure AD-protected resources. - Reviewing Windows Security logs for Event ID 4625 to ensure it no longer appears. Use PowerShell to validate account status:Get-MgUser -UserId [user-object-id] | Select-Object userPrincipalName,accountEnabled