{
  "schemaVersion": "1.0",
  "code": "135011",
  "name": "Device disabled",
  "title": "AADSTS135011: Device used during authentication is disabled",
  "url": "https://brambrinkmeier.com/entra/aadsts/135011/",
  "alternates": {
    "markdown": "https://brambrinkmeier.com/entra/aadsts/135011.md",
    "json": "https://brambrinkmeier.com/api/aadsts/135011.json",
    "html": "https://brambrinkmeier.com/entra/aadsts/135011/"
  },
  "description": "AADSTS135011: the device used to sign in is disabled in Entra ID. After incident response, it shows where a quarantined device reconnects. KQL included.",
  "summary": "AADSTS135011 means the device used for the sign-in is disabled in Microsoft Entra ID. Usually an admin disabled it during cleanup or incident response, and something on that device still tries to get tokens. After an incident, these rows show where the quarantined device is and when it reconnects.",
  "inMicrosoftReference": true,
  "unlistedChecked": null,
  "meaningText": "Microsoft's description:\n\n> Device used during the authentication is disabled.\n\nMicrosoft's reference table gives no PascalCase name for this code. The device object in Entra ID has its account disabled, so Entra ID won't use it for authentication.",
  "sections": [
    {
      "heading": "What does AADSTS135011 mean?",
      "text": "Microsoft's description:\n\n> Device used during the authentication is disabled.\n\nMicrosoft's reference table gives no PascalCase name for this code. The device object in Entra ID has its account disabled, so Entra ID won't use it for authentication."
    },
    {
      "heading": "Is it an attack?",
      "text": "The code itself is not an attack. It is the result of an admin action. The question is **why the device was disabled and what is still trying to use it.**\n\n| Pattern | Likely meaning |\n|---|---|\n| Device disabled during stale-device cleanup, user still has it | Benign. The user is on a device you retired. |\n| Device disabled during incident response, then 135011 rows appear | **The quarantined device is back online and trying to get tokens.** Note the IP, time and app. |\n| 135011 from an IP or country the user never uses | Possible attacker-held device or replayed device-bound session. Investigate (reasoning, not a Microsoft statement). |\n| Many users failing with 135011 at once | Bulk disable by a script or policy. Check the audit log for who disabled them. |\n\nMicrosoft's own revoke-access procedure disables the user's devices as one of its steps:\n\n```powershell\nUpdate-MgDevice -DeviceId $Device.Id -AccountEnabled:$false\n```\n\nSo in an incident, 135011 is often the expected aftermath of that step. Its value is forensic: each row tells you when and from where the disabled device reconnected."
    },
    {
      "heading": "How do I find it in my logs (KQL)?",
      "text": "Every disabled device still attempting sign-ins, with where it came from:\n\n```kusto\nunion\n    (SigninLogs\n     | where TimeGenerated > ago(14d)\n     | where ResultType == \"135011\"\n     | extend DeviceId = tostring(DeviceDetail.deviceId),\n              DeviceName = tostring(DeviceDetail.displayName),\n              Country = tostring(LocationDetails.countryOrRegion),\n              Log = \"Interactive\"),\n    (AADNonInteractiveUserSignInLogs\n     | where TimeGenerated > ago(14d)\n     | where ResultType == \"135011\"\n     | extend DeviceId = tostring(parse_json(DeviceDetail).deviceId),\n              DeviceName = tostring(parse_json(DeviceDetail).displayName),\n              Country = tostring(parse_json(LocationDetails).countryOrRegion),\n              Log = \"NonInteractive\")\n| summarize Attempts = count(),\n            IPs = make_set(IPAddress, 10),\n            Countries = make_set(Country, 5),\n            Apps = make_set(AppDisplayName, 5),\n            FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated),\n            Logs = make_set(Log)\n          by UserPrincipalName, DeviceId, DeviceName\n| sort by LastSeen desc\n```\n\nFocus on one incident: the device you disabled, after the time you disabled it.\n\n```kusto\nlet incidentDevice = \"<device-id>\"; // the device ID (deviceId), not the object ID\nlet disabledAt = datetime(2026-10-01T09:00:00Z);\nunion\n    (SigninLogs\n     | where TimeGenerated > disabledAt\n     | extend DeviceId = tostring(DeviceDetail.deviceId)),\n    (AADNonInteractiveUserSignInLogs\n     | where TimeGenerated > disabledAt\n     | extend DeviceId = tostring(parse_json(DeviceDetail).deviceId))\n| where DeviceId == incidentDevice\n| project TimeGenerated, UserPrincipalName, ResultType, IPAddress, AppDisplayName,\n          ClientAppUsed, UserAgent\n| sort by TimeGenerated asc\n```\n\n`DeviceDetail` is **dynamic** in `SigninLogs` and **string** in `AADNonInteractiveUserSignInLogs`, so each leg of the union extracts the device ID its own way before the tables are combined. The property names follow the Microsoft Graph `signIn` device detail object; check them against a row in your own workspace first.\n\nWhich log 135011 lands in is reasoned from the mechanism, not measured: a device-based SSO refresh is non-interactive, a fresh sign-in is interactive. The first query searches both."
    },
    {
      "heading": "How does Conditional Access affect it?",
      "text": "- 135011 is not a Conditional Access result code. It reports the state of the device object itself.\n- Disabling the device removes it as an option for policies that require a compliant or hybrid joined device. If the user's only managed device is disabled, they will start hitting 53000 or 53001 from whatever device they use next.\n- Microsoft's revoke-access procedure treats disabling devices and revoking the user's refresh tokens (`Revoke-MgUserSignInSession`) as separate steps. Do both. By default, Microsoft assigns access tokens a lifetime of 60 to 90 minutes, so already-issued access tokens can keep working until they expire, unless Continuous Access Evaluation applies (Exchange, SharePoint and Teams through CAE-capable clients), where Microsoft says revocation is enforced with *\"latency of up to 15 minutes\"*. The [session revocation guide](https://brambrinkmeier.com/guides/revoke-sessions-and-verify-entra-id/) has the detail."
    },
    {
      "heading": "How do I fix AADSTS135011?",
      "text": "**For the user:** contact IT. The device has been disabled on purpose or by cleanup, and you can't re-enable it yourself.\n\n**For admins:**\n1. Check the Entra audit log for who disabled the device and when.\n2. If it was disabled during incident response, leave it disabled. Record each 135011 row (IP, time, app) as evidence of where the device is.\n3. If it was a mistake or a stale-device cleanup that hit a device still in use, re-enable it:\n\n```powershell\nUpdate-MgDevice -DeviceId $Device.Id -AccountEnabled:$true\n```\n\n4. If the device is gone for good, delete the device object and have the user register a new device."
    }
  ],
  "microsoftWording": {
    "text": "Device used during the authentication is disabled.",
    "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": "device",
      "label": "Devices"
    },
    "kind": {
      "id": "failure",
      "label": "Failure"
    },
    "attackSignal": {
      "level": "low",
      "label": "Low: usually configuration or user error"
    },
    "mitre": [],
    "tables": [
      "SigninLogs",
      "AADNonInteractiveUserSignInLogs"
    ],
    "isItAnAttack": "The code itself is not an attack. It is the result of an admin action. The question is **why the device was disabled and what is still trying to use it.**\n\n| Pattern | Likely meaning |\n|---|---|\n| Device disabled during stale-device cleanup, user still has it | Benign. The user is on a device you retired. |\n| Device disabled during incident response, then 135011 rows appear | **The quarantined device is back online and trying to get tokens.** Note the IP, time and app. |\n| 135011 from an IP or country the user never uses | Possible attacker-held device or replayed device-bound session. Investigate (reasoning, not a Microsoft statement). |\n| Many users failing with 135011 at once | Bulk disable by a script or policy. Check the audit log for who disabled them. |\n\nMicrosoft's own revoke-access procedure disables the user's devices as one of its steps:\n\n```powershell\nUpdate-MgDevice -DeviceId $Device.Id -AccountEnabled:$false\n```\n\nSo in an incident, 135011 is often the expected aftermath of that step. Its value is forensic: each row tells you when and from where the disabled device reconnected.",
    "conditionalAccess": {
      "heading": "How does Conditional Access affect it?",
      "text": "- 135011 is not a Conditional Access result code. It reports the state of the device object itself.\n- Disabling the device removes it as an option for policies that require a compliant or hybrid joined device. If the user's only managed device is disabled, they will start hitting 53000 or 53001 from whatever device they use next.\n- Microsoft's revoke-access procedure treats disabling devices and revoking the user's refresh tokens (`Revoke-MgUserSignInSession`) as separate steps. Do both. By default, Microsoft assigns access tokens a lifetime of 60 to 90 minutes, so already-issued access tokens can keep working until they expire, unless Continuous Access Evaluation applies (Exchange, SharePoint and Teams through CAE-capable clients), where Microsoft says revocation is enforced with *\"latency of up to 15 minutes\"*. The [session revocation guide](https://brambrinkmeier.com/guides/revoke-sessions-and-verify-entra-id/) has the detail."
    }
  },
  "kql": [
    {
      "title": null,
      "leadIn": "Every disabled device still attempting sign-ins, with where it came from:",
      "query": "union\n    (SigninLogs\n     | where TimeGenerated > ago(14d)\n     | where ResultType == \"135011\"\n     | extend DeviceId = tostring(DeviceDetail.deviceId),\n              DeviceName = tostring(DeviceDetail.displayName),\n              Country = tostring(LocationDetails.countryOrRegion),\n              Log = \"Interactive\"),\n    (AADNonInteractiveUserSignInLogs\n     | where TimeGenerated > ago(14d)\n     | where ResultType == \"135011\"\n     | extend DeviceId = tostring(parse_json(DeviceDetail).deviceId),\n              DeviceName = tostring(parse_json(DeviceDetail).displayName),\n              Country = tostring(parse_json(LocationDetails).countryOrRegion),\n              Log = \"NonInteractive\")\n| summarize Attempts = count(),\n            IPs = make_set(IPAddress, 10),\n            Countries = make_set(Country, 5),\n            Apps = make_set(AppDisplayName, 5),\n            FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated),\n            Logs = make_set(Log)\n          by UserPrincipalName, DeviceId, DeviceName\n| sort by LastSeen desc"
    },
    {
      "title": null,
      "leadIn": "Focus on one incident: the device you disabled, after the time you disabled it.",
      "query": "let incidentDevice = \"<device-id>\"; // the device ID (deviceId), not the object ID\nlet disabledAt = datetime(2026-10-01T09:00:00Z);\nunion\n    (SigninLogs\n     | where TimeGenerated > disabledAt\n     | extend DeviceId = tostring(DeviceDetail.deviceId)),\n    (AADNonInteractiveUserSignInLogs\n     | where TimeGenerated > disabledAt\n     | extend DeviceId = tostring(parse_json(DeviceDetail).deviceId))\n| where DeviceId == incidentDevice\n| project TimeGenerated, UserPrincipalName, ResultType, IPAddress, AppDisplayName,\n          ClientAppUsed, UserAgent\n| sort by TimeGenerated asc"
    }
  ],
  "kqlSectionText": "Every disabled device still attempting sign-ins, with where it came from:\n\n```kusto\nunion\n    (SigninLogs\n     | where TimeGenerated > ago(14d)\n     | where ResultType == \"135011\"\n     | extend DeviceId = tostring(DeviceDetail.deviceId),\n              DeviceName = tostring(DeviceDetail.displayName),\n              Country = tostring(LocationDetails.countryOrRegion),\n              Log = \"Interactive\"),\n    (AADNonInteractiveUserSignInLogs\n     | where TimeGenerated > ago(14d)\n     | where ResultType == \"135011\"\n     | extend DeviceId = tostring(parse_json(DeviceDetail).deviceId),\n              DeviceName = tostring(parse_json(DeviceDetail).displayName),\n              Country = tostring(parse_json(LocationDetails).countryOrRegion),\n              Log = \"NonInteractive\")\n| summarize Attempts = count(),\n            IPs = make_set(IPAddress, 10),\n            Countries = make_set(Country, 5),\n            Apps = make_set(AppDisplayName, 5),\n            FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated),\n            Logs = make_set(Log)\n          by UserPrincipalName, DeviceId, DeviceName\n| sort by LastSeen desc\n```\n\nFocus on one incident: the device you disabled, after the time you disabled it.\n\n```kusto\nlet incidentDevice = \"<device-id>\"; // the device ID (deviceId), not the object ID\nlet disabledAt = datetime(2026-10-01T09:00:00Z);\nunion\n    (SigninLogs\n     | where TimeGenerated > disabledAt\n     | extend DeviceId = tostring(DeviceDetail.deviceId)),\n    (AADNonInteractiveUserSignInLogs\n     | where TimeGenerated > disabledAt\n     | extend DeviceId = tostring(parse_json(DeviceDetail).deviceId))\n| where DeviceId == incidentDevice\n| project TimeGenerated, UserPrincipalName, ResultType, IPAddress, AppDisplayName,\n          ClientAppUsed, UserAgent\n| sort by TimeGenerated asc\n```\n\n`DeviceDetail` is **dynamic** in `SigninLogs` and **string** in `AADNonInteractiveUserSignInLogs`, so each leg of the union extracts the device ID its own way before the tables are combined. The property names follow the Microsoft Graph `signIn` device detail object; check them against a row in your own workspace first.\n\nWhich log 135011 lands in is reasoned from the mechanism, not measured: a device-based SSO refresh is non-interactive, a fresh sign-in is interactive. The first query searches both.",
  "fix": {
    "short": "Admin: check the audit log for who disabled the device. If it was disabled during incident response, leave it disabled. If it was a mistake, re-enable it with Update-MgDevice -AccountEnabled:$true. If the device is gone, delete it and register a new one. User: contact IT.",
    "steps": "**For the user:** contact IT. The device has been disabled on purpose or by cleanup, and you can't re-enable it yourself.\n\n**For admins:**\n1. Check the Entra audit log for who disabled the device and when.\n2. If it was disabled during incident response, leave it disabled. Record each 135011 row (IP, time, app) as evidence of where the device is.\n3. If it was a mistake or a stale-device cleanup that hit a device still in use, re-enable it:\n\n```powershell\nUpdate-MgDevice -DeviceId $Device.Id -AccountEnabled:$true\n```\n\n4. If the device is gone for good, delete the device object and have the user register a new device."
  },
  "labReproduced": null,
  "labSectionText": null,
  "labRuns": [],
  "verification": "documentation",
  "related": [
    "50173",
    "50057",
    "53000",
    "53001",
    "50097",
    "50155",
    "700003",
    "5000611"
  ],
  "coveredBy": [
    {
      "title": "After a compromise: revoke Entra ID sessions and prove it worked",
      "url": "https://brambrinkmeier.com/guides/revoke-sessions-and-verify-entra-id/"
    }
  ],
  "sources": [
    {
      "title": "Access tokens in the Microsoft identity platform",
      "url": "https://learn.microsoft.com/en-us/entra/identity-platform/access-tokens"
    },
    {
      "title": "Microsoft Entra authentication and authorization error codes",
      "url": "https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes"
    },
    {
      "title": "Revoke user access in Microsoft Entra ID",
      "url": "https://learn.microsoft.com/en-us/entra/identity/users/users-revoke-access"
    },
    {
      "title": "Continuous access evaluation",
      "url": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-continuous-access-evaluation"
    },
    {
      "title": "Non-interactive user sign-ins",
      "url": "https://learn.microsoft.com/en-us/entra/identity/monitoring-health/concept-noninteractive-sign-ins"
    },
    {
      "title": "signIn resource type (Microsoft Graph)",
      "url": "https://learn.microsoft.com/en-us/graph/api/resources/signin"
    },
    {
      "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, \"AADSTS135011: Device used during authentication is disabled\", https://brambrinkmeier.com/entra/aadsts/135011/ (CC BY 4.0)",
  "microsoftErrorLookup": "https://login.microsoftonline.com/error?code=135011"
}
