AADSTS50057: the user account is disabled
AADSTS50057
Microsoft Entra ID refused the sign-in because the user's account is disabled in the tenant that owns the application, so no token is issued until the account is enabled again.
From Microsoft's documentation, checked 24 Nov 2026.
AADSTS50057: UserDisabled - The user account is disabled. The user object in Active Directory backing this account has been disabled.Also searched as: UserDisabled · The user account is disabled · Error code 50057 · AADSTS50057 user account is disabled · Entra sign-in blocked account disabled
What it means
Every Microsoft Entra ID user object has an accountEnabled property that is true when the account is enabled and false otherwise. When it is false in the resource tenant, sign-in to any app integrated with Microsoft Entra ID fails with AADSTS50057. Microsoft's guidance is to find out first why the account was disabled: if it was meant to be, access is blocked as expected and nothing should change; if it was disabled by mistake, the tenant's admins re-enable it.
Common causes
- The user object is disabled in the resource tenant.
- For an account synchronized from on-premises Active Directory, the user object in Active Directory backing the account has been disabled.
From Microsoft's documentation
How to fix it
Confirm the account is disabled
With Microsoft Graph PowerShell, read the user's accountEnabled property. It isn't returned by default, so ask for it with -Property. False means the account is disabled. If the user is a guest from another organization, the account that matters is the one in the resource tenant, the tenant that owns the app.
Get-MgUser -UserId <user-principal-name> -Property AccountEnabled, DisplayName | Select-Object DisplayName, AccountEnabled
Find out why it was disabled before changing it
Ask the resource tenant's owners why the account is disabled. If it is supposed to be disabled, for example for someone who has left, do nothing: access is blocked as intended. Only carry on if it was disabled by mistake.
Re-enable the account where it is managed
For a cloud account, set accountEnabled back to true with Update-MgUser (needs User.EnableDisableAccount.All and User.Read.All; this is a sensitive action, so in delegated use Privileged Authentication Administrator is the least privileged role that can change it for any administrator), or in the Microsoft Entra admin center under Entra ID > Users > the user > Edit properties > Settings. For an account whose source of authority is on-premises Active Directory, enable it in Active Directory (for example with Enable-ADAccount) and wait for the next synchronization cycle: Microsoft doesn't recommend changing Account Enabled in Entra ID for synced users except in an emergency.
Update-MgUser -UserId <user-principal-name> -AccountEnabled
How to confirm it's fixed
- Get-MgUser with -Property AccountEnabled now shows True for the user.
- The user signs in to the app again without the AADSTS50057 error.
Related notes
Microsoft's AADSTS50057 troubleshooting page still names the older Azure AD PowerShell cmdlet Set-AzureADUser with -AccountEnabled $true. The current Microsoft Graph PowerShell equivalent is Update-MgUser, whose -AccountEnabled parameter is a switch.
Related engineering templates
Continue the investigation
Recommended reading
More from KBY that goes with this error.
- Microsoft Entra ID error
AADSTS50020: user from another identity provider doesn't exist in the tenant
2 min read
Follow Microsoft Entra ID failures and fixes
A short email about twice a week for IT teams: new runbooks, configuration traps and fixes, and the Microsoft and Apple deadlines coming up.