How pages are written and checked
Every page shows one of three states under its title:
- Based on Microsoft documentation; lab test pending. The page quotes and links Microsoft’s documentation, but I haven’t reproduced it in my lab yet. Treat queries and thresholds as starting points and test them in your own workspace.
- Error reproduced in a lab tenant (date). An automated lab run triggered the error at Microsoft’s token endpoint and got the expected code back. The page has a “Reproduced in the lab” section with the scenario and Microsoft’s first-line message as returned. The sign-in log row and the KQL on the page have not been checked against it yet.
- Lab-verified (date). I have reviewed the page myself, triggered the error in my own test tenant, captured the sign-in log row and run every query on the page against it.
No page is lab-verified yet. Some code pages are in the second state, the rest in the first. The steps below describe what a page goes through before it is marked lab-verified.
Pages move from the first state to the second as I work through them. The changelog shows what changed and when.
1. Official meaning first
Section titled “1. Official meaning first”The description is quoted word for word from Microsoft’s error code reference and linked. It is never paraphrased into something it doesn’t say.
2. Security reading, with its evidence
Section titled “2. Security reading, with its evidence”Statements about attacks are backed by Microsoft’s security documentation (smart lockout, the password spray playbook, ID Protection, illicit consent grants) and, once a page is lab-verified, by a lab reproduction. I try to mark where a statement is my own reasoning rather than documented behaviour, but not every page does this consistently yet. Tables headed “Likely meaning” are interpretation, not Microsoft statements.
3. Reproduced in a lab tenant
Section titled “3. Reproduced in a lab tenant”For lab verification, I trigger the error in my own test tenant, capture the sign-in log row, and run every KQL query on the page against it. No production or employer data is used.
The first part runs automatically. A GitHub Actions workflow runs monthly (and on demand) against the lab tenant. It signs in to Microsoft Graph with a federated credential, so no client secret is stored anywhere. It creates temporary test users with random one-time passwords, sends password (ROPC) token requests that should each fail with a specific code, records the code and the first line of Microsoft’s message, then deletes the test users. No passwords or tokens are kept. The results are posted as an issue in the site’s repository and saved in data/lab-runs/. A page whose code came back as expected moves to “Error reproduced in a lab tenant”. The sign-in log and KQL steps are still done separately.
The workflow also registers throwaway app registrations to reach errors that only a particular app configuration produces, such as a missing redirect URI, a wrong client secret or a mismatched federated identity credential. Those apps are deleted at the end of the run, and a sweep at the start removes anything a failed run left behind.
What the lab cannot reach, and why
Section titled “What the lab cannot reach, and why”The lab tenant runs Entra ID Free, and the workflow has no browser, so some codes are out of reach:
| Why | Codes affected |
|---|---|
| Needs Conditional Access or Identity Protection (Entra ID P1 or P2) | 50097, 70043, 70044, 53000, 53001, 53003, 530002, 530003, 530004, 530031, 530032 |
| Needs a real interactive browser sign-in, with a person at the keyboard | 50140, 65004, 90094, 90095, 50158 |
| Needs a registered or joined device | 50155, 700003, 5000611 |
| Needs a second tenant, a guest, or a personal Microsoft account | 16000, 50020, 500200, 500571, 90072 |
| Needs time to pass, such as token lifetimes measured in weeks | 700082, 700081, 50089 |
| Needs permissions I am not willing to grant a scripted runner | 501051, 50133, and the Graph code Authentication_RequestFromNonPremiumTenantOrB2CTenant |
Pages for those codes stay on documentation and user reports, and say so at the top. If you have run one of them in your own tenant and can share a redacted log row, tell me on GitHub and I will credit you.
Microsoft Graph errors are measured the same way
Section titled “Microsoft Graph errors are measured the same way”A second workflow does the same job for Microsoft Graph. It acquires an app-only token with the same federated credential, sends a list of deliberately wrong requests (a missing permission, a bad token, a malformed query, a duplicate value) and records the HTTP status, the error code and the first line of the message for each. Objects it creates are deleted at the end, and tokens are masked in the log. The results go to the Graph error code pages.
Both lab scripts, the workflows that run them and the raw output of every run are public in the dataset repository, so any “reproduced in a lab tenant” claim on this site can be checked against the run that produced it.
Graph errors need this more than AADSTS codes do. Microsoft’s current Graph error reference lists HTTP status codes and names no error codes at all, and most of the named codes are documented only in a retired Azure AD Graph page from 2016. A measurement is often the only current evidence that a code is still returned, and the only way to see where the 2016 wording has drifted.
One limit worth stating: the Graph run uses an app with two narrow permissions and nothing else, which is what makes the permission-denied results meaningful. It also means codes that sit behind a permission the runner does not hold cannot be reached. Authentication_RequestFromNonPremiumTenantOrB2CTenant is the clearest example: reaching it needs AuditLog.Read.All granted, because the permission check fires before the licence check.
4. KQL is tested
Section titled “4. KQL is tested”Every KQL query on the site is checked automatically on each change: Microsoft’s Kusto language service parses it offline against the published column names and types of SigninLogs, AADNonInteractiveUserSignInLogs, AADServicePrincipalSignInLogs, AuditLogs, MicrosoftGraphActivityLogs and related tables. That catches syntax errors, wrong column names and type mistakes (such as comparing the string ResultType with a number). It does not prove a query finds what it claims; that is what the lab step is for.
For lab verification, queries are run against the real SigninLogs, AADNonInteractiveUserSignInLogs, AADServicePrincipalSignInLogs or AuditLogs schema in Log Analytics. Thresholds in queries are starting points and are labelled as such.
The lab tenant runs Entra ID Free, which can’t export sign-in logs to Log Analytics. Until it can, I export the lab rows from the Entra admin center, load only the lab test users’ rows into Azure Data Explorer as a table with the SigninLogs column names, and run each page’s KQL there. Each query is run as written and, where a threshold or time window keeps a small lab sample out, again with the threshold lowered; the page says which. A query whose table the lab rows don’t cover (for example AuditLogs or service principal sign-ins) is marked as not tested. This is weaker than a run in Log Analytics: the column mapping is mine, and columns the export doesn’t contain are missing.
5. Kept current
Section titled “5. Kept current”A monthly automated check (set up, not yet run) compares the start of each code page’s quoted description with Microsoft’s live error lookup and opens an issue if it has changed. I then update the page by hand. Guides are not checked automatically.
Sources and trademarks
Section titled “Sources and trademarks”Quoted documentation © Microsoft Corporation, from the MicrosoftDocs/entra-docs repository (MIT licence). Microsoft, Microsoft Entra and Microsoft Sentinel are trademarks of the Microsoft group of companies; this site is not affiliated with Microsoft.
Codes Microsoft doesn’t list
Section titled “Codes Microsoft doesn’t list”Some codes people hit are missing from Microsoft’s error code reference. This is the normal case rather than the exception for Microsoft Graph error codes, where there is no current reference to be missing from: that hub states, per code, which Microsoft page documents it, whether that page is current, retired or archived, and the exact searches run to establish it. Those pages say so at the top, with the date I checked. Their wording comes, in this order of preference, from a lab reproduction, from another Microsoft page, or from user reports, and each page says which. Pages based only on user reports are the weakest kind on this site; treat them as a starting point.