Home › Entra ID › AADSTS50057

Entra ID · AADSTS50057 · Windows 11 22H2

Entra ID AADSTS50057 Windows 11 Sign-In Blocked - User Account Disabled

The error occurs when a user account is disabled in Azure Active Directory. To fix, enable the account via Azure AD admin center or resolve lifecycle management policies.

Error Details

FactValueSourceNote
Exact error stringAADSTS50057Azure AD sign-in logs or Windows event logs-> Indicates user account is disabled
Affected OS build rangeWindows 11 22H2Microsoft Entra ID documentation-> Applies to all versions of Windows 11
Registry key or OMA-URI involvedNoneEntra ID troubleshooting guide-> Error is Azure AD-specific, no local registry involvement
Relevant service/endpoint URLhttps://portal.azure.com/#blade/Microsoft_AAD_IAM/UserManagementMenuBlade/member/userId/Azure AD admin center-> Use to enable user account
Log line signatureAADSTS50057: User account is disabledEntra ID sign-in activity logs-> Appears in Azure AD audit logs

Log Files to Check

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:

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 like Disable-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:
  1. 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]
  2. 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.
  3. 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
  4. 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

Error CodeDescription
AADSTS50057User account is disabled (this error)
AADSTS50106Account locked due to too many failed login attempts
AADSTS50058Password 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

Prevention

To avoid recurrence: - Implement monitoring for Azure AD account disablement events using Azure Monitor or Logic Apps. - Regularly audit lifecycle management policies to ensure they align with organizational needs. - Train administrators on proper account management procedures and the implications of disabling accounts. Consider implementing a policy baseline that requires confirmation before disabling user accounts, especially in critical roles. Use Intune or MEM to enforce consistent directory hygiene across your organization.

Sources & References

Related Guides

Get new error code fixes by email

Product-specific solutions for Intune, Autopilot, SCCM and Entra ID — straight to your inbox. No spam.