Spam Detections by Detection technology
Description
This query visualises total emails with Spam detections over time by various Spam Detection technologies/controls.
Query · kql
//This query visualises total emails with Spam detections over time summarizing the data daily by various Spam Detection technologies/controls in Microsoft Defender for Office 365. //(v4) Single mv-expand over DetectionMethods.Spam replaces the previous 8-way union: less scan, and new spam techniques appear automatically. let minTime = startofday(ago(30d)); let maxTime = startofday(now()); EmailEvents | where Timestamp >= minTime | where OrgLevelPolicy != "Phishing simulation" and OrgLevelPolicy != "SecOps Mailbox" | where DetectionMethods has "Spam" | extend Key = strcat(NetworkMessageId, '-', RecipientEmailAddress) | summarize arg_max(Timestamp, *) by Key | mv-expand Details = parse_json(DetectionMethods).Spam to typeof(string) | where Timestamp < maxTime | make-series Count = count() default = 0 on Timestamp from minTime to maxTime step 1d by Details // | render timechart