← Back to SOC feed Coverage →

Hunt for Admin email access

kql MEDIUM Azure-Sentinel
T1078
CloudAppEventsEmailEvents
backdoorhuntingmicrosoftofficial
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-10T11:00:00Z · Confidence: medium

Hunt Hypothesis

Administrators accessing email accounts may indicate potential lateral movement or privilege escalation by adversaries seeking to compromise internal communications. SOC teams should proactively hunt for this behavior to identify unauthorized access attempts and mitigate the risk of data exfiltration or command and control activities.

KQL Query

CloudAppEvents
| where ActionType == "AdminMailAccess"
| extend data = RawEventData["ExtendedProperties"]
| extend OpenedMailbox = data[1].["Value"]
| extend OpenedEmail = url_decode(tostring(data[2].["Value"]))
| project AccountDisplayName, ActionType, OpenedMailbox, OpenedEmail
| join EmailEvents on $left.OpenedEmail == $right.InternetMessageId
| project Timestamp , Actor = AccountDisplayName, ActionType, OpenedMailbox, SenderFromAddress, RecipientEmailAddress, Subject
| order by Timestamp desc

Analytic Rule Definition

id: e55e178e-48ba-4313-918a-2d3e16a95441
name: Hunt for Admin email access
description: |
  This query helps report on email access by administrators
description-detailed: |
  This query helps report on email access by administrators using the CloudAppEvents table log information.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - CloudAppEvents
tactics:
- PrivilegeEscalation
relevantTechniques:
  - T1078
query: |
  CloudAppEvents
  | where ActionType == "AdminMailAccess"
  | extend data = RawEventData["ExtendedProperties"]
  | extend OpenedMailbox = data[1].["Value"]
  | extend OpenedEmail = url_decode(tostring(data[2].["Value"]))
  | project AccountDisplayName, ActionType, OpenedMailbox, OpenedEmail
  | join EmailEvents on $left.OpenedEmail == $right.InternetMessageId
  | project Timestamp , Actor = AccountDisplayName, ActionType, OpenedMailbox, SenderFromAddress, RecipientEmailAddress, Subject
  | order by Timestamp desc
version: 1.0.0

Required Data Sources

Sentinel TableNotes
CloudAppEventsEnsure this data connector is enabled
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/General/Hunt for Admin email access.yaml