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 investigation | Exchange Online source | Gmail 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, SendOnBehalf | Gmail log events, Event = Send |
| Was a link or attachment opened? | AttachmentAccess for attachments read through Microsoft Graph; link clicks from email protection click records | Gmail 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 impersonation | Actor application info: app name, OAuth client ID, Impersonation |
| Was evidence removed? | SoftDelete, HardDelete, MoveToDeletedItems | Gmail 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.
| Action | Owner | Delegate | Admin | Investigation value |
|---|---|---|---|---|
| MailItemsAccessed | Default | Default | Default | Mail read through any protocol or client |
| Send | Default | Not available | Default | Sent, replied or forwarded |
| SendAs / SendOnBehalf | Not available | Default | Default | Mail sent under another identity |
| UpdateInboxRules | Default | Default | Default | Inbox rule added, changed or removed from the client |
| UpdateFolderPermissions | Default | Default | Default | Folder sharing, a quiet persistence route |
| UpdateCalendarDelegation | Default | Not available | Default | Calendar delegate assigned |
| SoftDelete / HardDelete / MoveToDeletedItems | Default | Default | Default | Evidence removal and cleanup after fraud |
| Create / Update | Default | Default | Default | Drafts, calendar items and message property changes |
| AttachmentAccess | Default | Default | Default | Attachment read through Microsoft Graph; cannot be configured with other actions |
| ApplyRecord | Default | Default | Default | Item labelled as a record |
| SearchQueryInitiated | Optional | Not available | Not available | What the owner session searched for in Outlook clients |
| MailboxLogin | Optional | Not available | Not available | Owner sign-in to the mailbox |
| FolderBind | Not available | Optional | Optional | Folder opened; delegate records consolidated to one per folder per 24 hours |
| Move / RecordDelete | Optional | Optional | Optional | Items moved between folders; record soft-deleted |
| Copy | Not available | Not available | Optional | Message copied to another folder |
| MessageBind | Not available | Not available | Optional | Item 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 behaviour | What it tells you | Caveat |
|---|---|---|
| MailAccessType = Sync | A folder was synchronised; treat every item in it as read | Recorded only for desktop Outlook on Windows or Mac; one event per folder |
| MailAccessType = Bind | Specific messages accessed, by InternetMessageId | Binds within a 2-minute window are aggregated; OperationCount gives the number |
| SessionId | Separates attacker activity from the real user on the same account | Correlate with sign-in logs to tie a session to a token or IP |
| ClientIPAddress, ClientInfoString | Where from, and which protocol and client version | Proxied or cloud-hosted clients may show provider addresses |
| Logon type (Owner 0, Admin 1, Delegate 2) | Whose rights were used to read | A compromised delegate shows as Delegate on the victim mailbox |
| Deduplication | Duplicate binds and syncs within an hour are filtered | A duplicate is kept if IP, client, folder, logon type, access type or user differs |
| Offline reading | Nothing | An 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.
| Attribute | Use in an investigation |
|---|---|
| Event | What 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 location | Separates the user's normal clients from an unfamiliar one |
| Device session identifier | The Gmail equivalent of a session key: group events per mail client session |
| Delegate, Has delegate | Actions 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 URL | Links mailbox activity to phishing and malware analysis |
| Traffic source | Whether 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
| Situation | Exchange Online choice | Gmail choice |
|---|---|---|
| Small organisation, few admins | Leave DefaultAuditSet untouched on every mailbox; check AuditDisabled and bypass quarterly | Rely on native six months, export monthly to storage you control |
| Executives, finance, legal, HR | Add SearchQueryInitiated and MailboxLogin to Owner; assign the licence that gives one-year retention | Stream Gmail log events to a SIEM or BigQuery so history exceeds six months |
| Service and archiving accounts | Remove bypass; scope access with application access policies or RBAC rather than silencing it | Review Actor application info for each service account and OAuth client |
| Regulated or high-threat tenant | Premium licences for privileged and high-value users, retention policies beyond one year | Edition 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
- 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.
- 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.
- Remove bypass: for each bypassed account, identify the owner and purpose, remove the bypass, and replace any noise problem with SIEM filtering.
- Add targeted actions: enable SearchQueryInitiated and MailboxLogin for high-value Owner mailboxes.
- 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.
- Alert on tampering: AuditDisabled changes, new bypass associations, Set-Mailbox changes to audit parameters, and gaps in mailbox record volume.
- 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.
| Metric | Target |
|---|---|
| Mailboxes with DefaultAuditSet Admin, Delegate, Owner (or a documented exception) | 100 per cent |
| Active mailbox audit bypass associations without a named owner and review date | Zero |
| High-value mailboxes with SearchQueryInitiated enabled | 100 per cent of the defined list |
| Days of searchable mailbox history for executives and finance, both platforms | At least 365 |
| Time from a test mailbox action to SIEM arrival | Under 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
| Framework | Where mailbox audit logging fits |
|---|---|
| NIST CSF 2.0 | PR.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. 5 | AU-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.1 | Control 8 Audit Log Management |
| ISO/IEC 27001:2022 Annex A | 8.15 Logging, 8.16 Monitoring activities |
| MITRE ATT&CK v20 | T1114.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
- Microsoft Learn: Manage mailbox auditing
- Microsoft Learn: Use MailItemsAccessed to investigate compromised accounts
- Microsoft Learn: Learn about auditing solutions in Microsoft Purview
- Microsoft Learn: Microsoft Purview Audit (Premium)
- Google Workspace Admin Help: Gmail log events
- Google Workspace Admin Help: Data retention and lag times
- MITRE ATT&CK: Remote Email Collection
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