Query Details
let XspmCriticalAssets = ExposureGraphNodes
| mv-expand EntityIds
| extend EntityType = parse_json(EntityIds)
| where EntityType["type"] == "AzureResourceId"
| mv-expand CriticalityData = parse_json(NodeProperties)["rawData"]["criticalityLevel"]["ruleNames"]
| extend CriticalityLevel = tostring(parse_json(NodeProperties)["rawData"]["criticalityLevel"]["criticalityLevel"])
| extend RuleName = tostring(CriticalityData)
| extend ResourceId = tolower(tostring(EntityType["id"]))
| where isnotempty(CriticalityLevel)
| project ResourceId, NodeId, NodeName, RuleName, CriticalityLevel;
XspmCriticalAssets
// Correlation with XDR Alerts
| join kind=inner (
AlertEvidence
| where EntityType == @"CloudResource"
| extend ResourceId = tolower(ResourceID)
| project AlertTitle = Title, ServiceSource, ResourceId
) on ResourceId
| summarize SecurityAlerts = make_set(AlertTitle), CriticalAssetTag = make_set(RuleName) by ResourceId
This query is designed to identify critical Azure resources and correlate them with security alerts. Here's a simplified breakdown of what the query does:
Extract Critical Azure Resources:
ExposureGraphNodes to identify Azure resources by expanding and parsing the EntityIds.NodeProperties to extract criticality information, specifically focusing on the criticality level and associated rule names.Correlate with Security Alerts:
AlertEvidence, which contains security alerts related to cloud resources.ResourceId, ensuring case-insensitivity by converting IDs to lowercase.Output:
In essence, this query helps in identifying critical Azure resources and understanding what security alerts are associated with them, aiding in prioritizing security efforts.

Thomas Naunheim
Released: June 4, 2025
Tables
Keywords
Operators