← Back to SOC feed Coverage →

Top policies performing user overrides

kql MEDIUM Azure-Sentinel
T1566
EmailEvents
huntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-13T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may override security policies to bypass controls and maintain persistent access. SOC teams should proactively hunt for user overrides in Azure Sentinel to identify potential policy circumvention and detect stealthy lateral movement or privilege escalation attempts.

KQL Query

EmailEvents  
| where UserLevelPolicy!="" and UserLevelAction == "Allow" //"Block"
| extend UserPolicy = split(UserLevelPolicy, "(", 0)
| summarize count() by tostring(UserPolicy)
| render piechart

Analytic Rule Definition

id: fe2cb53e-4eb3-4676-87c1-f80d2813f542
name: Top policies performing user overrides
description: |
  This query helps in reviewing top policies for user overrides (Allow/Block)
description-detailed: |
  This query helps in reviewing top policies for user defined detection overrides (Allow/Block)in Defender for Office 365
  Reference - https://learn.microsoft.com/en-us/defender-office-365/step-by-step-guides/understand-overrides-in-email-entity and https://techcommunity.microsoft.com/t5/microsoft-defender-for-office/email-protection-basics-in-microsoft-365-part-five-mastering/ba-p/4139035
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  EmailEvents  
  | where UserLevelPolicy!="" and UserLevelAction == "Allow" //"Block"
  | extend UserPolicy = split(UserLevelPolicy, "(", 0)
  | summarize count() by tostring(UserPolicy)
  | render piechart
version: 1.0.0

Required Data Sources

Sentinel TableNotes
EmailEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Email and Collaboration Queries/Overrides/Top policies performing user overrides.yaml