Before you run
Data & scope
- Required tables
- Time window
- 24 hours of observed alert records
- Security products or Sentinel analytics rules must populate SecurityAlert in this workspace, with at least 24 hours retained.
- Query access on a table plan supporting the query; verify provider-specific update behavior and entity payload shapes before automation.
Documentation review by Codex (AI). No live-tenant execution or detection-performance claim. Validate schema, data coverage and expected results in your workspace.
// Hunting starter. Documentation checked 2026-11-13; not tenant-tested.
SecurityAlert
| where TimeGenerated >= ago(1d) and TimeGenerated <= now()
| where isnotempty(SystemAlertId)
| summarize ObservedVersions = count(), arg_max(TimeGenerated,
AlertName, AlertSeverity, Status, StartTime, EndTime,
CompromisedEntity, Entities, Tactics, Techniques, AlertLink)
by ProviderName, ProductName, SystemAlertId
| extend SeverityRank = case(AlertSeverity =~ "High", 4,
AlertSeverity =~ "Medium", 3, AlertSeverity =~ "Low", 2,
AlertSeverity =~ "Informational", 1, 0),
EntityCount = array_length(parse_json(Entities))
| extend EntityShape = iff(isnull(EntityCount),
"Missing or non-array entity payload", "Entity array observed")
| project LatestObservedRecord = TimeGenerated, ProviderName, ProductName,
SystemAlertId, AlertName, AlertSeverity, SeverityRank, Status,
StartTime, EndTime, ObservedVersions, CompromisedEntity,
EntityShape, EntityCount, Tactics, Techniques, AlertLink
| order by SeverityRank desc, LatestObservedRecord desc
| take 200
Read-only query. Run in your own authorized workspace after checking prerequisites.
Use this inventory to organize alert review across the products contributing to a Sentinel workspace. It selects records from the last 24 hours, groups them by provider, product and SystemAlertId, and keeps the record with the latest observed TimeGenerated value. It ranks the provider’s declared severity without attempting to invent a cross-product confidence score.
Understand the deduplication boundary
ObservedVersions counts rows in the selected window. Repeated delivery and legitimate updates can both increase that count. The latest observed record is not necessarily the latest authoritative state in the originating product, especially when updates arrive late or use different timestamp semantics.
Blank SystemAlertId values are excluded because collapsing them into one alert would corrupt the inventory. Investigate such records separately as a data-quality issue. Equal timestamps can leave the selected arg_max row nondeterministic, so inspect the underlying versions when their fields disagree.
An alert is not the same object as an incident. The query does not join incident ownership, classification, closure or grouping. A provider’s Status field must not be presented as universal Sentinel incident state. Microsoft’s alert schema describes how fields vary across alert sources.
Preserve uncertainty in entity data
Entities is parsed from its string representation and counted only when it is an array. Missing or differently shaped payloads remain explicitly labelled rather than becoming a fabricated zero. A valid array still does not guarantee that its entities are correctly resolved or sufficient for automatic action.
CompromisedEntity is a provider-supplied descriptive field. Its name is not independent proof that the referenced asset was compromised. Likewise, tactics and techniques are supplied context, not evidence that an analyst has confirmed every mapped behavior. SecurityAlert fields.
Triage with supporting evidence
Open the alert in the approved originating product, verify the target and inspect its underlying evidence. Treat AlertLink as data requiring normal destination validation before automated navigation. Correlate with the affected workload’s identity, resource and application telemetry using verified identifiers.
Provider severity is useful for queue ordering, but business impact, asset sensitivity and evidence quality can change priority. A low-severity alert on a privileged ingestion identity may deserve faster investigation than a familiar high-severity test signal.
Validate and operationalize
Validate repeated records for one known alert, distinct alerts with similar names, blank identifiers and malformed entity payloads. Confirm that grouping does not merge different providers. Test whether the intended product updates appear within your chosen window before building automation.
The output cap is 200 alerts and can hide lower-ranked items in a busy workspace. This documentation-checked inventory has not been executed in a tenant. It neither creates incidents nor determines whether an alert is a true positive.
Verify the source
Microsoft references
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 →