Entra ID sign-in error
AADSTS50053: Account locked, or sign-in blocked as risky
AADSTS50053 covers two blocks: smart lockout after wrong passwords, or a sign-in blocked as high risk. How to tell them apart and let the user back in.
AADSTS50053
This error can result from two different reasons: IdsLocked - The account is locked because the user tried to sign in too many times with an incorrect user ID or password.
What it means
One code covers two different blocks. Either smart lockout locked the account after too many wrong passwords, or Microsoft Entra ID blocked the sign-in as malicious, for example from an IP address with malicious activity, whatever the password. Microsoft uses one code so an attacker cannot tell the two apart.
Fix it: tenant admins
- Open the failed sign-in (
Entra ID > Monitoring & health > Sign-in logs, error code 50053) and read the failure reason. It tells you which of the two blocks fired. - Lockout: look at where the failed attempts came from before you end it. Smart lockout counts familiar and unfamiliar locations separately. Failures from places the user never signs in from point to someone guessing the password, not to the user.
- Lockout: you can end it at once for a cloud account by resetting the user's password.
- Lockout threshold and duration are under
Entra ID > Authentication methods > Password protection. Custom values need Microsoft Entra ID P1 or higher. - Risk block (failure reason
Sign-in was blocked by built-in protections due to high confidence of risk): if the client uses legacy authentication, move it to a modern protocol, which clears the block. Add an IP address to trusted locations only when it is a known location of your organisation, such as an office address. Do not add an address you do not control.
Fix it: the person signing in
- Wait and try again: the first lockout lasts one minute and later ones last longer.
- Or reset your password with self-service password reset and choose
I forgot my password, which ends the lockout at once.I know my passworddoes not. - If you did not type a wrong password, tell your IT team. Someone else may be trying to guess it.
What to check in the sign-in log
The failure reason separates the two cases. A run of AADSTS50126 failures just before it points to a lockout.
Related codes
Microsoft sources
- Prevent attacks using smart lockout
- Remediate risks and unblock users
- Microsoft Entra authentication and authorization error codes (the full list)
- Microsoft's live lookup for 50053 (login.microsoftonline.com)
Find who is hitting AADSTS50053
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 == "50053"
| summarize Failures = count(), Last = max(TimeGenerated) by UserPrincipalName, AppDisplayName
| sort by Failures descMicrosoft 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 50053 and createdDateTime ge $since" -All |
Select-Object CreatedDateTime, UserPrincipalName, AppDisplayName, CorrelationIdReading 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.
S01. Microsoft (Microsoft Learn), Microsoft Entra authentication and authorization error codes. Retrieved 2026-11-25.
IdsLocked - The account is locked because the user tried to sign in too many times with an incorrect user ID or password.
Or, sign-in was blocked because it came from an IP address with malicious activity.
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
S44. Microsoft (Microsoft Learn), Prevent Attacks Using Smart Lockout. Retrieved 2026-11-25.
Both unfamiliar and familiar locations have separate lockout counters.
10 failed attempts in Azure Public and Microsoft Azure operated by 21Vianet tenants
The lockout period is one minute at first, and longer in subsequent attempts.
An administrator can unlock a user's cloud account if Smart Lockout has locked them out without waiting for the lockout duration to expire.
If the user chooses I forgot my password during SSPR, the duration of the lockout is reset to 0 seconds
Browse to Entra ID > Authentication methods > Password protection.
Customizing the smart lockout settings with values specific to your organization requires Microsoft Entra ID P1 or higher licenses for your users.
Microsoft Entra ID blocks these malicious sign-ins by default and returns AADSTS50053 - IdsLocked error code, regardless of the password validity.
S45. Microsoft (Microsoft Learn, Microsoft Entra ID Protection), Remediate risks and unblock users. Retrieved 2026-11-25.
If the sign-in is performed from a known location for your company, you can add the IP to the trusted list.
Sign-in was blocked by built-in protections due to high confidence of risk.
Add the IPs being used to sign in to the Trusted location settings
If the sign-in is performed using a legacy protocol, switching to a modern method unblocks the attempt.
S68. Microsoft (login.microsoftonline.com), Microsoft's live error code lookup. Retrieved 2026-11-25.
Only one error code is used to prevent an attacker from distinguishing between the states.
S49. Microsoft (Microsoft Learn), Microsoft Entra security operations for user accounts. Retrieved 2026-11-25.
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.
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.
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.
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.
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
S69. Microsoft (Microsoft Learn, Microsoft Graph PowerShell), Get-MgAuditLogSignIn (Microsoft.Graph.Reports). Retrieved 2026-11-25.
-All List all pages.
