Skip to content
Contact

AADSTS50057 fix: the user account is disabled

Short answer: AADSTS50057 means the user account is disabled in Microsoft Entra ID, so sign-in was refused. After an offboarding it is expected. The security signal is volume and source: many disabled accounts tried from one IP suggests a password spray working from an old user list. Hunt it with ResultType == "50057".

Fix: Admin: if the account should be active, re-enable it (Entra admin center > Users > the user > Edit properties > Account enabled). Synced users: enable it in on-premises AD and sync. When disabling, also revoke sessions. User: ask your admin; this isn't a password problem. Full steps

At a glance
CodeAADSTS50057
Microsoft nameUserDisabled
CategoryCredentials and lockout
TypeFailure
Attack signalMedium: worth a look in context
MITRE ATT&CKT1110.003 Brute Force: Password Spraying, T1078.004 Valid Accounts: Cloud Accounts
Where to lookSigninLogs, AADNonInteractiveUserSignInLogs
Microsoft lookuplogin.microsoftonline.com/error?code=50057

Microsoft’s description:

UserDisabled: The user account is disabled. The user object in Active Directory backing this account has been disabled. An admin can re-enable this account through PowerShell

The account exists but is switched off (accountEnabled = false), so Entra refuses the sign-in. Microsoft’s wording mentions the Active Directory object, but the code is the same for a cloud-only account disabled in Entra ID. In hybrid tenants the disable is often done on-premises and synced up, so check both places when re-enabling.

On 25 October 2026 an automated lab run sent a token request with the correct password for a test user whose account was disabled. Entra returned AADSTS50057 with this first line:

AADSTS50057: The user account is disabled.

That confirms the code and its wording at the token endpoint.

The same attempt in the lab tenant’s sign-in log (Entra admin center, interactive user sign-ins), with identifiers left out:

Field Value in the lab row
Status Failure
Sign-in error code 50057
Failure reason The user account is disabled.
Authentication details Password (password in the cloud), succeeded: false
Authentication requirement Single-factor authentication
Conditional Access Not Applied
Client app Mobile Apps and Desktop clients
Resource Microsoft Graph
User type Member
Cross tenant access type None

Two things on this page hold in the real row: Conditional Access shows Not Applied, because the sign-in stops before policies are evaluated, and the password check itself is recorded as not succeeded. The KQL below was run on the lab rows (how). The 14-day per-user query found both lab users. The spray query returned nothing as written, as expected for one disabled user per run; with its threshold lowered to 1 it found both source IPs.

If the account should be active, re-enable it. If it was disabled on purpose (leaver, retired service account), nothing is broken and the sign-in attempts are the thing to clean up.

  • Cloud-only user: Entra admin center > Users > select the user > Edit properties > Account enabled. Or Graph: Update-MgUser -UserId <id> -AccountEnabled:$true.
  • Synced user: enable the account in on-premises Active Directory, then run a sync. A cloud change is overwritten by the next sync.
  • Leaver still trying: find the device or app retrying and remove the stale profile or token.

Microsoft’s password spray playbook lists “50057 - User account was disabled” among the sign-in events to review in a spray investigation. Most 50057 rows are still harmless. Read the pattern:

Pattern Likely meaning
One recently offboarded user, from their old device or usual IP A phone, mail client or synced app still trying with the old account. Benign, but clean it up.
Rows in the non-interactive log for a leaver An app still holding a token for that user and retrying silently. Revoke sessions.
Many different disabled accounts from one IP In practice, a spray working from an old or leaked user list. Disabled leavers and shared mailboxes are on those lists. (T1110.003)
50057 mixed with 50126 and 50034 from the same IP The same spray hitting live, disabled and non-existent names.
A disabled admin or service account tried from an unfamiliar IP Someone has a credential for an account you retired. Find out where it came from.
A 50057 account that suddenly shows a success The account was re-enabled. Check the audit log for who did it.

Because the account is disabled, sign-in stops at the credential stage. Expect ConditionalAccessStatus = notApplied on these rows, as Conditional Access only runs after the first factor succeeds.

One IP trying several disabled accounts in a day:

SigninLogs
| where TimeGenerated > ago(1d)
| where ResultType == "50057"
| summarize DisabledUsers = dcount(UserPrincipalName),
Attempts = count(),
Users = make_set(UserPrincipalName, 20),
Clients = make_set(ClientAppUsed, 5)
by IPAddress
| where DisabledUsers >= 3
| sort by DisabledUsers desc

What is still trying to use disabled accounts, interactive and non-interactive together:

union SigninLogs, AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(14d)
| where ResultType == "50057"
| summarize Attempts = count(),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated),
IPs = make_set(IPAddress, 10)
by UserPrincipalName, AppDisplayName, ClientAppUsed, IsInteractive
| sort by LastSeen desc

The threshold of 3 in the first query is a starting point. Tune it to how many leavers you normally see.

How do Conditional Access and MFA affect it?

Section titled “How do Conditional Access and MFA affect it?”
  • Conditional Access does not evaluate a 50057. The account is refused before CA runs.
  • AuthenticationRequirement on these rows says nothing about whether MFA is enforced in your tenant. MFA was never reached.
  • Disabling the account blocks new sign-ins. It does not by itself cut tokens an app already holds. Microsoft’s revoke-access guidance pairs disabling the account with revoking sessions (Revoke-MgUserSignInSession) and already-issued access tokens keep working until they expire: by default 60 to 90 minutes.

For the user: if you still need access, ask your admin. A disabled account is an admin decision, not a password problem. Remove old work accounts from personal phones and mail apps.

For admins:

  1. If the account should be active, re-enable it. Microsoft’s description says an admin can do this through PowerShell. In hybrid tenants, re-enable it in on-premises AD and let it sync.
  2. If it is a leaver, find the device or app in the second query and remove the account from it.
  3. When you disable an account for offboarding or an incident, also revoke sessions.
  4. If the first query shows a spray, check whether the same IP produced any success, 50076/50074 or 53003 for active accounts. Those accounts had a correct password.

More: 135011, 500341, 500571

Guides that cover this code

Sources

  1. Access tokens in the Microsoft identity platform
  2. Microsoft Entra authentication and authorization error codes
  3. Password spray investigation (Microsoft incident response playbook)
  4. Revoke user access in Microsoft Entra ID
  5. Non-interactive user sign-ins
  6. SigninLogs table reference (Azure Monitor)
Theme