Entra ID Device-Bound PRT from Unusual Device IP

Last updated 15 days ago on 2026-08-28
Created 15 days ago on 2026-08-28

About

Detects a first-party FOCI tooling client (Azure CLI, PowerShell, VS Code, Graph CLI, Azure AD PowerShell, or Visual Studio) redeeming a device-bound Primary Refresh Token (PRT) for Microsoft Graph, SharePoint/OneDrive, or Exchange Online from a source IP that has not been seen with that deviceid. Replay events are limited to compliant or Intune-managed devices. Adversaries who steal a WAM PRT SSO cookie replay it off-box; the token keeps the workstation deviceid, so this pair is new even when Windows Sign-In for that device is outside a correlation window.
Tags
Domain: CloudDomain: IdentityUse Case: Threat DetectionUse Case: Identity and Access AuditData Source: AzureData Source: Microsoft Entra IDData Source: Microsoft Entra ID Sign-in LogsPlatform: Entra IDTactic: Credential AccessTactic: Defense EvasionRule Type: New TermsLanguage: kuery
Severity
high
Risk Score
73
MITRE ATT&CK™

Credential Access (TA0006)(external, opens in a new tab or window)

Defense Evasion (TA0005)(external, opens in a new tab or window)

Initial Access (TA0001)(external, opens in a new tab or window)

False Positive Examples
A user who runs Azure CLI, Azure PowerShell, VS Code, Graph CLI, or Visual Studio from a new egress (VPN, hotel, Cloud Shell, jump host) while WAM still attaches a compliant or managed workstation deviceid will match on first sight of that IP. Exception: add known developer and Cloud Shell ranges after confirming the client ran there. Split-tunnel or dual-homed devices can present a new Microsoft 365 egress for tooling clients. Confirm the IP belongs to the enrolled device before treating the event as cookie theft. Microsoft Teams, Office, OneDrive SyncEngine, Authentication Broker, Outlook Mobile, Bing, Azure Portal, and Office 365 Management are omitted because first sight of a mobile or M365 egress IP for those clients is routine.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
New Terms Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
filebeat-*logs-azure.signinlogs-*
Related Integrations

azure(external, opens in a new tab or window)

Query
text code block:
data_stream.dataset: azure.signinlogs and event.outcome: success and azure.signinlogs.properties.status.error_code: 0 and azure.signinlogs.properties.incoming_token_type: "primaryRefreshToken" and azure.signinlogs.properties.device_detail.device_id: * and source.ip: * and ( azure.signinlogs.properties.device_detail.is_compliant: true or azure.signinlogs.properties.device_detail.is_managed: true ) and azure.signinlogs.properties.app_id: ( "04b07795-8ddb-461a-bbee-02f9e1bf7b46" or "1950a258-227b-4e31-a9cf-717495945fc2" or "aebc6443-996d-45c2-90f0-388ff96faa56" or "14d82eec-204b-4c2f-b7e8-296a70dab67e" or "1b730954-1685-4b74-9bfd-dac224a7b894" or "872cd9fa-d31f-45e0-9eab-6e460a02d1f1" ) and azure.signinlogs.properties.resource_id: ( "00000003-0000-0000-c000-000000000000" or "00000003-0000-0ff1-ce00-000000000000" or "6a9b9266-8161-4a7b-913a-a9eda19da220" or "00000002-0000-0ff1-ce00-000000000000" )

Install detection rules in Elastic Security

Detect Entra ID Device-Bound PRT from Unusual Device IP in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).