Entra ID sign-in errors, read for security
Every AADSTS error in your sign-in logs is either a typo, a misconfiguration or someone attacking your tenant. Microsoft documents what each code means. This reference adds what it means for security: whether it is an attack signal, how Conditional Access interacts with it, and the KQL to find it in SigninLogs.
By Bram Brinkmeier, identity security engineer. Every code page quotes its sources; many are reproduced in a lab tenant, and the pages say which.
Guides
Section titled “Guides”- Azure CLI: "Resource was disallowed by policy. Reasons: MFA is required": Azure CLI, PowerShell or IaC fails with RequestDisallowedByPolicy and MFA is required. What mandatory MFA phase 2 means and how to fix people and automation.
- How to detect MFA fatigue (push bombing) in Microsoft Entra ID: Detect MFA fatigue in Entra ID: read 500121, 50074, 50076 and 50079, parse AuthenticationDetails with KQL, spot an approved prompt, and respond.
- How to detect password spraying in Microsoft Entra ID (with KQL): Find password spraying in Entra ID sign-in logs: which AADSTS codes to read, how smart lockout behaves, four KQL queries, and how to respond.
- Token replay attack on Microsoft 365: check Entra ID for the 1337 Services campaign: Stolen M365 sessions replayed from 193.26.115.0/24: KQL for sign-ins, rogue DESKTOP- devices and swapped MFA methods, and what a password reset misses.
- After a web-server breach like PHP2Shell: patch, then hunt credential reuse in Entra ID: PHP2Shell (CVE-2026-109618/109619): fixed versions, interim mitigations, then KQL to find stolen server credentials in Entra ID and Defender for Identity.
- ConnectWise Cloud Backup compromise: check your Entra ID tenant for a compromised vendor app: Was the ConnectWise (SkyKick) app abused in your tenant? App IDs, KQL for sign-ins, roles and new secrets, and why you disable the app instead of deleting it.
- How to investigate consent phishing (illicit consent grants) in Entra ID: Find the consent event, read the sign-in codes around it, and remove an attacker's app from Entra ID. Why a password reset and MFA don't fix it.
- After a compromise: revoke Entra ID sessions and prove it worked: Revoke a compromised user's Entra ID sessions, disable their devices, and use 50173, 50133 and 135011 sign-in rows to prove the attacker was cut off.
- SMTP AUTH basic authentication is being disabled in Exchange Online (end of December 2026): find and fix the apps and scanners that still use it: Exchange Online turns SMTP AUTH basic auth off by default for existing tenants at the end of December 2026. Find what uses it with KQL and PowerShell.
- Why is the user asked to sign in again? AADSTS70043, 700082, 50173, 50133, 50076: Tell five Entra ID re-sign-in codes apart: 70043, 700082, 50173, 50133 and 50076. Cause, attack signal, log table and what to check first, plus KQL.
Error codes by attack signal
Section titled “Error codes by attack signal”Codes with a high or medium attack signal. Every code, by number.
| Code | What it means | Attack signal | ATT&CK technique |
|---|---|---|---|
50053 | Account locked or sign-in blocked | High | T1110.003 Brute Force: Password Spraying T1110.001 Brute Force: Password Guessing |
50079 | User must register for MFA | High | T1078.004 Valid Accounts: Cloud Accounts T1098.005 Account Manipulation: Device Registration |
50126 | Invalid username or password | High | T1110.003 Brute Force: Password Spraying T1110.001 Brute Force: Password Guessing |
50027 | JWT token is invalid or malformed | Medium | - |
50034 | user account not found in the tenant | Medium | T1087.004 Account Discovery: Cloud Account T1110.003 Brute Force: Password Spraying |
50054 | Old password used for sign-in (not in Microsoft's list) | Medium | - |
50055 | Password expired | Medium | T1110.003 Brute Force: Password Spraying T1078.004 Valid Accounts: Cloud Accounts |
50057 | the user account is disabled | Medium | T1110.003 Brute Force: Password Spraying T1078.004 Valid Accounts: Cloud Accounts |
50072 | User needs to enroll for second factor authentication | Medium | T1078.004 Valid Accounts: Cloud Accounts T1098.005 Account Manipulation: Device Registration |
50074 | strong authentication is required (MFA) | Medium | T1621 Multi-Factor Authentication Request Generation T1078.004 Valid Accounts: Cloud Accounts |
50076 | MFA required to access the resource | Medium | T1078.004 Valid Accounts: Cloud Accounts T1110.003 Brute Force: Password Spraying |
50097 | device authentication is required | Medium | T1078.004 Valid Accounts: Cloud Accounts |
50125 | Password reset registration interrupt | Medium | T1078.004 Valid Accounts: Cloud Accounts |
50173 | Grant expired because it was revoked | Medium | T1550.001 Use Alternate Authentication Material: Application Access Token |
53000 | Device not compliant | Medium | T1078.004 Valid Accounts: Cloud Accounts T1557 Adversary-in-the-Middle T1539 Steal Web Session Cookie |
53001 | Device not domain joined | Medium | T1078.004 Valid Accounts: Cloud Accounts |
53003 | Access blocked by Conditional Access | Medium | T1078.004 Valid Accounts: Cloud Accounts |
65001 | User or admin has not consented to the app | Medium | T1528 Steal Application Access Token T1566.002 Phishing: Spearphishing Link |
70002 | error validating client credentials | Medium | T1078.004 Valid Accounts: Cloud Accounts |
70016 | Device code authorization is pending | Medium | - |
90094 | "Need admin approval" screen | Medium | T1566.002 Phishing: Spearphishing Link T1528 Steal Application Access Token |
500121 | User didn't complete the MFA prompt | Medium | T1621 Multi-Factor Authentication Request Generation |
530002 | Your device is required to be compliant (not in Microsoft's list) | Medium | - |
530003 | Your device is required to be managed (not in Microsoft's list) | Medium | - |
530031 | Access policy does not allow token issuance (not in Microsoft's list) | Medium | - |
530032 | Blocked by a tenant security policy | Medium | T1078.004 Valid Accounts: Cloud Accounts T1110.003 Brute Force: Password Spraying |
5000224 | tenant blocked for suspected fraud | Medium | - |
7000215 | Invalid client secret is provided | Medium | T1078.004 Valid Accounts: Cloud Accounts |
Microsoft Graph error codes
Section titled “Microsoft Graph error codes”Graph returns named error codes rather than AADSTS numbers, and Microsoft’s current error reference lists HTTP statuses and shows one example error body, but has no list of the codes themselves. Every Graph error code, with the exact message, the request that produces it, and what was measured in a lab tenant.
Recently updated
Section titled “Recently updated”- : AADSTS53003: Access blocked by Conditional Access
- : AADSTS50001 fix: resource disabled or doesn't exist
- : AADSTS500014 fix: resource service principal is disabled
- : AADSTS500021 fix: tenant blocked by tenant restrictions
- : AADSTS5000224 fix: tenant blocked for suspected fraud
- : AADSTS50013 fix: invalid assertion in on-behalf-of flow
- : AADSTS50034 fix: user account not found in the tenant
- : AADSTS50057 fix: the user account is disabled
About this reference
Section titled “About this reference”Written by Bram Brinkmeier, a cloud and identity security engineer. Every page quotes and links Microsoft’s documentation. Each page shows how far it has been checked: based on Microsoft’s documentation, reproduced in a lab tenant (with or without its sign-in log row and KQL checked), or lab-verified. Pages for codes Microsoft’s reference doesn’t list say so at the top. How pages are written and checked.