Excessive Microsoft 365 Mailbox Items Accessed

Identifies an excessive number of Microsoft 365 mailbox items accessed by a user either via aggregated counts or throttling. Microsoft audits mailbox access via the MailItemsAccessed event, which is triggered when a user accesses mailbox items. If more than 1000 mailbox items are accessed within a 24-hour period, it is then throttled. Excessive mailbox access may indicate an adversary attempting to exfiltrate sensitive information or perform reconnaissance on a target's mailbox. This rule detects both the throttled and unthrottled events with a high threshold.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2025/06/17"
  3integration = ["o365"]
  4maturity = "production"
  5updated_date = "2025/06/17"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies an excessive number of Microsoft 365 mailbox items accessed by a user either via aggregated counts or
 11throttling. Microsoft audits mailbox access via the MailItemsAccessed event, which is triggered when a user accesses
 12mailbox items. If more than 1000 mailbox items are accessed within a 24-hour period, it is then throttled. Excessive
 13mailbox access may indicate an adversary attempting to exfiltrate sensitive information or perform reconnaissance on a
 14target's mailbox. This rule detects both the throttled and unthrottled events with a high threshold.
 15"""
 16false_positives = [
 17    """
 18    Legitimate users may access a large number of mailbox items in a short period, especially in environments with high
 19    email volume or during data migrations. If this is expected behavior, consider adjusting the rule or adding
 20    exceptions for specific users or groups.
 21    """,
 22]
 23from = "now-9m"
 24index = ["filebeat-*", "logs-o365.audit-*"]
 25language = "kuery"
 26license = "Elastic License v2"
 27name = "Excessive Microsoft 365 Mailbox Items Accessed"
 28note = """## Triage and analysis
 29
 30### Investigating Excessive Microsoft 365 Mailbox Items Accessed
 31
 32Identifies an excessive number of Microsoft 365 mailbox items accessed by a user either via aggregated counts or throttling. Microsoft audits mailbox access via the MailItemsAccessed event, which is triggered when a user accesses mailbox items. If more than 1000 mailbox items are accessed within a 24-hour period, it is then throttled. Excessive mailbox access may indicate an adversary attempting to exfiltrate sensitive information or perform reconnaissance on a target's mailbox. This rule detects both the throttled and unthrottled events with a high threshold.
 33
 34### Possible investigation steps
 35- Review `host.name` to identify the tenant where the mailbox access occurred.
 36- Review `o365.audit.UserId` or `o365.audit.MailboxOwnerUPN` to identify the user associated with the mailbox access.
 37- Examine `o365.audit.ExternalAccess` to determine if the mailbox access was performed by an external user or application.
 38- Check the geolocation data to identify the location from which the mailbox access occurred. Is this an expected location for the user?
 39- Check `o365.audit.ClientAppId` to identify the application used for mailbox access. Look for any unusual or unexpected applications but be aware that some legitimate applications may also trigger this rule if OAuth phishing was used.
 40- Review `o365.audit.Folders.Path` and `o365.audit.Folders.FolderItems.Id` to identify the specific folders and items accessed within the mailbox. Look for any sensitive or high-value folders that may indicate targeted access.
 41- For specific items accessed, examine `o365.audit.Folders.FolderItems.Id` to gather more context on the accessed mailbox items.
 42- User types can be identified by checking `o365.audit.UserType`. Review if the mailbox of the user is a member, admin or delegate.
 43- If Entra ID logs are available, checking the risk status via `azure.signinlogs.properties.risk_state` and `azure.signinlogs.properties.risk_level` can provide additional context on the user's risk status during the mailbox access.
 44
 45### False positive analysis
 46- Legitimate users may access a large number of mailbox items in a short period, especially in environments with high email volume or during data migrations. If this is expected behavior, consider adjusting the rule or adding exceptions for specific users or groups.
 47- Automated processes or scripts that access mailbox items may also trigger this rule. If these processes are legitimate and necessary, consider adding exceptions for the specific applications or users involved.
 48- Users with high email activity, such as helpdesk or support roles, may trigger this rule due to their job responsibilities. If this is expected behavior, consider adjusting the rule or adding exceptions for specific users or groups.
 49
 50### Response and remediation
 51- Investigate the user account associated with the excessive mailbox access to determine if it has been compromised or if the activity is expected behavior.
 52- If the mailbox access is confirmed to be suspicious or unauthorized, take immediate action to revoke the access token and prevent further access.
 53- Disable the user account temporarily to prevent any potential compromise or unauthorized access.
 54- Review the user's recent sign-in activity and access patterns to identify any potential compromise or unauthorized access.
 55- If the user account is compromised, initiate a password reset and enforce multi-factor authentication (MFA) for the user.
 56- Review the conditional access policies in place to ensure they are sufficient to prevent unauthorized access to sensitive resources.
 57- Examine how the mailbox access was performed. If it was done via a third-party application, review the permissions granted to that application and consider revoking them if they are not necessary.
 58"""
 59references = [
 60    "https://learn.microsoft.com/en-us/purview/audit-log-investigate-accounts#use-mailitemsaccessed-audit-records-for-forensic-investigations",
 61    "https://www.microsoft.com/en-us/security/blog/2025/05/27/new-russia-affiliated-actor-void-blizzard-targets-critical-sectors-for-espionage/",
 62]
 63risk_score = 47
 64rule_id = "7fc95782-4bd1-11f0-9838-f661ea17fbcd"
 65severity = "medium"
 66tags = [
 67    "Domain: Cloud",
 68    "Domain: Email",
 69    "Data Source: Microsoft 365",
 70    "Data Source: Microsoft 365 Audit Logs",
 71    "Use Case: Threat Detection",
 72    "Tactic: Collection",
 73    "Resources: Investigation Guide",
 74]
 75timestamp_override = "event.ingested"
 76type = "query"
 77
 78query = '''
 79event.dataset: "o365.audit" and
 80    event.provider: "Exchange" and
 81    event.action: "MailItemsAccessed" and
 82    event.code: "ExchangeItemAggregated" and
 83    (
 84        (
 85            o365.audit.OperationProperties.Name: "IsThrottled" and
 86            o365.audit.OperationProperties.Value: "True"
 87        ) or o365.audit.OperationCount >= 100
 88    )
 89'''
 90
 91
 92[[rule.threat]]
 93framework = "MITRE ATT&CK"
 94[[rule.threat.technique]]
 95id = "T1114"
 96name = "Email Collection"
 97reference = "https://attack.mitre.org/techniques/T1114/"
 98[[rule.threat.technique.subtechnique]]
 99id = "T1114.002"
100name = "Remote Email Collection"
101reference = "https://attack.mitre.org/techniques/T1114/002/"
102
103
104
105[rule.threat.tactic]
106id = "TA0009"
107name = "Collection"
108reference = "https://attack.mitre.org/tactics/TA0009/"
109
110[rule.investigation_fields]
111field_names = [
112    "user.id",
113    "user.name",
114    "user.email",
115    "user.domain",
116    "event.id",
117    "event.action",
118    "event.outcome",
119    "event.provider",
120    "source.ip",
121    "related.ip",
122    "related.user",
123    "o365.audit.ClientAppId",
124    "o365.audit.AppId",
125    "o365.audit.AppAccessContext.UniqueTokenId",
126    "o365.audit.OperationCount",
127    "o365.audit.MailboxOwnerUPN",
128    "o365.audit.MailboxOwnerSid",
129    "o365.audit.MailboxGuid",
130    "o365.audit.UserKey",
131    "o365.audit.LogonUserSid",
132    "o365.audit.TokenTenantId",
133    "o365.audit.OriginatingServer",
134    "o365.audit.ClientInfoString",
135    "o365.audit.CreationTime",
136    "o365.audit.ResultStatus",
137    "source.geo.country_iso_code",
138    "source.geo.country_name",
139    "source.geo.continent_name",
140    "source.geo.location",
141    "cloud.account.id",
142    "cloud.provider",
143    "cloud.region",
144    "cloud.service.name",
145]

Triage and analysis

Investigating Excessive Microsoft 365 Mailbox Items Accessed

Identifies an excessive number of Microsoft 365 mailbox items accessed by a user either via aggregated counts or throttling. Microsoft audits mailbox access via the MailItemsAccessed event, which is triggered when a user accesses mailbox items. If more than 1000 mailbox items are accessed within a 24-hour period, it is then throttled. Excessive mailbox access may indicate an adversary attempting to exfiltrate sensitive information or perform reconnaissance on a target's mailbox. This rule detects both the throttled and unthrottled events with a high threshold.

Possible investigation steps

  • Review host.name to identify the tenant where the mailbox access occurred.
  • Review o365.audit.UserId or o365.audit.MailboxOwnerUPN to identify the user associated with the mailbox access.
  • Examine o365.audit.ExternalAccess to determine if the mailbox access was performed by an external user or application.
  • Check the geolocation data to identify the location from which the mailbox access occurred. Is this an expected location for the user?
  • Check o365.audit.ClientAppId to identify the application used for mailbox access. Look for any unusual or unexpected applications but be aware that some legitimate applications may also trigger this rule if OAuth phishing was used.
  • Review o365.audit.Folders.Path and o365.audit.Folders.FolderItems.Id to identify the specific folders and items accessed within the mailbox. Look for any sensitive or high-value folders that may indicate targeted access.
  • For specific items accessed, examine o365.audit.Folders.FolderItems.Id to gather more context on the accessed mailbox items.
  • User types can be identified by checking o365.audit.UserType. Review if the mailbox of the user is a member, admin or delegate.
  • If Entra ID logs are available, checking the risk status via azure.signinlogs.properties.risk_state and azure.signinlogs.properties.risk_level can provide additional context on the user's risk status during the mailbox access.

False positive analysis

  • Legitimate users may access a large number of mailbox items in a short period, especially in environments with high email volume or during data migrations. If this is expected behavior, consider adjusting the rule or adding exceptions for specific users or groups.
  • Automated processes or scripts that access mailbox items may also trigger this rule. If these processes are legitimate and necessary, consider adding exceptions for the specific applications or users involved.
  • Users with high email activity, such as helpdesk or support roles, may trigger this rule due to their job responsibilities. If this is expected behavior, consider adjusting the rule or adding exceptions for specific users or groups.

Response and remediation

  • Investigate the user account associated with the excessive mailbox access to determine if it has been compromised or if the activity is expected behavior.
  • If the mailbox access is confirmed to be suspicious or unauthorized, take immediate action to revoke the access token and prevent further access.
  • Disable the user account temporarily to prevent any potential compromise or unauthorized access.
  • Review the user's recent sign-in activity and access patterns to identify any potential compromise or unauthorized access.
  • If the user account is compromised, initiate a password reset and enforce multi-factor authentication (MFA) for the user.
  • Review the conditional access policies in place to ensure they are sufficient to prevent unauthorized access to sensitive resources.
  • Examine how the mailbox access was performed. If it was done via a third-party application, review the permissions granted to that application and consider revoking them if they are not necessary.

References

Related rules

to-top