Join our Newsletter — 33% off our NHI Course
Home› Guides› Mailbox Audit Logging Guide: What Exchange Online and…
Guide Email & Communications Security

Mailbox Audit Logging Guide: What Exchange Online and Gmail Record, and the Gaps

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 14 November 2026 16 min read
On this page

Most mailbox investigations fail on one question, "which messages did the attacker actually read?", because the mailbox audit trail was trimmed, bypassed, licensed differently or never covered that client. Exchange Online and Gmail both record mailbox activity, but they record different things, with different defaults and different blind spots. This guide covers the per-mailbox layer: which actions Exchange Online audits by default for each logon type, how customisation and bypass quietly remove coverage, what MailItemsAccessed can and cannot prove, and what the Gmail log events in Google Workspace show. It is written for detection engineers, incident responders and messaging administrators who need to know, before an incident, what evidence will exist. Platforms are listed alphabetically, and the order is not a ranking.

This is an independent guide from NHI Mgmt Group, based on Microsoft's and Google's public documentation as of November 2026. It is not sponsored or reviewed by either vendor. Product features change, so confirm settings against each vendor's current documentation.

Key takeaways

  • On by default is not the same as complete. Exchange Online audits user, shared and Microsoft 365 Group mailboxes by default, but only a managed set of actions per logon type, and searches (SearchQueryInitiated) and mailbox sign-ins (MailboxLogin) are off unless you add them.
  • One customisation freezes a mailbox in time. Changing the audited actions for a logon type removes it from DefaultAuditSet, and Microsoft then stops adding new default actions to that mailbox.
  • Bypass follows the account, everywhere. A mailbox audit bypass association stops logging of everything that account does, in its own mailbox and every mailbox it can open as a delegate or admin.
  • MailItemsAccessed answers "what was read", within limits. Sync records mean a whole folder; Bind records give message IDs; reading offline after a sync leaves no record.
  • Gmail logs user mail actions, but for six months only. Gmail log events record actions such as Send, View, Link click and Attachment download with client, IP and delegate details; retention is fixed, so export is the only way to keep more.

Where mailbox auditing sits

Mailbox auditing is the layer that records what happens inside a mailbox: items read, sent, moved, deleted, rules and folder permissions changed. It is distinct from message trace (delivery), sign-in logs (authentication) and admin audit (configuration). The Microsoft 365 Unified Audit Log Guide covers how Exchange records reach the unified log, retention by licence and SIEM collection; the Google Workspace Audit Log Detection Guide covers the Reports API, login, admin and token logs. This page stays on the mailbox layer and what it can prove.

Question in an investigationExchange Online sourceGmail source
Which messages were read, and by which session?MailItemsAccessed (Sync or Bind, SessionId, ClientIPAddress)Gmail log events, Event = View, with Client Type, IP address and Device session identifier
What was sent from the mailbox?Send, SendAs, SendOnBehalfGmail log events, Event = Send
Was a link or attachment opened?AttachmentAccess for attachments read through Microsoft Graph; link clicks from email protection click recordsGmail log events, Link click and Attachment download
Did someone act as a delegate?Delegate logon type records (FullAccess, SendAs, SendOnBehalf holders)Delegate and Has delegate attributes
Did an application act on the mailbox?Records with application client details; Admin logon type for impersonationActor application info: app name, OAuth client ID, Impersonation
Was evidence removed?SoftDelete, HardDelete, MoveToDeletedItemsGmail log events for the message; preserve before Trash is emptied, because searches cover only messages not yet deleted from Trash
Was mail delivered or blocked?Message trace (outside mailbox audit)Email Log Search, 30 days

Delivery evidence belongs to a different toolset: see the Email Gateway and Message Trace Detection Guide.

Exchange Online: logon types and default actions

Microsoft's documentation states that mailbox audit logging is on by default in all organisations and that new mailboxes are audited automatically. Each record is tagged with a logon type, and the audited actions differ per type.

  • Owner: the account associated with the mailbox.
  • Delegate: a user holding SendAs, SendOnBehalf or FullAccess on another mailbox. An administrator granted FullAccess to a user's mailbox is recorded as a delegate, not an admin.
  • Admin: mailbox searched with eDiscovery in Microsoft Purview, opened with the MAPI Editor, or accessed by an account using the ApplicationImpersonation role.
ActionOwnerDelegateAdminInvestigation value
MailItemsAccessedDefaultDefaultDefaultMail read through any protocol or client
SendDefaultNot availableDefaultSent, replied or forwarded
SendAs / SendOnBehalfNot availableDefaultDefaultMail sent under another identity
UpdateInboxRulesDefaultDefaultDefaultInbox rule added, changed or removed from the client
UpdateFolderPermissionsDefaultDefaultDefaultFolder sharing, a quiet persistence route
UpdateCalendarDelegationDefaultNot availableDefaultCalendar delegate assigned
SoftDelete / HardDelete / MoveToDeletedItemsDefaultDefaultDefaultEvidence removal and cleanup after fraud
Create / UpdateDefaultDefaultDefaultDrafts, calendar items and message property changes
AttachmentAccessDefaultDefaultDefaultAttachment read through Microsoft Graph; cannot be configured with other actions
ApplyRecordDefaultDefaultDefaultItem labelled as a record
SearchQueryInitiatedOptionalNot availableNot availableWhat the owner session searched for in Outlook clients
MailboxLoginOptionalNot availableNot availableOwner sign-in to the mailbox
FolderBindNot availableOptionalOptionalFolder opened; delegate records consolidated to one per folder per 24 hours
Move / RecordDeleteOptionalOptionalOptionalItems moved between folders; record soft-deleted
CopyNot availableNot availableOptionalMessage copied to another folder
MessageBindNot availableNot availableOptionalItem opened by an admin; only for users without E5, A5 or G5 licences

Microsoft 365 Group mailboxes have a fixed set (Create for calendar items, HardDelete, MoveToDeletedItems, SendAs, SendOnBehalf, SoftDelete, Update) that you cannot change. Public folder and resource mailboxes are not in the supported list, and cross-geo access in a multi-geo tenant is not recorded in the target shared mailbox's audit log. Microsoft also notes that new default actions are added subject to the user having the appropriate licence.

How coverage is lost: customisation, bypass and the org switch

DefaultAuditSet drift

DefaultAuditSet shows which logon types still follow Microsoft's managed defaults. A value of Admin, Delegate, Owner means untouched; a blank value means all three have been customised. Microsoft's guidance is explicit: after you customise a logon type, new default actions are not audited automatically and must be added by hand. This is how tenants that scripted their own audit lists years ago ended up without MailItemsAccessed when Microsoft added it. Read the current state with Get-Mailbox and the DefaultAuditSet, AuditOwner, AuditDelegate and AuditAdmin properties, and restore with Set-Mailbox -DefaultAuditSet Admin,Delegate,Owner. Restoring replaces the custom list, so record what was customised and why before you do it.

The safer pattern for adding SearchQueryInitiated or MailboxLogin is the add form (AuditOwner with an Add hashtable). That still counts as a customisation of the Owner type, so plan to re-check Owner defaults whenever Microsoft announces a new default action.

Bypass associations

Setting AuditEnabled to False on a mailbox is ignored while on-by-default auditing is active. The only per-account off switch is Set-MailboxAuditBypassAssociation, and its scope is wide: all owner actions by that account, its delegate actions in other mailboxes including shared mailboxes, and its admin actions. Bypass was historically used to silence noisy service accounts such as archiving or backup tools, which makes it a non-human identity problem: an account with FullAccess to many mailboxes and no audit trail is the ideal place for an attacker to hide. See the How to Review M365 Apps with Mail Permissions guide for the application side of mailbox access.

The organisation switch

Get-OrganizationConfig should show AuditDisabled as False. If it is set to True, no mailbox actions are audited, new mailboxes are not audited, and bypass associations are ignored; existing records are kept until their retention ends. Treat any change to it, or to a bypass association, as a security event. ATT&CK v20 models this as T1685.002 Disable or Modify Cloud Log.

Retention is no longer per mailbox

Microsoft states that AuditLogAgeLimit no longer applies to mailbox audit retention; retention is controlled by Microsoft Purview audit retention policies. Audit (Standard) keeps records for 180 days. Audit (Premium) keeps Exchange records for one year by default and supports policies up to ten years with an add-on licence, which is not retroactive. Retention follows the licence of the user who generated the record.

MailItemsAccessed: what it proves and what it cannot

Microsoft documents MailItemsAccessed as part of Audit (Standard) and Exchange mailbox auditing, enabled by default for users with Office 365 or Microsoft 365 E3 or E5 licences. It covers POP, IMAP, MAPI, EWS, Exchange ActiveSync and REST access. Audit (Premium) adds the SensitivityLabel property, so you can see the label on accessed items.

Field or behaviourWhat it tells youCaveat
MailAccessType = SyncA folder was synchronised; treat every item in it as readRecorded only for desktop Outlook on Windows or Mac; one event per folder
MailAccessType = BindSpecific messages accessed, by InternetMessageIdBinds within a 2-minute window are aggregated; OperationCount gives the number
SessionIdSeparates attacker activity from the real user on the same accountCorrelate with sign-in logs to tie a session to a token or IP
ClientIPAddress, ClientInfoStringWhere from, and which protocol and client versionProxied or cloud-hosted clients may show provider addresses
Logon type (Owner 0, Admin 1, Delegate 2)Whose rights were used to readA compromised delegate shows as Delegate on the victim mailbox
DeduplicationDuplicate binds and syncs within an hour are filteredA duplicate is kept if IP, client, folder, logon type, access type or user differs
Offline readingNothingAn attacker who syncs then reads offline leaves no further records

Scoping rule: start with Sync records for the attacker's IPs and SessionId values; any match means the folder, and in practice often the mailbox, is exposed. Then use Bind records to list individual InternetMessageId values for notification and legal review. The Data Exposure Scoping Playbook covers turning these lists into a notification decision.

Gmail: what the Gmail log events record

Google Workspace records mailbox activity as Gmail log events, searchable in the audit and investigation tool (Audit and Investigation privilege required) and through the Reports API and BigQuery export. Google lists the Event attribute with examples such as Attachment download, Link click, Send and View, and the Client Type attribute with examples such as Web, Android, iOS and POP3.

AttributeUse in an investigation
EventWhat happened: View, Send, Link click, Attachment download, plus spam classification and quarantine actions
Message ID, Subject, From (Header address), To (Envelope)Ties a log event to a specific message for scoping and notification
Client Type, IP address, IP ASN, Geo locationSeparates the user's normal clients from an unfamiliar one
Device session identifierThe Gmail equivalent of a session key: group events per mail client session
Delegate, Has delegateActions performed by a delegate on the owner's behalf
Actor application info (app name, OAuth client ID, Impersonation)Identifies a third-party or service-account app acting on the mailbox, including impersonation through delegation
Attachment hash, Attachment malware family, Link domain, Target link URLLinks mailbox activity to phishing and malware analysis
Traffic sourceWhether a message was sent or received internally or externally

Retention and lag: Google states Gmail log events arrive in near real time (a couple of minutes) and are kept for six months, and that administrators cannot change that period. Email Log Search, the delivery view, keeps 30 days. Searches cannot return data for messages already deleted from Trash.

Gaps to test, not assume: Google's documentation gives client types as examples rather than a full list. Before you rely on Gmail log events for IMAP or API access, generate a test read from each client and API path your tenant permits, and confirm what appears. Configuration events that change mailbox reach, such as external forwarding, delegation and admin email monitors, sit in the login and admin logs rather than Gmail log events; see the Gmail Security Settings Guide for Workspace Admins.

Choosing what to turn on

SituationExchange Online choiceGmail choice
Small organisation, few adminsLeave DefaultAuditSet untouched on every mailbox; check AuditDisabled and bypass quarterlyRely on native six months, export monthly to storage you control
Executives, finance, legal, HRAdd SearchQueryInitiated and MailboxLogin to Owner; assign the licence that gives one-year retentionStream Gmail log events to a SIEM or BigQuery so history exceeds six months
Service and archiving accountsRemove bypass; scope access with application access policies or RBAC rather than silencing itReview Actor application info for each service account and OAuth client
Regulated or high-threat tenantPremium licences for privileged and high-value users, retention policies beyond one yearEdition with BigQuery export and long-term retention in your own store

The trade-off is noise and cost against proof. SearchQueryInitiated and MailboxLogin add volume, so target them at mailboxes where knowing what an intruder searched for (passwords, invoices, bank details) would change the response. In both platforms, collecting into your own store is the only way to outlast native retention.

Rolling it out

  1. Baseline: export AuditDisabled, every mailbox's DefaultAuditSet and audit action lists, and all bypass associations. In Google Workspace, confirm the edition and who holds the Audit and Investigation privilege.
  2. Fix drift in a pilot ring: restore DefaultAuditSet on a group of 20 to 50 customised mailboxes, record the previous lists so you can roll back with Set-Mailbox, and check record volume for a week.
  3. Remove bypass: for each bypassed account, identify the owner and purpose, remove the bypass, and replace any noise problem with SIEM filtering.
  4. Add targeted actions: enable SearchQueryInitiated and MailboxLogin for high-value Owner mailboxes.
  5. Test end to end: in a pilot mailbox, read in Outlook desktop and on the web, send, create an inbox rule and delete an item; in Gmail, view, send and click a test link. Time arrival in the SIEM.
  6. Alert on tampering: AuditDisabled changes, new bypass associations, Set-Mailbox changes to audit parameters, and gaps in mailbox record volume.
  7. Rollback: if volume overwhelms collection, filter in the pipeline rather than reducing what the mailbox records, because records not generated cannot be recovered.

Detection and measurement

  • MailItemsAccessed from a second session: Sync records from an IP or client never seen for that user; Bind bursts with high OperationCount outside working hours. Maps to T1114.002 Remote Email Collection.
  • Rule and permission changes: UpdateInboxRules and UpdateFolderPermissions shortly after a new sign-in (T1137.005 Outlook Rules, T1114.003 Email Forwarding Rule, T1098.002 Additional Email Delegate Permissions). For the full rule sweep, see How to Audit Mailbox Forwarding and Inbox Rules.
  • Cleanup: SoftDelete and HardDelete bursts after Send events to external domains (T1070.008 Clear Mailbox Data).
  • Gmail: View events from a new Client Type or ASN, Send events by a delegate, Actor application info with an unknown OAuth client ID.
MetricTarget
Mailboxes with DefaultAuditSet Admin, Delegate, Owner (or a documented exception)100 per cent
Active mailbox audit bypass associations without a named owner and review dateZero
High-value mailboxes with SearchQueryInitiated enabled100 per cent of the defined list
Days of searchable mailbox history for executives and finance, both platformsAt least 365
Time from a test mailbox action to SIEM arrivalUnder 2 hours, tested quarterly

Common failure patterns

  • Scripted audit lists from years ago: mailboxes customised before MailItemsAccessed existed never received it, so exposure cannot be scoped.
  • Bypass on a broad service account: a backup or archiving account with FullAccess to every mailbox and auditing bypassed becomes invisible if its credential leaks.
  • Assuming Sync means "nothing more": once a folder is synced, offline reading leaves no trace; responders under-report exposure when they count only Bind records.
  • Licence mismatch: the investigation needs month eight, but the compromised users sat on a 180-day licence or in a Gmail tenant with six-month retention and no export.
  • Admin with FullAccess read as an admin event: it is logged as Delegate, so filters on logon type Admin miss it.
  • Purged before preserved: in Gmail, messages emptied from Trash return nothing; in Exchange, retention keeps rolling. Preserve first, then remediate. The Business Email Compromise Response Playbook sets the order.

Framework mapping

FrameworkWhere mailbox audit logging fits
NIST CSF 2.0PR.PS-04 log records generated and available; DE.CM-03 personnel activity and technology usage monitored; DE.AE-03 information correlated from multiple sources
NIST SP 800-53 Rev. 5AU-2 Event Logging, AU-6 Audit Record Review, Analysis, and Reporting, AU-9 Protection of Audit Information, AU-11 Audit Record Retention, AU-12 Audit Record Generation
CIS Controls v8.1Control 8 Audit Log Management
ISO/IEC 27001:2022 Annex A8.15 Logging, 8.16 Monitoring activities
MITRE ATT&CK v20T1114.002, T1114.003, T1137.005, T1098.002, T1070.008, T1685.002

For how mailbox evidence feeds wider log management, see the CIS Control 8 Audit Log Management Guide.

Practitioner checklist

  • Confirm AuditDisabled is False and alert on any change to it.
  • Report every mailbox whose DefaultAuditSet is not Admin, Delegate, Owner and restore or document each one.
  • Inventory bypass associations, remove them, and give any remaining exception a named owner and review date.
  • Add SearchQueryInitiated and MailboxLogin for executive, finance, legal and HR mailboxes.
  • Map each high-value user's licence to its audit retention and close gaps with licences or export.
  • Stream Gmail log events and Exchange mailbox records to storage that outlasts native retention.
  • Test Gmail and Exchange coverage per client and API path your tenant permits, and record what is not captured.
  • Build scoping runbooks that use Sync for folders and Bind or Message ID for individual messages.
  • Restrict who holds Audit Logs and Audit and Investigation roles, because they can read and shape the evidence.

Standards and references

Related NHI Mgmt Group resources: Microsoft 365 Unified Audit Log Guide · Google Workspace Audit Log Detection Guide · Exchange Online Security Guide · Email Forensics and Header Analysis Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 14 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.