How the attack works
Exchange Online records what administrators, delegates and owners do in mailboxes, and Microsoft 365 collects those records in the unified audit log. Several settings switch parts of this off. Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $false turns off auditing for the whole Microsoft 365 organization; Microsoft documents that the Office 365 Management Activity API and Microsoft Sentinel then no longer receive audit data. Set-OrganizationConfig -AuditDisabled $true turns off mailbox auditing on by default. Set-MailboxAuditBypassAssociation -AuditBypassEnabled $true exempts one account: Microsoft documents that none of its owner, delegate or admin actions in any mailbox are then logged. Set-Mailbox with AuditOwner, AuditDelegate or AuditAdmin changes which actions are audited on one mailbox, and Microsoft states that organization auditing does not override that list, so an action such as MailItemsAccessed can be removed from a single mailbox.
The bypass was designed for service accounts that open many mailboxes. For an attacker it is a way to read mailboxes through an account whose activity is not recorded, which is why Microsoft tells administrators to review bypass associations regularly. The cmdlets themselves are Exchange admin operations and are written to the unified audit log, so the change is visible even when what follows is not.
What an attacker needs
- An account with the Audit Logs role (Organization Management, Compliance Management and Records Management hold it by default) to turn organization auditing on or off, or a role that includes the bypass and organization configuration cmdlets.
Impact
Mailbox access and changes by the bypassed account, or by everyone, leave no mailbox audit trail. Investigations of a later mailbox compromise then have no record of which messages were read or sent.
Detection rules
Exchange or Microsoft 365 Audit Logging Setting Changed
Detects a change to the settings that turn audit logging on or off: Set-AdminAuditLogConfig with UnifiedAuditLogIngestionEnabled (auditing for the Microsoft 365 organization), Set-OrganizationConfig with AuditDisabled (mailbox auditing on by default) and Set-Mailbox with AuditEnabled (one mailbox). The parameter name is matched in the Parameters array, so turning auditing back on matches as well. Requires Microsoft 365 audit logging and the Exchange records of the unified audit log in the SIEM.
title: Exchange or Microsoft 365 Audit Logging Setting Changed
id: 59b081ff-bc5f-4f4a-b458-798cdd051a81
status: experimental
description: >-
Detects a change to the settings that turn audit logging on or off:
Set-AdminAuditLogConfig with UnifiedAuditLogIngestionEnabled (auditing for the
Microsoft 365 organization), Set-OrganizationConfig with AuditDisabled
(mailbox auditing on by default) and Set-Mailbox with AuditEnabled (one
mailbox). The parameter name is matched in the Parameters array, so turning
auditing back on matches as well. Requires Microsoft 365 audit logging and
the Exchange records of the unified audit log in the SIEM.
references:
- https://attack.mitre.org/techniques/T1685/002/
- https://learn.microsoft.com/en-us/purview/audit-log-enable-disable
- https://learn.microsoft.com/en-us/purview/audit-mailboxes
author: Forestall
date: 2026-11-11
tags:
- attack.defense-impairment
- attack.t1685.002
logsource:
product: m365
service: exchange
detection:
selection_unified_audit_log:
Operation: Set-AdminAuditLogConfig
Parameters|contains: UnifiedAuditLogIngestionEnabled
selection_organization:
Operation: Set-OrganizationConfig
Parameters|contains: AuditDisabled
selection_mailbox:
Operation: Set-Mailbox
Parameters|contains: AuditEnabled
condition: 1 of selection_*
falsepositives:
- Administrators turning auditing on, which uses the same parameters with the safe value. Read the value in Parameters. Mailbox provisioning scripts that set AuditEnabled can be allow-listed by UserId after review.
level: high
False positives
- Administrators turning auditing on, which uses the same parameters with the safe value. Read the value in Parameters. Mailbox provisioning scripts that set AuditEnabled can be allow-listed by UserId after review.
Mailbox Audit Bypass Association Changed
Detects Set-MailboxAuditBypassAssociation in Exchange Online. With AuditBypassEnabled set to true, no mailbox action of the account is logged in any mailbox it can open. Microsoft recommends reviewing bypass associations regularly, so every change deserves a look. Requires Microsoft 365 audit logging and the Exchange records of the unified audit log in the SIEM.
title: Mailbox Audit Bypass Association Changed
id: 59b79132-db6f-4045-aa50-dc772dbc5974
status: experimental
description: >-
Detects Set-MailboxAuditBypassAssociation in Exchange Online. With
AuditBypassEnabled set to true, no mailbox action of the account is logged in
any mailbox it can open. Microsoft recommends reviewing bypass associations
regularly, so every change deserves a look. Requires Microsoft 365 audit
logging and the Exchange records of the unified audit log in the SIEM.
references:
- https://attack.mitre.org/techniques/T1685/002/
- https://learn.microsoft.com/en-us/purview/audit-mailboxes#bypass-mailbox-audit-logging
- https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/set-mailboxauditbypassassociation
author: Forestall
date: 2026-11-11
tags:
- attack.defense-impairment
- attack.t1685.002
logsource:
product: m365
service: exchange
detection:
selection:
Operation: Set-MailboxAuditBypassAssociation
condition: selection
falsepositives:
- Administrators adding a documented service account, or removing a bypass (AuditBypassEnabled false in Parameters), which is the fix. Read the value before escalating.
level: high
False positives
- Administrators adding a documented service account, or removing a bypass (AuditBypassEnabled false in Parameters), which is the fix. Read the value before escalating.
Audited Mailbox Actions Changed for a Mailbox
Detects Set-Mailbox with the AuditOwner, AuditDelegate or AuditAdmin parameter, which replaces, adds or removes the mailbox actions that are audited for one sign-in type on a user or shared mailbox. Microsoft documents that mailbox auditing on by default in the organization does not override these mailbox-level settings, so removing an action such as MailItemsAccessed, Send or UpdateInboxRules from a mailbox stops those records for it while organization auditing stays on and the organization-level rules of this page stay silent. Microsoft also states that a customized mailbox no longer receives the new default actions it releases. The parameter name is matched in the Parameters array, so adding an action matches as well. Restoring the defaults uses DefaultAuditSet and is not matched. Requires Microsoft 365 audit logging and the Exchange records of the unified audit log in the SIEM.
title: Audited Mailbox Actions Changed for a Mailbox
id: 8925be40-9126-4097-9d65-276c434ef559
status: experimental
description: >-
Detects Set-Mailbox with the AuditOwner, AuditDelegate or AuditAdmin
parameter, which replaces, adds or removes the mailbox actions that are
audited for one sign-in type on a user or shared mailbox. Microsoft
documents that mailbox auditing on by default in the organization does
not override these mailbox-level settings, so removing an action such as
MailItemsAccessed, Send or UpdateInboxRules from a mailbox stops those
records for it while organization auditing stays on and the
organization-level rules of this page stay silent. Microsoft also states
that a customized mailbox no longer receives the new default actions it
releases. The parameter name is matched in the Parameters array, so adding
an action matches as well. Restoring the defaults uses DefaultAuditSet and
is not matched. Requires Microsoft 365 audit logging and the Exchange
records of the unified audit log in the SIEM.
references:
- https://learn.microsoft.com/en-us/purview/audit-mailboxes#change-or-restore-mailbox-actions-logged-by-default
- https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/set-mailbox
- https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-schema#exchange-admin-schema
- https://attack.mitre.org/techniques/T1685/002/
author: Forestall
date: 2026-11-18
tags:
- attack.defense-impairment
- attack.t1685.002
logsource:
product: m365
service: exchange
detection:
selection:
Operation: Set-Mailbox
Parameters|contains:
- AuditOwner
- AuditDelegate
- AuditAdmin
condition: selection
falsepositives:
- Administrators who add an action to the audited set, for example MailboxLogin, as Microsoft's own example does. Read the value in Parameters. A list that no longer holds MailItemsAccessed, Send, SendAs or UpdateInboxRules, or a Remove entry, is the signal.
- Compliance projects that set a custom audit set on many mailboxes at once. Confirm the change record and filter the administrator in UserId for its duration.
level: high
False positives
- Administrators who add an action to the audited set, for example MailboxLogin, as Microsoft's own example does. Read the value in Parameters. A list that no longer holds MailItemsAccessed, Send, SendAs or UpdateInboxRules, or a Remove entry, is the signal.
- Compliance projects that set a custom audit set on many mailboxes at once. Confirm the change record and filter the administrator in UserId for its duration.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Mailbox stops writing MailItemsAccessed while its owner keeps signing in
A mailbox that is in daily use writes MailItemsAccessed records every day. When they stop while the owner still signs in to Exchange Online, something between the mailbox and the audit log changed: a bypass, a changed audit set on the mailbox, or a change of the user's license, since Microsoft enables the action by default only for E3 and E5 licenses. The rules on this page see the first two as cmdlets. This comparison also shows a gap whose cause was not caught.
- Exchange mailbox records: count
MailItemsAccessedperMailboxOwnerUPNper day over the last 14 days, and keep the mailboxes that had records on most of those days. - Microsoft Entra sign-in logs: successful sign-ins (
ResultType0) of the same user to Exchange Online on the day being checked. - Alert when a kept mailbox has no
MailItemsAccessedrecord for that day although the owner signed in, and look forSet-MailboxAuditBypassAssociation,Set-Mailboxwith an audit parameter, or a license change for that user in the days before.
EventsMailItemsAccessed
LimitsHolidays, absence, a mailbox that is only signed in to and not read, and delays of the audit pipeline produce empty days. Microsoft deduplicates records of the same access within an hour, so counts vary. Users without an E3 or E5 license have no baseline. The 14 days are a starting point.
Triage
- Read
Parametersfor the setting and its value.AuditBypassEnabledTrue,UnifiedAuditLogIngestionEnabledFalse andAuditDisabledTrue are the dangerous values; the opposite values are a repair. - For a bypass, identify the account in
ObjectIdorIdentity, what mailbox permissions it holds and whether it is a known service account. - Identify who made the change in
UserIdand whether that account elevated or signed in unusually just before. - Restore the setting, then assume the bypassed or unaudited period needs review from other sources such as sign-in logs and message trace.
Response
Once the attack is confirmed:
- Contain the administrator account that made the change. Revoke its sessions, reset its credentials and remove it from the role groups that hold the Audit Logs and Organization Configuration roles.
- For a bypass, remove the association, then remove the mailbox permissions of the bypassed account that have no owner or purpose. Treat every mailbox it could open as possibly read.
- After turning organization auditing back on, check the setting again later. Microsoft notes that enabling auditing can take up to 60 minutes to take effect and that events can take several hours to become searchable.
- No mailbox audit records exist for the gap, so inspect the current state of the mailboxes the account could reach. Look at inbox rules, mailbox forwarding and delegate permissions, and remove what nobody can explain.
- Review the other audit settings in the same pass, that is organization audit ingestion, mailbox auditing on by default,
AuditEnabledon individual mailboxes and all bypass associations. One changed setting is a reason to check the rest.
Mitigation
- Keep unified audit log ingestion on and mailbox auditing on by default, and verify both settings on a schedule.
- Keep no mailbox audit bypass associations, or only for documented service accounts with an owner.
- Limit the role groups that hold the Audit Logs and Organization Configuration roles, and use just-in-time elevation.
- Forward the unified audit log to a SIEM, so the record of the change survives outside the tenant.
Frequently asked questions
If auditing was turned off, how can the change itself still be detected?
The cmdlets that change these settings are Exchange admin operations and are written to the unified audit log, so the change is visible even when what follows is not. Microsoft documents that audit records are logged when auditing is turned on or off. Forwarding the log to a SIEM keeps that record outside the tenant.
What exactly does a mailbox audit bypass hide?
Microsoft documents that when a bypass association is enabled for an account, none of its owner, delegate or admin actions in any mailbox are logged. The setting was designed for service accounts that open many mailboxes. For an attacker it turns the account into a way to read mailboxes without a record.
Does an alert from these rules always mean that auditing was weakened?
No. The rules match the cmdlet and the parameter name, so turning auditing back on or removing a bypass matches as well. Read the value in Parameters. AuditBypassEnabled True, UnifiedAuditLogIngestionEnabled False and AuditDisabled True are the dangerous values, and the opposite values are a repair.
Can the records of the unaudited period be recovered afterwards?
No. Actions taken while auditing was off, or by an account while it was bypassed, left no mailbox audit records, and restoring the setting does not create them later. Review that period from other sources, such as sign-in logs and message trace.
References
- Microsoft Learn: Manage mailbox auditing, bypass mailbox audit logging
- Microsoft Learn: Set-MailboxAuditBypassAssociation
- Microsoft Learn: Turn auditing on or off
- Microsoft Learn: Set-AdminAuditLogConfig
- MITRE ATT&CK T1685.002: Disable or Modify Cloud Log
- Microsoft Learn: Manage mailbox auditing, change or restore mailbox actions logged by default
- Microsoft Learn: Set-Mailbox
- Microsoft Learn: Use MailItemsAccessed to investigate compromised accounts (licensing, deduplication)
- Azure Monitor Logs reference: SigninLogs