Defender XDR threat hunting - can you join SecurityIncident and AlertEvidence?

David Broggy 6,196 Reputation points MVP
2025-04-01T16:29:26.6966667+00:00

I would have expected I could join SecurityIncident and AlertEvidence on the AlertIDs and AlertID fields.

I appreciate AlertIDs is an array but regardless I'm not finding that any of the alert IDs in the array match any of the AlertID values in the AlertEvidence table.

It it possible to join these 2 tables and if not, how can I query down from the Incident to the alerts?

Thanks!

Microsoft Sentinel
Microsoft Sentinel
A scalable, cloud-native solution for security information event management and security orchestration automated response. Previously known as Azure Sentinel.
1,266 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Clive Watson 7,556 Reputation points MVP
    2025-04-04T08:19:54.7+00:00

    Hi David, One way but its not at all scalable (and could be inaccurate) is to find and map an entity

    SecurityIncident
    | extend Alerts = extract("\\[(.*?)\\]", 1, tostring(AlertIds))
    | mv-expand AlertIds to typeof(string), Labels to typeof(string), Comments to typeof(string), AdditionalData to typeof(string)
    | join kind=leftouter
    (
        SecurityAlert
        ) on $left.AlertIds == $right.SystemAlertId 
        | summarize AlertCount=dcount(AlertIds),
                    arg_max
                    (
                     TimeGenerated, *
                    )
                    by IncidentNumber
    // start to map to individual entities, as an example I'm using IP                
    | mv-expand todynamic(Entities) 
    | where Entities.Type == "ip"
    | extend ip_ = trim(@"[^\w]+",tostring(Entities.Address))
    // now join to the IP in the Evidence Table 
    | join //kind=inner
    (
    AlertEvidence
    | where EntityType =~ "Ip"
    | extend ip_ = tostring(RemoteIP)
    ) on ip_
    
    
    1 person found this answer helpful.

  2. Givary-MSFT 35,591 Reputation points Microsoft Employee
    2025-04-07T03:54:00.34+00:00

    @David Broggy Checked with my team regarding your ask, and here’s the suggested approach you can try:

    You’ll need to include the SecurityAlert table to extract the VendorOriginalId.

    The overall flow would be:

    Retrieve SystemAlertIds from the SecurityIncident table

    Use those SystemAlertIds to get the VendorOriginalId from the SecurityAlert table

    Then, correlate the VendorOriginalId with the AlertEvidence table

    Let me know if this helps or if you have any questions—feel free to reach out!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.