Start with User Risk
The risk event defines the identity and authentication timeframe for the investigation.
View query
Q-01Inspect the user's active risk detections
What this checks
Start from the User Risk alert and determine which risk detections are active, when they were detected, and whether they are tied to a sign-in.
KQL
let target_user = "denis@example.com";
AADUserRiskEvents
| where TimeGenerated >= ago(7d)
| where UserPrincipalName =~ target_user
| where RiskLevel in~ ("medium", "high")
| where RiskState in~ ("atRisk", "confirmedCompromised")
| project
TimeGenerated,
ActivityDateTime,
DetectedDateTime,
UserPrincipalName,
UserId,
IpAddress,
RiskEventType,
RiskLevel,
RiskState,
RiskDetail,
DetectionTimingType,
Activity,
CorrelationId,
RequestId
| order by TimeGenerated ascSPL
index=<entra_risk_index> sourcetype=<entra_user_risk_sourcetype>
earliest=-7d
| eval
user=lower(coalesce(user, UserPrincipalName, user_principal_name)),
src=coalesce(src, IpAddress, ip_address),
risk_type=coalesce(risk_type, RiskEventType),
risk_level=lower(coalesce(risk_level, RiskLevel)),
risk_state=lower(coalesce(risk_state, RiskState)),
correlation_id=coalesce(correlation_id, CorrelationId),
request_id=coalesce(request_id, RequestId)
| where user="denis@example.com"
AND risk_level IN ("medium","high")
AND risk_state IN ("atrisk","confirmedcompromised")
| table _time user src risk_type risk_level risk_state correlation_id request_id
| sort 0 _timeWhat to look for
One or more active medium/high risk events for denis@example.com, with risk type, source IP, timing, and correlation context preserved.
Technical details
Tested signal
Medium or high user-risk event in an at-risk or confirmed-compromised state.
Assumptions
- Microsoft Entra ID Protection telemetry is licensed and exported.
- The user-risk event contains a UPN and, where sign-in linked, correlation or request identifiers.
Data requirements and relevant fields
- identity
Microsoft Entra ID Protection user-risk events with identity, event type, risk level/state, source IP, and sign-in correlation identifiers.
TimeGeneratedActivityDateTimeDetectedDateTimeUserPrincipalNameUserIdIpAddressCorrelationIdRequestIdRiskEventTypeRiskLevelRiskStateRiskDetailDetectionTimingTypeActivity
KQL schema
Validate table availability, Entra ID Protection licensing, connector retention, and local field population.
SPL schema
Replace index/sourcetype placeholders and map user-risk and sign-in concepts to the local Entra export.
Limitations
- Some risk detections are calculated offline and can appear after the originating sign-in.
- Risk level is a prioritization signal, not proof of compromise.
KQL uses Microsoft Entra / Defender XDR identity telemetry. SPL is a normalized raw-event scaffold and requires local field mapping.
More reasoning
Observation
The user's risk state is the first security signal.
Working explanation
A medium/high active risk event may represent unauthorized authentication rather than benign travel or network change.
What was checked
Review the user's active risk events, timing, source IP, risk type, risk state, and linked correlation identifiers.
Interpretation
Risk is a prioritization signal that needs sign-in evidence before compromise is confirmed.