{
  "schemaVersion": "1.0",
  "code": "50140",
  "name": "KmsiInterrupt",
  "title": "AADSTS50140: Keep me signed in interrupt",
  "url": "https://brambrinkmeier.com/entra/aadsts/50140/",
  "alternates": {
    "markdown": "https://brambrinkmeier.com/entra/aadsts/50140.md",
    "json": "https://brambrinkmeier.com/api/aadsts/50140.json",
    "html": "https://brambrinkmeier.com/entra/aadsts/50140/"
  },
  "description": "AADSTS50140: the Keep me signed in prompt, a benign interrupt. From an attacker IP, password and MFA almost surely passed. KQL included.",
  "summary": "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.",
  "inMicrosoftReference": true,
  "unlistedChecked": null,
  "meaningText": "Microsoft's description:\n\n> **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.\n\nThe user saw the \"Stay signed in?\" question. Answering it, either way, completes the sign-in on the next request.",
  "sections": [
    {
      "heading": "What does AADSTS50140 mean?",
      "text": "Microsoft's description:\n\n> **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.\n\nThe user saw the \"Stay signed in?\" question. Answering it, either way, completes the sign-in on the next request."
    },
    {
      "heading": "Is it an attack?",
      "text": "No, not by itself. It is one of the most common reasons sign-in reports show \"failures\" that aren't failures.\n\n**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.\n\n| Pattern | Likely meaning |\n|---|---|\n| 50140, then `0` seconds later, same IP and device | Normal browser sign-in. Benign. |\n| 50140 counted as a failure on a dashboard or alert | Noise. Exclude it. |\n| 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. |\n\nMicrosoft'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."
    },
    {
      "heading": "How do I find it in my logs (KQL)?",
      "text": "Every sign-in from a list of suspect IPs that got past authentication, counting 50140 as a success:\n\n```kusto\nlet suspectIPs = dynamic([\"{ip-address}\", \"{ip-address}\"]);\nSigninLogs\n| where TimeGenerated > ago(7d)\n| where IPAddress in (suspectIPs)\n| where ResultType in (\"0\", \"50140\")\n| project TimeGenerated, UserPrincipalName, IPAddress, ResultType,\n          AppDisplayName, ClientAppUsed, AuthenticationRequirement, UserAgent\n| sort by TimeGenerated asc\n```\n\nReplace the example IPs with your own. A failure overview that leaves out expected interrupts:\n\n```kusto\nSigninLogs\n| where TimeGenerated > ago(1d)\n| where ResultType != \"0\"\n| where ResultType !in (\"50140\", \"50076\", \"50158\", \"50125\", \"50079\")\n| summarize Events = count(), Users = dcount(UserPrincipalName)\n          by ResultType, ResultDescription\n| sort by Events desc\n```\n\nExcluding 50076 and 50079 hides them from a failure count. It doesn't make them irrelevant. Hunt those codes separately."
    },
    {
      "heading": "How do Conditional Access and MFA affect it?",
      "text": "- 50140 is not a Conditional Access or MFA outcome. It is a prompt about keeping the browser signed in.\n- 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.\n- An attacker who answers \"Yes\" is asking for a longer-lived browser session. After a compromise, end it explicitly by revoking sessions."
    },
    {
      "heading": "How do I fix AADSTS50140?",
      "text": "**For the user:** nothing to fix. Choose Yes or No.\n\n**For admins:**\n1. Exclude 50140 from failure alerts and dashboards.\n2. Include it as a success-equivalent in incident timelines for suspicious IPs.\n3. 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)."
    }
  ],
  "microsoftWording": {
    "text": "**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.",
    "source": "Microsoft's error code reference, as quoted on the page",
    "sourceUrl": "https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes"
  },
  "securityReading": {
    "category": {
      "id": "token",
      "label": "Tokens and sessions"
    },
    "kind": {
      "id": "interrupt",
      "label": "Interrupt (an expected extra step, not a failure)"
    },
    "attackSignal": {
      "level": "low",
      "label": "Low: usually configuration or user error"
    },
    "mitre": [
      {
        "id": "T1078.004",
        "name": "Valid Accounts: Cloud Accounts",
        "url": "https://attack.mitre.org/techniques/T1078/004/"
      }
    ],
    "tables": [
      "SigninLogs"
    ],
    "isItAnAttack": "No, not by itself. It is one of the most common reasons sign-in reports show \"failures\" that aren't failures.\n\n**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.\n\n| Pattern | Likely meaning |\n|---|---|\n| 50140, then `0` seconds later, same IP and device | Normal browser sign-in. Benign. |\n| 50140 counted as a failure on a dashboard or alert | Noise. Exclude it. |\n| 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. |\n\nMicrosoft'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.",
    "conditionalAccess": {
      "heading": "How do Conditional Access and MFA affect it?",
      "text": "- 50140 is not a Conditional Access or MFA outcome. It is a prompt about keeping the browser signed in.\n- 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.\n- An attacker who answers \"Yes\" is asking for a longer-lived browser session. After a compromise, end it explicitly by revoking sessions."
    }
  },
  "kql": [
    {
      "title": null,
      "leadIn": "Every sign-in from a list of suspect IPs that got past authentication, counting 50140 as a success:",
      "query": "let suspectIPs = dynamic([\"{ip-address}\", \"{ip-address}\"]);\nSigninLogs\n| where TimeGenerated > ago(7d)\n| where IPAddress in (suspectIPs)\n| where ResultType in (\"0\", \"50140\")\n| project TimeGenerated, UserPrincipalName, IPAddress, ResultType,\n          AppDisplayName, ClientAppUsed, AuthenticationRequirement, UserAgent\n| sort by TimeGenerated asc"
    },
    {
      "title": null,
      "leadIn": "Replace the example IPs with your own. A failure overview that leaves out expected interrupts:",
      "query": "SigninLogs\n| where TimeGenerated > ago(1d)\n| where ResultType != \"0\"\n| where ResultType !in (\"50140\", \"50076\", \"50158\", \"50125\", \"50079\")\n| summarize Events = count(), Users = dcount(UserPrincipalName)\n          by ResultType, ResultDescription\n| sort by Events desc"
    }
  ],
  "kqlSectionText": "Every sign-in from a list of suspect IPs that got past authentication, counting 50140 as a success:\n\n```kusto\nlet suspectIPs = dynamic([\"{ip-address}\", \"{ip-address}\"]);\nSigninLogs\n| where TimeGenerated > ago(7d)\n| where IPAddress in (suspectIPs)\n| where ResultType in (\"0\", \"50140\")\n| project TimeGenerated, UserPrincipalName, IPAddress, ResultType,\n          AppDisplayName, ClientAppUsed, AuthenticationRequirement, UserAgent\n| sort by TimeGenerated asc\n```\n\nReplace the example IPs with your own. A failure overview that leaves out expected interrupts:\n\n```kusto\nSigninLogs\n| where TimeGenerated > ago(1d)\n| where ResultType != \"0\"\n| where ResultType !in (\"50140\", \"50076\", \"50158\", \"50125\", \"50079\")\n| summarize Events = count(), Users = dcount(UserPrincipalName)\n          by ResultType, ResultDescription\n| sort by Events desc\n```\n\nExcluding 50076 and 50079 hides them from a failure count. It doesn't make them irrelevant. Hunt those codes separately.",
  "fix": {
    "short": "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.",
    "steps": "**For the user:** nothing to fix. Choose Yes or No.\n\n**For admins:**\n1. Exclude 50140 from failure alerts and dashboards.\n2. Include it as a success-equivalent in incident timelines for suspicious IPs.\n3. 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)."
  },
  "labReproduced": null,
  "labSectionText": null,
  "labRuns": [],
  "verification": "documentation",
  "related": [
    "50076",
    "50074",
    "50058",
    "50126",
    "50173",
    "50133",
    "50125",
    "50158",
    "165000"
  ],
  "coveredBy": [
    {
      "title": "How to detect MFA fatigue (push bombing) in Microsoft Entra ID",
      "url": "https://brambrinkmeier.com/guides/detect-mfa-fatigue-entra-id/"
    },
    {
      "title": "How to detect password spraying in Microsoft Entra ID (with KQL)",
      "url": "https://brambrinkmeier.com/guides/detect-password-spray-entra-id/"
    }
  ],
  "sources": [
    {
      "title": "Microsoft Entra authentication and authorization error codes",
      "url": "https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes"
    },
    {
      "title": "Password spray investigation (Microsoft incident response playbook)",
      "url": "https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-password-spray"
    },
    {
      "title": "Revoke user access in Microsoft Entra ID",
      "url": "https://learn.microsoft.com/en-us/entra/identity/users/users-revoke-access"
    },
    {
      "title": "SigninLogs table reference (Azure Monitor)",
      "url": "https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/signinlogs"
    }
  ],
  "published": null,
  "lastUpdated": "2026-10-11",
  "lastVerified": null,
  "license": "CC BY 4.0",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/",
  "licenseNote": "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.",
  "attribution": "Bram Brinkmeier, \"AADSTS50140: Keep me signed in interrupt\", https://brambrinkmeier.com/entra/aadsts/50140/ (CC BY 4.0)",
  "microsoftErrorLookup": "https://login.microsoftonline.com/error?code=50140"
}
