# AADSTS50140: Keep me signed in interrupt

Canonical: https://brambrinkmeier.com/entra/aadsts/50140/
By Bram Brinkmeier. JSON: https://brambrinkmeier.com/api/aadsts/50140.json

**Short answer:** AADSTS50140 is the "Keep me signed in?" prompt, logged as an interrupt. Microsoft calls it an expected part of the sign-in flow, so it is noise on failure dashboards. Its one investigative use: the prompt comes after authentication, so a 50140 from an attacker IP almost certainly means the password and any required MFA were accepted.

**Fix:** Nothing to fix: this is the 'Keep me signed in?' prompt. User: choose Yes or No. Admin: exclude 50140 from failure alerts, but count it as a success in incident timelines. If it came from an attacker IP, reset the password and revoke sessions.

| Field | Value |
|---|---|
| Code | AADSTS50140 |
| Microsoft name | KmsiInterrupt |
| Category | Tokens and sessions |
| Type | Interrupt (an expected extra step, not a failure) |
| Attack signal | Low: usually configuration or user error |
| MITRE ATT&CK | [T1078.004](https://attack.mitre.org/techniques/T1078/004/) Valid Accounts: Cloud Accounts |
| Where to look | `SigninLogs` |
| In Microsoft's error reference | Yes |
| Verification | documentation |
| Last updated | 2026-10-11 |

## What does AADSTS50140 mean?

Microsoft's description:

> **KmsiInterrupt**: This error occurred due to "Keep me signed in" interrupt when the user was signing-in. This is an expected part of the sign in flow, where a user is asked if they want to remain signed into their current browser to make further logins easier.

The user saw the "Stay signed in?" question. Answering it, either way, completes the sign-in on the next request.

## Is it an attack?

No, not by itself. It is one of the most common reasons sign-in reports show "failures" that aren't failures.

**It still matters in an investigation because of where it sits in the flow.** The prompt asks whether to *remain* signed in, so it appears once authentication has been accepted. That is reasoning from Microsoft's description, not a separate Microsoft statement, but it means a 50140 is close to a success row for timeline purposes.

| Pattern | Likely meaning |
|---|---|
| 50140, then `0` seconds later, same IP and device | Normal browser sign-in. Benign. |
| 50140 counted as a failure on a dashboard or alert | Noise. Exclude it. |
| 50140 from an IP tied to a spray, a phishing kit, or an unfamiliar country | **The attacker got through password and MFA.** Treat it like a successful sign-in. |

Microsoft's password spray playbook ranks *"Interrupted sign-in by known attacker IP address"* right after successful ones when prioritising. A 50140 is an interrupt that comes after authentication, so it belongs at the top of that list.

## How do I find it in my logs (KQL)?

Every sign-in from a list of suspect IPs that got past authentication, counting 50140 as a success:

```kusto
let suspectIPs = dynamic(["{ip-address}", "{ip-address}"]);
SigninLogs
| where TimeGenerated > ago(7d)
| where IPAddress in (suspectIPs)
| where ResultType in ("0", "50140")
| project TimeGenerated, UserPrincipalName, IPAddress, ResultType,
          AppDisplayName, ClientAppUsed, AuthenticationRequirement, UserAgent
| sort by TimeGenerated asc
```

Replace the example IPs with your own. A failure overview that leaves out expected interrupts:

```kusto
SigninLogs
| where TimeGenerated > ago(1d)
| where ResultType != "0"
| where ResultType !in ("50140", "50076", "50158", "50125", "50079")
| summarize Events = count(), Users = dcount(UserPrincipalName)
          by ResultType, ResultDescription
| sort by Events desc
```

Excluding 50076 and 50079 hides them from a failure count. It doesn't make them irrelevant. Hunt those codes separately.

## How do Conditional Access and MFA affect it?

- 50140 is not a Conditional Access or MFA outcome. It is a prompt about keeping the browser signed in.
- Any MFA or Conditional Access requirement for the sign-in was handled before this prompt. To see which policies applied, look at the related success row for the same user, IP and time, not at the 50140 row.
- An attacker who answers "Yes" is asking for a longer-lived browser session. After a compromise, end it explicitly by revoking sessions.

## How do I fix AADSTS50140?

**For the user:** nothing to fix. Choose Yes or No.

**For admins:**
1. Exclude 50140 from failure alerts and dashboards.
2. Include it as a success-equivalent in incident timelines for suspicious IPs.
3. If a 50140 came from an attacker IP, reset the password and revoke sessions (`Revoke-MgUserSignInSession`, or **Revoke sessions** on the user in the admin center).

## Evidence

Not reproduced in the lab yet; the page is based on Microsoft's documentation.

## Sources

1. [Microsoft Entra authentication and authorization error codes](https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes)
2. [Password spray investigation (Microsoft incident response playbook)](https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-password-spray)
3. [Revoke user access in Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity/users/users-revoke-access)
4. [SigninLogs table reference (Azure Monitor)](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/signinlogs)

## Related codes

[AADSTS50076](https://brambrinkmeier.com/entra/aadsts/50076/), [AADSTS50074](https://brambrinkmeier.com/entra/aadsts/50074/), [AADSTS50058](https://brambrinkmeier.com/entra/aadsts/50058/), [AADSTS50126](https://brambrinkmeier.com/entra/aadsts/50126/), [AADSTS50173](https://brambrinkmeier.com/entra/aadsts/50173/), [AADSTS50133](https://brambrinkmeier.com/entra/aadsts/50133/), [AADSTS50125](https://brambrinkmeier.com/entra/aadsts/50125/), [AADSTS50158](https://brambrinkmeier.com/entra/aadsts/50158/), [AADSTS165000](https://brambrinkmeier.com/entra/aadsts/165000/)

## License and citation

CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). CC BY 4.0 covers the author's own text and classification fields. Quoted Microsoft error wording belongs to Microsoft, is quoted with its source and can change.

Cite as: Bram Brinkmeier, "AADSTS50140: Keep me signed in interrupt", https://brambrinkmeier.com/entra/aadsts/50140/ (CC BY 4.0), last updated 2026-10-11.
