ShareMaster V2 is in beta, a complete rebuild. See what is new and request access →
  1. Home
  2. Tools
  3. Audit Log Retention Reference

SharePoint Audit Log Retention: What Admins Need to Know

Illustration: a retention clock over a stack of archived items.
SharePoint Audit Log Retention: What Admins Need to Know

Retention period by licence tier - quick reference. Scroll down for event categories, access methods, and frequently asked questions.

Microsoft 365 plan or licence Default retention Extended maximum
Business Basic / Standard / Premium 180 days 180 days
F1 / F3 (Frontline Worker) 180 days 180 days
E3 / A3 / G3 180 days 180 days
E5 / A5 / G5 (Audit Premium included) 1 year for SharePoint, OneDrive, Exchange and Entra ID; 180 days for other services 1 year via audit retention policy; 10 years with the 10-Year Audit Log Retention add-on
Microsoft Purview Suite (formerly E5 Compliance) or E5 eDiscovery and Audit add-on 1 year for SharePoint, OneDrive, Exchange and Entra ID; 180 days for other services 1 year via audit retention policy; 10 years with the 10-Year Audit Log Retention add-on
Note: Extended retention applies per-user, not per-tenant. In a mixed-licence environment, audit records generated by E3 users, other non-E5 users and guests are kept for 180 days, even when the tenant has E5 seats assigned to other users. Audit (Standard) records created before 17 October 2023 were kept for 90 days, so anything that old has already gone.

What Is the Microsoft 365 Unified Audit Log?

The Unified Audit Log (UAL) is a centralised activity log shared across Microsoft 365 workloads including SharePoint Online, Exchange Online, Microsoft Teams, OneDrive for Business, and Entra ID. All SharePoint audit events are written to the UAL. Microsoft retired the classic SharePoint-specific audit reports that once lived under Site Settings, and the UAL is now the sole audit trail for SharePoint Online activity.

The UAL is hosted and managed by Microsoft. You cannot adjust the retention period through SharePoint or the Microsoft 365 admin centre; retention is governed by the Purview Audit (Standard or Premium) licence of each user who generates the event, plus any audit log retention policies created in the Microsoft Purview portal, which need Audit (Premium).

SharePoint Events Captured in the Audit Log

Standard events (all plans)

The following categories of SharePoint events are captured automatically at no additional cost on any Microsoft 365 plan:

Event category Examples recorded
File operations Accessed, modified, deleted, moved, copied, previewed, uploaded, downloaded, recycled, restored from recycle bin
Sharing and permissions Sharing link created or removed, invitation sent, permission level changed, unique permissions broken or reset, external sharing blocked
Site and list management Site collection created or deleted, list or library created or deleted, content type added or removed, column added or deleted
Recycling bin Item moved to recycle bin, item permanently deleted, item restored, second-stage recycle bin emptied
Sensitivity and compliance Sensitivity label applied, changed, or removed; DLP policy match; retention label applied; hold placed on site

Premium events (E5 / Purview Audit Premium only)

Microsoft Purview Audit (Premium) adds two event categories not available on standard plans:

Premium event What it records Why it matters
MailItemsAccessed (Exchange) Every access to email items, not just sends/receives Critical for forensic investigation of compromised accounts reading sensitive email
SharePoint search queries The exact search terms a user entered within SharePoint Useful for investigating whether a user actively searched for sensitive documents before an incident

Accessing and Exporting SharePoint Audit Logs

Microsoft Purview compliance portal

The recommended starting point for ad-hoc investigation. Navigate to purview.microsoft.com, select Audit, then filter by workload (SharePoint, SharePoint file and page activities, or SharePoint sharing and access request activities). Set a date range, optionally restrict to specific users or sites, and run the search. Export results to CSV directly from the portal.

Microsoft does not guarantee a time, but SharePoint and OneDrive records are typically searchable 60 to 90 minutes after the event; other services can take longer. One portal search covers up to 180 days, and a broad search in a large tenant can take hours to finish.

PowerShell

The Search-UnifiedAuditLog cmdlet in the Exchange Online Management module returns audit records programmatically. Commonly used parameters:

  • -RecordType SharePoint: file, folder, and site events
  • -RecordType SharePointSharingOperations: sharing and permission events
  • -Operations FileDeleted,FileRecycled: filter to specific operations
  • -UserIds user@contoso.com: restrict results to a single account
  • -ResultSize 5000: maximum records per call; repeat the call with the same -SessionId and -SessionCommand ReturnLargeSet to page through up to 50,000 results

Microsoft Graph and Management Activity API

The Office 365 Management Activity API is designed for streaming high-volume audit events into a SIEM or data lake. The Microsoft Graph Audit Search API (POST /security/auditLog/queries) suits targeted queries in custom applications. Both need an app registration in Entra ID: the Management Activity API uses ActivityFeed.Read, and the Audit Search API uses AuditLogsQuery-SharePoint.Read.All or AuditLogsQuery.Read.All. The Graph /auditLogs endpoint is a different thing: the Entra ID directory and sign-in logs, not the unified audit log.

Frequently Asked Questions

How long are SharePoint audit logs kept by default?

SharePoint audit records are stored in the Microsoft 365 Unified Audit Log and kept for 180 days by default (records created before 17 October 2023 were kept for 90 days). For users with an E5 licence, or the Microsoft Purview Suite or E5 eDiscovery and Audit add-on, SharePoint, OneDrive, Exchange and Entra ID records are kept for one year. Keeping them for up to 10 years needs an audit log retention policy plus the 10-Year Audit Log Retention add-on licence for each user.

Does SharePoint Online have its own audit log?

No. SharePoint Online no longer has a standalone audit log interface. Microsoft retired the classic SharePoint audit reports and now routes all SharePoint events into the Microsoft 365 Unified Audit Log, searchable via the Microsoft Purview compliance portal.

How do I export SharePoint audit logs to CSV?

In the Microsoft Purview compliance portal, open Audit, set the date range and workload filter to SharePoint, run the search, then click Export. Results download as a CSV file. For scripted exports, use the Search-UnifiedAuditLog PowerShell cmdlet with the -RecordType SharePoint parameter.

For a broader reference on SharePoint Online operational limits, see the SharePoint Online limits reference. To audit the sharing links on a site, library by library, see how to audit SharePoint shared links.

Try ShareMaster free for 14 days