← Sentinel query library

Identity · Microsoft Sentinel

Review medium and high-risk sign-in records

Inspect Entra sign-ins carrying medium or high risk while preserving outcome and remediation context.

Before you run

Data & scope

Required tables
SigninLogs
Time window
7 days
  • Microsoft Entra ID connector with SigninLogs ingested and query access to the table.
  • Microsoft Entra ID P2 for detailed risk fields; P1 or P2 alone is sufficient for sign-in-log ingestion, not all risk detail.

Documentation review by Codex (AI). No live-tenant execution or detection-performance claim. Validate schema, data coverage and expected results in your workspace.

Kusto Query Language
Download .kql
// Hunting starter. Documentation checked 2026-11-13; not tenant-tested.
let lookback = 7d;
SigninLogs
| where TimeGenerated >= ago(lookback) and TimeGenerated <= now()
| where RiskLevelAggregated in~ ("medium", "high")
    or RiskLevelDuringSignIn in~ ("medium", "high")
| project TimeGenerated, AADTenantId, Id, CorrelationId,
    UserId, UserPrincipalName, AppDisplayName, IPAddress,
    ResultType, ResultDescription, ConditionalAccessStatus,
    RiskLevelDuringSignIn, RiskLevelAggregated, RiskState,
    RiskDetail, RiskEventTypes_V2
| order by TimeGenerated desc
| take 200

Read-only query. Run in your own authorized workspace after checking prerequisites.

Use this inventory to investigate sign-in records whose observed risk is medium or high. It preserves successful and unsuccessful outcomes, as well as remediation state, so an analyst can distinguish a risky attempt from a completed session. It does not calculate risk or confirm compromise; Microsoft Entra ID Protection supplies the risk signal. ID Protection overview.

Read the result

The two risk columns answer different questions: risk during the sign-in and the aggregate risk recorded for it. Either can satisfy this query. RiskState and RiskDetail remain visible because a record can refer to a sign-in later remediated or confirmed safe. The query deliberately does not discard those states. Detailed risk values can be hidden without the required P2 entitlement; hidden values will not match medium or high. Risk-field definitions and licensing.

Keep Id and CorrelationId for a precise follow-up. The output is the latest 200 matching ingested records, not a deduplicated list of incidents. RiskEventTypes_V2 is retained as its documented string field rather than assuming a particular JSON shape. Increase the bounded lookback only when the table has the required retained data.

Triage and tune

Open the corresponding sign-in in Entra and check its current risk details, outcome, authentication requirement, access-policy result, device context and target resource. Determine whether a session succeeded, what data or administrative services became reachable, and whether remediation already occurred. Follow your identity response procedure when the evidence supports it.

Expected travel, proxy changes and legitimate unfamiliar devices can require investigation without indicating account takeover. Add the low level to both filters for broader review if your capacity allows. Avoid filtering solely on failed outcomes: a successful risky sign-in may deserve more attention than a blocked attempt.

Limits and validation

No matches can mean no qualifying records, hidden risk, collection delay, missing coverage or an unsuitable time range. This query is not the risky-user inventory and does not include noninteractive-user tables automatically. Review licensing and ingestion before judging coverage. It is documentation-checked only, has not been tenant-tested, and is a hunting starter rather than a deployable analytics rule.

Verify the source

Microsoft references

  1. Microsoft Learn — SigninLogs risk-field schema ↗
  2. Microsoft Learn — Microsoft Entra ID Protection overview ↗
  3. Microsoft Learn — Microsoft Entra ID connector requirements ↗
Before turning a hunt into an alert

Measure normal activity, validate known test cases, account for ingestion delays, choose a threshold and entity mapping, and assign an owner. Results require investigation.

Follow the detection learning path →