When it is written
ID Protection raises it when a session token or refresh token shows abnormal characteristics, for example an unusual lifetime or a token played from an unfamiliar location. Microsoft asks administrators to treat it as an indicator of potential token replay when the location, application, address, user agent or other characteristics are unexpected for the user. It exists both as a sign-in risk and as a user risk, is calculated in real time or offline, and needs Microsoft Entra ID P2. Microsoft lists it as a premium detection: a tenant without Microsoft Entra ID P2 receives it as generic (Additional risk detected) with no details, so records of this type appear only in tenants that have P2.
Microsoft notes that the detection was historically tuned to be noisier than others and, although improved, still has a higher than normal chance of false positives at low and medium risk levels. Microsoft describes token theft as the replay of a token issued to a user who already completed MFA, and its token theft playbook lists revoking the user's current tokens next to the password reset. Microsoft no longer remediates this detection automatically when it fires during a sign-in that carries MFA claims; under a user risk policy the user has to change the password securely and sign in again with MFA to clear the risk.
How to turn it on
Microsoft Entra ID Protection risk detections records anomalousToken calls to Microsoft Entra ID Protection risk detections without any setup. Vendor documentation
ID Protection evaluates every tenant and keeps its risk detections in the admin center (ID Protection > Risk detections, up to 90 days) and in Microsoft Graph. That is not a collection point: to keep the detections and send them to a SIEM, create a Microsoft Entra diagnostic setting (Entra ID > Monitoring & health > Diagnostic settings) with the UserRiskEvents category, sent to a Log Analytics workspace (table AADUserRiskEvents, the one Microsoft Sentinel reads), a storage account or an event hub. Security Administrator is the least privileged role that can create it.
- Licences decide what arrives. Most detection types are premium and need Microsoft Entra ID P2; without it they arrive as Additional risk detected (
generic) with no details, and in P1 tenants the risk level and risk detail readhidden. A few need more (Microsoft Defender for Cloud Apps, or Microsoft 365 E5 with EMS E5, or Defender for Endpoint); each page says which. - Timing. Real-time detections take 5 to 10 minutes to appear in the reports; offline detections take up to 48 hours. A detection's risk level and state can change after it is first written (
LastUpdatedDateTime). - Data starts to flow about 15 minutes after the setting is saved and only covers detections from then on.
- Low risk detections age out of the product after six months; medium and high ones stay until they are remediated or dismissed.
- Detections for workload identities (service principals) are a separate category, ServicePrincipalRiskEvents, with its own table.
(Invoke-AzRestMethod -Method GET -Path "/providers/microsoft.aadiam/diagnosticSettings?api-version=2017-04-01").ContentGet-MgRiskDetection -Top 5 | Format-Table RiskEventType, RiskLevel, DetectionTimingType, UserPrincipalName, DetectedDateTimeGet-MgRiskDetection -Filter "riskEventType eq 'anomalousToken'" -Top 5 | Format-ListFields
The operation’s own fields first, then the fields every Microsoft Entra ID Protection risk detections record has. Field names are the JSON paths of the record as the vendor documents it.
| Field | What it holds |
|---|---|
Activity | The activity the risk is linked to, signin or user; this detection exists as both. |
DetectionTimingType | When the detection was computed, realtime or offline; this detection can be either. |
RiskLevel | Level of the risk (low, medium, high); this detection fires at several levels. |
RiskDetail | How the risk was resolved, if it was. Microsoft defines none as no details being available for the risk state, so read RiskState to see whether the risk is open. |
AdditionalInfo | Extra details as key and value pairs; Microsoft lists keys such as userAgent, relatedUserAgent, relatedLocation and clientIp but does not document which ones this detection carries. |
Fields every Microsoft Entra ID Protection risk detections record has (14)
| Field | What it holds |
|---|---|
TimeGenerated | When the record was written to the workspace, in UTC. |
Id | Unique ID of the risk detection, the same as in the ID Protection report and Microsoft Graph. |
RiskEventTypeRead by 1 rule | The type of risk detected (for example passwordSpray). The operation this page is about. |
ActivityDateTime | When the risky activity happened, in UTC. |
DetectedDateTime | When ID Protection detected the risk, in UTC. For offline detections it can be hours after the activity. |
LastUpdatedDateTime | When the detection was last updated (new information, a level change, an administrator's action), in UTC. |
UserId | Object ID of the user the detection is about. |
UserPrincipalName | User principal name of the user. |
UserDisplayName | The user's name (Microsoft's table reference describes it as the user principal name). |
IpAddress | The client address the risky activity came from, when the detection has one. |
Location | Where the address is, from an IP address lookup (city, state, country or region, coordinates). |
RiskState | State of the risk: atRisk, confirmedCompromised, confirmedSafe, remediated, dismissed or none. |
CorrelationId | Correlation ID of the sign-in the detection is tied to, for finding the sign-in in the sign-in logs; empty when the detection is not tied to a sign-in. |
RequestId | Request ID of the sign-in the detection is tied to; empty when the detection is not tied to a sign-in. |
Values to know
RiskLevel
| Value | Meaning | Signal |
|---|---|---|
high | Microsoft is highly confident the account is compromisedStart here. Revoke sessions if the token use was not the user's. | Attack signal |
medium | Moderate anomalies, less confidenceMicrosoft says low and medium levels have a higher than normal chance of false positives for this detection. | Worth knowing |
low | Anomalies with low confidence | Worth knowing |
Volume and noise
Medium. Low and medium levels carry a higher than normal chance of false positives by Microsoft's own description; travel, new devices and VPN changes can make a legitimate token look unusual. High level records, and any record followed by new persistence on the account, are the ones to read first.
Keeping it manageable
- Start with
RiskLevelhigh, as the detection rule's description suggests, and review low and medium ones together with the user's sign-ins. - Compare the location, application, address and user agent with the user's usual ones, starting from the sign-in that
CorrelationIdnames. Microsoft's token theft playbook warns that an anomalous token detection may have no matching entry in the sign-in logs: look in the Office activity and audit logs too. - Look for changes on the account in the following hours (new authentication methods, inbox rules, application consents); the hypothesis on this attack joins them to the detection.
- If the activity was not the user's: confirm compromise, reset the password, and revoke the user's refresh tokens and sessions.
Sample event
A Microsoft Entra ID Protection risk detections record in the vendor’s format, with made-up values.
{
"TimeGenerated": "2026-11-18T09:52:07.000Z",
"Id": "7c3a9e1f0b2d4c6e8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f",
"RiskEventType": "anomalousToken",
"ActivityDateTime": "2026-11-18T09:31:44.000Z",
"DetectedDateTime": "2026-11-18T09:38:12.000Z",
"LastUpdatedDateTime": "2026-11-18T09:38:12.000Z",
"UserId": "00000000-0000-0000-0000-00000000a11c",
"UserPrincipalName": "j.doe@corp.example.com",
"UserDisplayName": "Jane Doe",
"IpAddress": "203.0.113.77",
"Location": {
"city": "Rotterdam",
"state": "Zuid-Holland",
"countryOrRegion": "NL"
},
"RiskState": "atRisk",
"CorrelationId": "00000000-1111-2222-3333-444444444444",
"RequestId": "00000000-5555-6666-7777-888888888888",
"Activity": "signin",
"DetectionTimingType": "offline",
"RiskLevel": "high",
"RiskDetail": "none",
"AdditionalInfo": [
{
"Key": "userAgent",
"Value": "Mozilla/5.0 (X11; Linux x86_64)"
}
]
}Attacks this event reveals
Detection rules that read this event: