Skip to content
WETNav

Microsoft

Microsoft 365 unified audit log

Mailbox, SharePoint, OneDrive, Teams and admin activity across Microsoft 365, each record carrying a JSON AuditData payload.

Why it matters

Business email compromise is investigated here: inbox rules, forwarding, what mail was read (MailItemsAccessed), what was sent, and what files were downloaded. It is the evidence behind breach notification decisions.

How long it lasts

  • Audit (Standard): 180 days for records created after October 2023 (90 days in older documentation).
  • Audit (Premium): 1 year by default, longer with add-on retention policies.
  • MailItemsAccessed was originally an Audit (Premium) feature and was made available more broadly from 2023. Confirm it appears in your tenant before relying on it.
Plan collection order across every source

Get the data

Connect-ExchangeOnline
Search-UnifiedAuditLog -StartDate 2026-01-01 -EndDate 2026-01-31 -UserIds [email protected] -SessionCommand ReturnLargeSet -ResultSize 5000 |
  Select-Object CreationDate, Operations, @{n='Data';e={$_.AuditData | ConvertFrom-Json}}

Fields that matter

Operation

The activity: New-InboxRule, MailItemsAccessed, FileDownloaded and so on.

RecordType / Workload

Which service and schema the record comes from.

UserId

The account that acted.

ClientIP / ClientIPAddress

Source IP; the field name differs between workloads.

SessionId

Groups mailbox actions from one session. Pair with sign-in logs.

AppAccessContext

Session and token identifiers (for example AADSessionId, UniqueTokenId) that tie the action to an Entra ID sign-in, where present.

LogonType

Mailbox access as owner (0), admin (1) or delegate (2).

Parameters

Cmdlet parameters for admin operations, including inbox rule conditions and actions.

OperationProperties

For MailItemsAccessed: MailAccessType (Bind or Sync) and IsThrottled.

Folders

For MailItemsAccessed Bind: the folders and InternetMessageIds that were opened.

Values to know

Operation

All values

Traps

  • Search-UnifiedAuditLog returns at most 5,000 records per call and a session can page through a capped total; split large searches by day or use the Audit search in the portal.
  • Inbox rules made in desktop Outlook appear as UpdateInboxRules, not New-InboxRule.
  • MailItemsAccessed pauses for 24 hours after more than 1,000 records in 24 hours for a mailbox (IsThrottled). Treat that window as fully exposed.
  • Sync access names folders, not messages. Assume the whole folder was taken.
  • Records can arrive hours after the activity. Re-run searches before closing scope.

Playbooks that use it