Entra ID sign-in error

AADSTS50057: User account is disabled

AADSTS50057 means the user account is disabled in the tenant. Check why first, then how to enable a cloud-only account or one synced from Active Directory.

Last updated Checked against Microsoft Learn on Look up another code

AADSTS50057

Passwords and accountsWho fixes it:Tenant admin

The user account is disabled.

Microsoft's description (UserDisabled), from the Microsoft Entra error code reference

What it means

The user object is disabled in the tenant being signed in to. For a user synced from Active Directory, Microsoft's list says the Active Directory object behind the account has been disabled.

Fix it: tenant admins

  1. Find out why the account was disabled before you change it. If it was meant, for a leaver for example, access is blocked as intended.
  2. Cloud-only user: open Entra ID > Users > All users, select the user, select Edit under account status, tick Account enabled and save. Microsoft documents this page for disabling an account; enabling is the same box.
  3. Microsoft Graph PowerShell uses the same switch: Update-MgUser -UserId <id> -AccountEnabled:$true. Microsoft's 50057 article still points to Set-AzureADUser, from a module Microsoft deprecated on 30 March 2024.
  4. User synced from Active Directory: Microsoft's list points to Enable-ADAccount in on-premises Active Directory.

Fix it: the person signing in

  1. Ask the IT team of the organisation that owns the account. Only its admins can enable it.

Related codes

Microsoft sources

Find who is hitting AADSTS50057

Sign-in logs record the code without the AADSTS prefix: as status/errorCode in Microsoft Graph S04 and as ResultType in the SigninLogs table in Log Analytics S05. The SigninLogs and Microsoft Graph queries below cover interactive sign-ins. Non-interactive sign-ins are in the AADNonInteractiveUserSignInLogs table, which documents the error code in ResultSignature S41. If you query that table, test ResultType as well. For one failed sign-in, paste its error message into the lookup to get queries for its Correlation ID.

Log Analytics (KQL), last 7 days

SigninLogs
| where TimeGenerated > ago(7d) and ResultType == "50057"
| summarize Failures = count(), Last = max(TimeGenerated) by UserPrincipalName, AppDisplayName
| sort by Failures desc

Microsoft Graph PowerShell, last 7 days

Connect-MgGraph -Scopes "AuditLog.Read.All"
$since = (Get-Date).ToUniversalTime().AddDays(-7).ToString("yyyy-MM-ddTHH:mm:ssZ")
Get-MgAuditLogSignIn -Filter "status/errorCode eq 50057 and createdDateTime ge $since" -All |
  Select-Object CreatedDateTime, UserPrincipalName, AppDisplayName, CorrelationId

Reading sign-in logs needs at least the Reports Reader role S06; the Graph call needs the AuditLog.Read.All permission S42, and -All returns every page of results S69.

Sources for this page

Microsoft's description is quoted from the Microsoft Entra error code reference; it is Microsoft's text and is not covered by our CC BY 4.0 licence. The cause and fix steps are our own wording, published under CC BY 4.0; each source below is the Microsoft page they rest on, with the passage we checked. Rules for every page are in the methodology.

  1. S01. Microsoft (Microsoft Learn), Microsoft Entra authentication and authorization error codes. Retrieved 2026-11-25.

    The user object in Active Directory backing this account has been disabled.

    Error codes are subject to change at any time in order to provide more granular error messages

    Error codes and messages are subject to change. For the most current info, take a look at the

    You can also link directly to a specific error by adding the error code number to the URL

  2. S48. Microsoft (Microsoft Learn), Error AADSTS50057 - User account is disabled. Retrieved 2026-11-25.

    The user object is disabled on the resource tenant.

    Engage the resource tenant owners to determine why the user account is disabled.

    One of the options to re-enable the account is using PowerShell to set the -AccountEnabled parameter to $true, as described in the Set-AzureADUser cmdlet reference.

  3. S47. Microsoft (Microsoft Learn), Revoke user access in an emergency in Microsoft Entra ID. Retrieved 2026-11-25.

    In Properties, clear Account enabled, and then select Save.

    Update-MgUser -UserId $User.Id -AccountEnabled:$false

    deprecated as of March 30, 2024

  4. S04. Microsoft (Microsoft Learn, Microsoft Graph), signIn resource type. Retrieved 2026-11-25.

    Supports $filter (eq) on errorCode property.

    The request ID sent from the client when the sign-in is initiated. Used to troubleshoot sign-in activity.

  5. S05. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference - SigninLogs. Retrieved 2026-11-25.

    Provides the 5-6 digit error code that's generated during a sign-in event. 0 indicates success; other values are failures.

    The identifier that's sent from the client when sign-in is initiated.

  6. S06. Microsoft (Microsoft Learn), How to troubleshoot sign-in errors. Retrieved 2026-11-25.

    Reports Reader is the least privileged role required to access the activity logs.

    any user can access their own sign-ins from https://mysignins.microsoft.com.

  7. S41. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference - AADNonInteractiveUserSignInLogs. Retrieved 2026-11-25.

    Contains the error code, if any, for the sign-in operation.

  8. S42. Microsoft (Microsoft Learn, Microsoft Graph), List signIns. Retrieved 2026-11-25.

    To avoid having the request time out, apply the $filter parameter with a time range for which to get all sign-ins

    Sign-ins that are interactive in nature

  9. S69. Microsoft (Microsoft Learn, Microsoft Graph PowerShell), Get-MgAuditLogSignIn (Microsoft.Graph.Reports). Retrieved 2026-11-25.

    -All List all pages.

Back to the AADSTS Error Code Lookup · All 351 codes