Entra ID: when a failed sign-in means the password was right
“0 indicates success; other values are failures.”
That’s the official description of ResultType in the SigninLogs table reference. It’s accurate. It also nudges you toward a misreading that can be expensive: assuming a failed sign-in is one where the attacker got nothing.
Some of those “failures” say the exact opposite: the password was right, and something else stopped the sign-in. For an analyst that difference is huge. On one side, a password spray (T1110.003) that went nowhere; on the other, an account whose password the attacker now knows, protected only by whatever comes next.
The official detections already know
Rather than go on a hunch, I looked at how Microsoft writes its own rules. The MIT-licensed Azure-Sentinel repository holds the analytic rules published for Microsoft Sentinel. I pulled every one that queries SigninLogs (commit 4aee8b861e8f, October 16, 2026): 74 rules. Here are the fields they actually use:

No surprise that the top four tell most of the story: who (UserPrincipalName), from where (IPAddress), with what result (ResultType), against which app (AppDisplayName). The interesting part is in the third.
Look at how these rules filter ResultType and a pattern shows up quickly. The “Password spray attack against Microsoft Entra ID application” rule (version 1.0.7) declares two lists at the top of its query:
let failureCodes = dynamic([50053, 50126, 50055]); // invalid password, account is locked - too many sign ins, expired password
let successCodes = dynamic([0, 50055, 50057, 50155, 50105, 50133, 50005, 50076, 50079, 50173, 50158, 50072, 50074, 53003, 53000, 53001, 50129]);
successCodes is the key. Alongside 0, its authors put 50074 and 50076 (MFA required), 53000, 53001 and 53003 (Conditional Access) and a dozen more. To them those are successes from the attacker’s point of view, even though ResultType files them as failures.
Other rules in the repository make a related call: nine of them always exclude 50140 and eight exclude 50125 from the failures they count. Both are normal interruptions in the sign-in flow, not errors.
Why that makes sense
The reasoning fits in one sentence from the Conditional Access documentation: “Conditional Access policies are enforced after first-factor authentication is completed.” If a sign-in is blocked by Conditional Access, or stopped because MFA is required, the password has already been accepted.
Combine that with the Entra error code reference and the codes fall into four families:

The middle family is the one that matters. A run of 50126 from one IP is a password spray in progress. A 50074 or 53003 in the middle of that run is an account where the attacker found the right password. MFA or Conditional Access stopped them this time. Nothing guarantees it will next time: from another country, through another app, or with a tired user who eventually approves a push notification.
The last family deserves a line too. Microsoft describes 50140 (KmsiInterrupt) as “an expected part of the sign in flow”: it’s the “Stay signed in?” prompt. 50125 flags a sign-in interrupted by a password reset or registration step. Not errors. Screens. Counting them as failures inflates any spray threshold, which is exactly why so many official rules leave them out.
A fun detail in the official rule: 50055 (expired password) sits in both lists at once, failureCodes and successCodes. That’s probably deliberate. The password typed was the right one; it had just expired. Both readings are true depending on the question you’re asking.
The query I’d run
From there the hunting question is simple: which IPs fail passwords across many accounts while also getting, for some accounts, a code that implies the password was correct?
// IPs that fail passwords across many accounts while also getting, for some
// accounts, a result code that implies the password was right
let window = 1d;
let wrongPassword = dynamic(["50126"]);
let rightPassword = dynamic(["0", "50055", "50072", "50074", "50076", "50079", "50158", "53000", "53001", "53003"]);
SigninLogs
| where TimeGenerated > ago(window)
| summarize FailedAccounts = dcountif(UserPrincipalName, ResultType in (wrongPassword)),
RightPasswordAccounts = make_set_if(UserPrincipalName, ResultType in (rightPassword), 50),
Codes = make_set_if(ResultType, ResultType in (rightPassword), 20)
by IPAddress
| where FailedAccounts >= 10 and array_length(RightPasswordAccounts) > 0
| sort by FailedAccounts desc
Three notes before it goes anywhere near production. The codes are quoted because ResultType is a string in SigninLogs. I included 0 in the “right password” list, which will surface corporate egress IPs where typos and dozens of successful user sign-ins mix; exclude your own egress addresses. And ten accounts is a starting threshold, to be tuned on your data.
The query passes Microsoft’s official KQL parser against the documented SigninLogs schema. I haven’t run it on a live tenant.
One table isn’t enough
All 74 rules query SigninLogs, and so does my query. That table only holds part of the picture. Per the documentation on Entra ID log streaming, the SignInLogs category carries interactive sign-ins, where the user types a password or answers an MFA prompt. Sign-ins an application makes on the user’s behalf with a token are a separate category, NonInteractiveUserSignInLogs, which feeds the AADNonInteractiveUserSignInLogs table.
Two practical consequences. First, that second category has to be selected in diagnostic settings to reach your SIEM; if nobody ticked it, it doesn’t exist for you. Second, once the password is found and a session obtained, much of what follows runs on tokens, so it lands in that second table. Looking for a compromised account’s successful sign-ins in SigninLogs alone means watching the front door and ignoring everything that happens once inside.
The triage reflex: for every suspicious account, query both tables, same IP, same time window.
In triage: the accounts in the second column
If the query returns an IP, the IP isn’t what you look at first. The accounts in RightPasswordAccounts are. For each of them, the attacker very likely has the password. The follow-up questions are standard but urgent: was there a successful sign-in (0) from this IP or another unusual one? Was an MFA method added to the account recently? Do we reset the password and revoke sessions?
Accounts that only ever got 50126 can wait. The ones in the second column can’t.
Takeaway
ResultType tells you whether the sign-in completed. It doesn’t tell you whether the password was right. The authors of the official detections know this and baked it into their lists. A home-grown rule that settles for ResultType != "0" to count failures, or ResultType == "0" to find successes, misses the most important family. In practice: replace those comparisons with explicit code lists, as the official rule does, and check each code against Microsoft’s reference before adding it.
MFA and Conditional Access did their job in every one of these cases. But on the day they’re the only thing left standing, the SOC needs to know it, account by account.
References
- Microsoft, SigninLogs
- Microsoft, Microsoft Entra authentication and authorization error codes
- Microsoft, What is Conditional Access?
- Microsoft, Logs available for streaming from Microsoft Entra ID
- Microsoft, Azure-Sentinel, commit
4aee8b861e8f, “Password spray attack against Microsoft Entra ID application” rule (Solutions/Microsoft Entra ID/Analytic Rules/SigninPasswordSpray.yaml, MIT licence) - MITRE ATT&CK, T1110.003 Password Spraying