Exchange ServerHow-to

Who did what in Exchange Server: the admin audit log and mailbox audit logging

Answer 'who changed this?' and 'who opened that mailbox?' on Exchange Server: search the admin audit log, enable mailbox auditing and know what each log can't tell you.

"Who removed that mailbox permission?" and "Who deleted mail from the CEO's mailbox?" are different questions, and Exchange Server answers them from two different logs. The admin audit log records configuration changes made through the shell or the Exchange admin center. Mailbox audit logging records what people do inside a mailbox. In this post I'll show how to check that both are capturing what you need, search them, and avoid the gaps that make an investigation come up empty.

How this guide is organized: How the two logs work → Step-by-step → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How the two logs work. 2. Step-by-step (3 steps: Check the configuration; Search it; Send big searches by email). 3. Step-by-step. 4. Verify. 5. Tips & gotchas. Toolbox: Search-MailboxAuditLog, Search-AdminAuditLog, New-AdminAuditLogSearch, compliance management › auditing, AdminAuditLogAgeLimit.1How the twologs work2Step-by-step3Step-by-step4Verify5Tips & gotchas1Check the configuration2Search it3Send big searches byemailTOOLBOXSearch-MailboxAuditLogSearch-AdminAuditLogNew-AdminAuditLogSearchcompliance management › auditingAdminAuditLogAgeLimitHow this guide is organized: How the two logs work → Step-by-step → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How the two logs work. 2. Step-by-step (3 steps: Check the configuration; Search it; Send big searches by email). 3. Step-by-step. 4. Verify. 5. Tips & gotchas. Toolbox: Search-MailboxAuditLog, Search-AdminAuditLog, New-AdminAuditLogSearch, compliance management › auditing, AdminAuditLogAgeLimit.1How the two logs work2Step-by-step1Check the configuration2Search it3Send big searches by email3Step-by-step4Verify5Tips & gotchasTOOLBOXSearch-MailboxAuditLogSearch-AdminAuditLogNew-AdminAuditLogSearchcompliance management › auditingAdminAuditLogAgeLimit
At a glance: how this guide is organized · 3 steps · 5 key settings and tools

How the two logs work#

Which Exchange audit log answers your questionWhat do you need to find out? if Who changed config: Search the admin audit log (Add -ResultSize past 1,000 matches, or send big searches by email.); if Mailbox actions: Is auditing enabled on that mailbox (AuditEnabled)? if No: Turn on mailbox audit logging (It's off until you enable it per mailbox, so earlier actions weren't recorded.); if Yes: How many mailboxes do you need to search? if One: Search that mailbox's audit log (Owner actions need -ShowDetails, which works with one mailbox only.); if Several: Run a mailbox audit log search (The results arrive by email.)What do you need to find out?FIXSearch the admin auditlogAdd -ResultSize past 1,000matches, or send bigsearches by email.Who changed configIs auditing enabled on thatmailbox (AuditEnabled)?NOTETurn on mailbox auditloggingIt's off until you enable itper mailbox, so earlieractions weren't recorded.NoHow many mailboxes do youneed to search?FIXSearch that mailbox'saudit logOwner actions need-ShowDetails, which workswith one mailbox only.OneFIXRun a mailbox audit logsearchThe results arrive by email.SeveralYesMailbox actionsWhich Exchange audit log answers your questionWhat do you need to find out? if Who changed config: Search the admin audit log (Add -ResultSize past 1,000 matches, or send big searches by email.); if Mailbox actions: Is auditing enabled on that mailbox (AuditEnabled)? if No: Turn on mailbox audit logging (It's off until you enable it per mailbox, so earlier actions weren't recorded.); if Yes: How many mailboxes do you need to search? if One: Search that mailbox's audit log (Owner actions need -ShowDetails, which works with one mailbox only.); if Several: Run a mailbox audit log search (The results arrive by email.)What do you need to find out?Who changed configFIXSearch the admin audit logAdd -ResultSize past 1,000 matches, or send bigsearches by email.Mailbox actionsIs auditing enabled on that mailbox(AuditEnabled)?NoNOTETurn on mailbox audit loggingIt's off until you enable it per mailbox, so earlieractions weren't recorded.YesHow many mailboxes do you need tosearch?OneFIXSearch that mailbox's audit logOwner actions need -ShowDetails, whichworks with one mailbox only.SeveralFIXRun a mailbox audit log searchThe results arrive by email.
Figure 1 · Decision tree Which Exchange audit log answers your question. Pick the log that holds the answer, then the search that fits. Accounts with an audit bypass leave no mailbox audit trail.
Admin audit logMailbox audit log
RecordsCmdlets that change things, whether run in the shell or by the EACActions inside a mailbox by admins, delegates and (optionally) the owner
Default stateEnabled in new installations; all cmdlets and parametersOff until you enable it per mailbox
Stored inA hidden arbitration mailboxThe mailbox itself: Recoverable Items\Audits
Kept for90 days (AdminAuditLogAgeLimit)90 days (AuditLogAgeLimit per mailbox)
Search withSearch-AdminAuditLog, New-AdminAuditLogSearchSearch-MailboxAuditLog, New-MailboxAuditLogSearch

The admin audit log is about changes, not views: it won't tell you who ran a Get- cmdlet, and Test- cmdlets aren't logged by default. In mailbox auditing, someone with Full Access counts as a delegate; the admin logon type is reserved for eDiscovery searches, mailbox export requests and MAPI/CDO access.

Step-by-step: the admin audit log#

1. Check the configuration#

PowerShell
Get-AdminAuditLogConfig | Format-List AdminAuditLogEnabled, AdminAuditLogAgeLimit, AdminAuditLogCmdlets, AdminAuditLogParameters, AdminAuditLogExcludedCmdlets, LogLevel, TestCmdletLoggingEnabled

Good looks like AdminAuditLogEnabled : True with * for cmdlets and parameters. To keep a year of history and record old and new values of every changed property:

PowerShell
Set-AdminAuditLogConfig -AdminAuditLogAgeLimit 365 -LogLevel Verbose

Open shells pick up configuration changes within 60 minutes; reopen the shell to apply them at once.

2. Search it#

PowerShell
Search-AdminAuditLog -Cmdlets Add-MailboxPermission,Remove-MailboxPermission,Set-Mailbox,Remove-Mailbox `
    -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) -ResultSize 5000 |
    Where-Object { $_.ObjectModified -like "*Lina Haddad*" } |
    Sort-Object RunDate | Format-Table RunDate, Caller, CmdletName, ObjectModified, Succeeded -AutoSize

Without -ResultSize you get only the first 1,000 matches. RunDate is stored in UTC. The parameter values aren't shown in the default output, so expand them:

PowerShell
$hits = Search-AdminAuditLog -Cmdlets Set-Mailbox -StartDate (Get-Date).AddDays(-7) -EndDate (Get-Date)
$hits | ForEach-Object {
    "{0}  {1}  {2}  {3}" -f $_.RunDate, $_.Caller, $_.ObjectModified,
        (($_.CmdletParameters | ForEach-Object { "-$($_.Name) $($_.Value)" }) -join ' ')
}

With verbose logging on, $hits.ModifiedProperties also shows the old and new values.

3. Send big searches by email#

PowerShell
New-AdminAuditLogSearch -Name "Permission changes Q3" -Cmdlets Add-MailboxPermission,Remove-MailboxPermission `
    -StartDate (Get-Date).AddDays(-90) -EndDate (Get-Date) -StatusMailRecipients auditor@contoso.com

The results arrive as an XML attachment (up to 10 MB) within about 15 minutes. Outlook on the web doesn't open XML attachments by default, so use Outlook. In the EAC, the same reports are under compliance management › auditing.

Step-by-step: mailbox audit logging#

1. Turn it on and choose the actions#

PowerShell
Get-Mailbox lina | Format-List AuditEnabled, AuditLogAgeLimit, AuditAdmin, AuditDelegate, AuditOwner

Set-Mailbox lina -AuditEnabled $true -AuditLogAgeLimit 180.00:00:00 `
    -AuditOwner @{Add="HardDelete","SoftDelete","MoveToDeletedItems"}

# All user and shared mailboxes
Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox,SharedMailbox | Set-Mailbox -AuditEnabled $true

Once enabled, the main admin and delegate actions (such as Update, SoftDelete, HardDelete, SendAs and, for admins, FolderBind and Move) are audited by default. Owner actions aren't audited until you add them, which is why the example adds deletions. Exchange 2019 adds operations such as UpdateInboxRules and UpdateFolderPermissions; check your Audit* lists if you need them.

2. Search one mailbox#

PowerShell
Search-MailboxAuditLog -Identity lina -LogonTypes Admin,Delegate -ShowDetails `
    -StartDate (Get-Date).AddDays(-14) -EndDate (Get-Date) -ResultSize 5000 |
    Format-Table LastAccessed, Operation, LogonType, LogonUserDisplayName, FolderPathName, ItemSubject, ClientIPAddress -AutoSize

# What did the owner delete?
Search-MailboxAuditLog -Identity lina -LogonTypes Owner -ShowDetails -Operations HardDelete,SoftDelete `
    -StartDate (Get-Date).AddDays(-14) -EndDate (Get-Date)

The Owner logon type needs -ShowDetails, and -ShowDetails works only with -Identity (one mailbox).

3. Search several mailboxes#

PowerShell
New-MailboxAuditLogSearch -Mailboxes lina,omar -LogonTypes Admin,Delegate `
    -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) -StatusMailRecipients auditor@contoso.com

In the EAC, compliance management › auditing also offers a non-owner mailbox access report.

Verify#

  • Make a harmless change, such as Set-Mailbox testuser -CustomAttribute15 "audit test", wait up to 15 minutes for indexing, then find it with Search-AdminAuditLog -Cmdlets Set-Mailbox.
  • Open a test mailbox with a Full Access account, delete an item, and confirm a Delegate entry appears in Search-MailboxAuditLog.
  • List mailboxes that still aren't audited: Get-Mailbox -ResultSize Unlimited | Where-Object { -not $_.AuditEnabled } | Select-Object Name.

Tips & gotchas#

  • Lowering AdminAuditLogAgeLimit deletes every entry older than the new limit, and 0 deletes them all. Limit who can change it, and check with my Exchange Server RBAC guide.
  • Accounts with an audit bypass leave no mailbox audit trail. Review them: Get-MailboxAuditBypassAssociation -ResultSize Unlimited | Where-Object { $_.AuditBypassEnabled }.
  • Holds don't extend mailbox audit retention; raise AuditLogAgeLimit or export entries you must keep.
  • Owner sign-ins are logged only for POP3, IMAP4 and OAuth logins, and MessageBind (opening an item) is no longer logged.
  • Audit logs show actions, not intent. For a suspected break-in, start with the CSS-Exchange compromise checks; for cloud mailboxes use Microsoft Purview Audit.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)