Language:EN
Let's talk
← Back to insightsInsights

How to enable the Microsoft 365 audit log

Reading time: 3 min ·

Find out what the Microsoft 365 audit log is, how to enable and configure it correctly to record user and administrator activity, improve event traceability and strengthen Microsoft 365 security.

Audit log search view in Microsoft Purview

What is the Microsoft 365 audit log and what is it for?

The Microsoft 365 audit log is Microsoft's unified auditing system, which collects events and activities from multiple services on the platform, including:

  • Microsoft Entra ID (Azure AD).
  • Exchange Online.
  • SharePoint Online.
  • OneDrive for Business.
  • Microsoft Teams.
  • Microsoft Purview.
  • Power Platform.
  • Microsoft Defender.
  • Applications connected through Microsoft 365 APIs.

Auditing records relevant information about actions taken by users and administrators, including:

  • Sign-ins.
  • Mailbox access.
  • User creation or deletion.
  • Group changes.
  • Changes to security settings.
  • Document access and sharing.
  • Teams activity.
  • Administrative changes in Exchange Online.
  • Operations involving sensitive data.

All this information is stored in the Microsoft Purview audit service, where it can be searched and analysed later.

Benefits of the Microsoft 365 audit log

Enabling and regularly reviewing the Microsoft 365 audit log brings many advantages:

Incident investigation

It allows the events related to a security incident to be reconstructed chronologically.

Threat detection

  • Privilege escalations.
  • Unauthorised changes.
  • Suspicious activity on compromised accounts.

Regulatory compliance

It helps meet regulations and standards such as:

  • ISO 27001.
  • ENS (Spain's National Security Framework).
  • GDPR
  • NIS2
  • SOC 2

Full traceability

It provides verifiable evidence of who performed an action, when and from where.

Requirements for using the Microsoft 365 audit log

Before working with the Microsoft 365 audit log, it is worth checking several points.

Licensing

Standard auditing (Microsoft Purview Audit Standard) is available in most Microsoft 365 business and enterprise plans, including:

  • Microsoft 365 Business Premium.
  • Microsoft 365 E3.
  • Microsoft 365 E5.
  • Office 365 E3.
  • Office 365 E5.

These licences include audit log retention of up to 180 days.

Advanced auditing capabilities (Microsoft Purview Audit Premium), including extended retention periods and advanced audit events, require licences such as:

  • Microsoft 365 E5.
  • Office 365 E5.
  • Microsoft Purview Audit Premium.
  • Microsoft 365 E5 eDiscovery and Audit Add-on.

These licences allow retention of certain audit logs to be extended to 1 year or more, depending on configuration and available licensing.

Required permissions

To manage audit logs, technicians must have one of the following roles:

  • Audit Manager (Microsoft Purview)
  • Organization Management (Exchange Online)
  • Global Administrator (Microsoft Entra ID)

How to check whether the Microsoft 365 audit log is enabled

Microsoft states that unified auditing is usually turned on automatically in modern tenants. Even so, it is worth checking.

Checking from Microsoft Purview

  1. Go to https://purview.microsoft.com.
  2. Navigate to: Solutions → Audit
  3. If auditing is enabled, you can run searches directly.
  4. If auditing is not enabled, an option to turn on audit logging will appear.

Checking with PowerShell

It can also be checked using Exchange Online PowerShell:

Get-AdminAuditLogConfig | Select UnifiedAuditLogIngestionEnabled

Expected result:

True

If the value is True, unified auditing is active.

How to enable the Microsoft 365 audit log

In the rare cases where auditing is not enabled, it can be turned on from PowerShell.

Connect to Exchange Online

Connect-ExchangeOnline

Enable unified auditing

Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true

Check the configuration

Get-AdminAuditLogConfig | FL UnifiedAuditLogIngestionEnabled

Once enabled, Microsoft may take several hours to start collecting events from all services.

How to search events in the Microsoft 365 audit log

Once the Microsoft 365 audit log is active, you can run searches from Microsoft Purview.

Opening audit search

  1. Go to Microsoft Purview.
  2. Go to: Audit
  3. Select: Search

You can then define specific filters to narrow the query down to what you need.

Audit log search view in Microsoft Purview

Why is the Microsoft 365 audit log a CIS or CCN-STIC recommendation?

Several security guides and benchmarks, including the CIS and CCN-STIC controls for Microsoft 365, recommend verifying that unified auditing is enabled.

Without audit logs it is extremely difficult to investigate incidents, identify malicious actions or demonstrate compliance with regulatory requirements. It is one of the basic controls of any security strategy based on threat detection and response.

Shall we talk about your Microsoft environment?

Talk to a specialist →