0 XP

Customizing audit, bypass and retention

Customizing the audited actions

Add actions per sign-in type with Set-Mailbox: -AuditOwner, -AuditDelegate or -AuditAdmin. For example: Set-Mailbox -Identity ana -AuditOwner @{Add="MailboxLogin"}. This is PowerShell-only.

The side effect: customizing removes that sign-in type from DefaultAuditSet, so Microsoft stops adding new default actions for it on that mailbox. Delegate and Admin are untouched by an AuditOwner change. To go back, run Set-Mailbox -DefaultAuditSet Admin,Delegate,Owner.

Group mailbox actions can't be customized. Microsoft 365 group mailboxes keep the default set; neither Set-UnifiedGroup nor the EAC offers a way to change it.

Bypassing a noisy account

For a service account that floods the log:

  • Set-MailboxAuditBypassAssociation -Identity svc-backup -AuditByPassEnabled $true
  • Check it with Get-MailboxAuditBypassAssociation.

A bypass stops all of that user's owner, delegate and admin actions from being logged. Setting AuditEnabled $false on a mailbox does nothing while on-by-default is active.

Turning it off for everyone

Set-OrganizationConfig -AuditDisabled $true turns mailbox auditing off organization-wide. It ignores mailbox AuditEnabled values and bypass associations, and keeps existing records. It is a blunt instrument; use a bypass for one account instead.

Retention lives in Purview

"The AuditLogAgeLimit property is no longer applicable." Audit retention is managed with audit log retention policies in the Purview portal.

  • Audit (Standard) keeps records for 180 days. It changed from 90 days for logs created on or after Oct 17, 2023.
  • Audit (Premium) keeps Entra ID, Exchange, OneDrive and SharePoint records for 1 year by default.
  • Custom retention policies can extend this to 10 years, which needs the 10-Year Audit Log Retention add-on license and isn't retroactive.

Search the log in the Purview portal or with Search-UnifiedAuditLog in Exchange Online PowerShell.

Trap

AuditDisabled is an on/off switch, not a retention setting. An auditor who wants records kept longer gets a Purview retention policy, not an Exchange cmdlet.

Knowledge check

4 questions on what you just read. Each answer shows the full explanation and its source.

Loading…