This hypothesis targets potential phishing campaigns (T1566) where users are reporting messages that were initially classified as spam, indicating a need to validate if these are genuine false positives or missed malicious emails. Proactively hunting for these submissions in Azure Sentinel allows the SOC to refine spam filter accuracy and identify emerging phishing vectors that bypass initial automated defenses.
let Submissions = CloudAppEvents
| where Timestamp > ago(30d)
| where ActionType == "UserSubmission"
| extend RawData = parse_json(RawEventData)
| where tostring(RawData.SubmissionContentType) == "Mail" and tostring(RawData.SubmissionType) == "3"
| extend NetworkMessageId = tostring(RawData.ObjectId), RecipientObjectId = AccountObjectId
| distinct NetworkMessageId, RecipientObjectId;
EmailEvents
| where Timestamp > ago(30d)
| join kind=inner Submissions on NetworkMessageId, RecipientObjectId
// De-duplicate to the latest EmailEvents record per message and recipient so the verdict is read once
| summarize arg_max(Timestamp, *) by NetworkMessageId, RecipientObjectId
| where EmailDirection == "Inbound" and DetectionMethods has 'Spam'
| mv-expand Spam = parse_json(DetectionMethods).Spam to typeof(string)
| where isnotempty(Spam)
| summarize count() by Spam
| render piechart
id: 91a1a3f0-1386-4c70-9c66-215f59b2af28
name: User Submissions by Detection Method - Spam (FP)
description: |
This query visualises user false positive submissions by the original spam filter verdict on the reported message.
description-detailed: |
This query visualises user false positive submissions by the original spam filter verdict on the reported message.
Query is also included as part of the Defender for Office 365 solution in Sentinel: https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/part-2-build-custom-email-security-reports-and-dashboards-with-workbooks-in-micr/4411303
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
dataTypes:
- CloudAppEvents
- EmailEvents
tactics:
- InitialAccess
relevantTechniques:
- T1566
query: |
let Submissions = CloudAppEvents
| where Timestamp > ago(30d)
| where ActionType == "UserSubmission"
| extend RawData = parse_json(RawEventData)
| where tostring(RawData.SubmissionContentType) == "Mail" and tostring(RawData.SubmissionType) == "3"
| extend NetworkMessageId = tostring(RawData.ObjectId), RecipientObjectId = AccountObjectId
| distinct NetworkMessageId, RecipientObjectId;
EmailEvents
| where Timestamp > ago(30d)
| join kind=inner Submissions on NetworkMessageId, RecipientObjectId
// De-duplicate to the latest EmailEvents record per message and recipient so the verdict is read once
| summarize arg_max(Timestamp, *) by NetworkMessageId, RecipientObjectId
| where EmailDirection == "Inbound" and DetectionMethods has 'Spam'
| mv-expand Spam = parse_json(DetectionMethods).Spam to typeof(string)
| where isnotempty(Spam)
| summarize count() by Spam
| render piechart
version: 1.0.0
| Sentinel Table | Notes |
|---|---|
CloudAppEvents | Ensure this data connector is enabled |
EmailEvents | Ensure this data connector is enabled |
From domain matches known marketing platforms (e.g., @sendgrid.net, @hubspot.net) AND the Subject contains campaign keywords (e.g., “Newsletter”, “Weekly Digest”, “Promo”).no-reply@...).
From address contains no-reply, alerts, notifications, or system AND the MIME-Type is text/plain (indicating simple system output rather than complex HTML marketing).Subject starts with “Report”, “Daily Summary”, or “Weekly KPI” AND the AttachmentCount is greater than 0, or where the From domain is a known internal reporting server (e.g., `