Under attack? Call 1-800-716-8955, 24/7 Serving Calgary, Edmonton and communities across Alberta
Security how-to ยท 6 min read

Turning on Microsoft 365 audit logging

When an account is compromised, logs are how you find out what the attacker did. This guide explains which Microsoft 365 logs exist, how to make sure they are on and how long they are kept.

Turning on Microsoft 365 audit logging

Why logs matter after an incident

Picture the call: a client says they received an email from your accounts payable clerk asking them to change banking details, and your clerk never sent it. The questions that follow are urgent. When did the attacker get into the mailbox? What did they read? Did they set up forwarding rules? Did they access files in OneDrive or SharePoint? Did they get into any other accounts?

Microsoft 365 can answer most of those questions, but only if the right logs were being recorded beforehand and are still within their retention period. Logs cannot be switched on after the fact to see what already happened. Getting them right now is cheap insurance for the day you need them.

The main logs to know

The unified audit log records activity across Microsoft 365: file access in SharePoint and OneDrive, mailbox actions, administrator changes, Teams activity and much more. It is searchable through the Microsoft Purview portal. In most current tenants it is on by default, but older tenants and some configurations have it turned off, so check rather than assume.

Microsoft Entra ID keeps separate sign-in logs and audit logs. Sign-in logs show who signed in, from where, on what device and whether multi-factor authentication was used. Entra audit logs record changes such as new users, password resets and role assignments. Mailbox auditing records actions taken inside each mailbox, such as messages being read, moved or deleted.

  • Unified audit log for activity across Microsoft 365
  • Entra ID sign-in logs for every sign-in attempt
  • Entra ID audit logs for directory changes
  • Mailbox audit logs for actions inside mailboxes

Check that logging is on

Open the audit area in the Microsoft Purview portal. If auditing is off, there will be a prompt to turn it on. Once enabled, it can take some time before events start appearing. Run a test search for your own recent activity to confirm it is working.

Mailbox auditing is on by default for most mailboxes in current tenants, but it is worth confirming, especially for shared mailboxes and for any mailboxes created long ago. Your IT provider can check this with a short administrative command and adjust the actions recorded if needed.

Understand retention

Logs are only kept for a limited time, and the period depends on your licence. Standard audit retention is shorter than the retention offered with premium licences or add-ons. Entra ID sign-in logs are also kept only for a limited number of days, with longer retention on paid identity plans. Check the current retention for your plan in Microsoft's documentation, as these periods change over time.

Many compromises are discovered weeks or months after they began. If your logs only go back a short time, the earliest activity may already be gone. For organizations with sensitive data, consider exporting logs to separate long-term storage or to a security monitoring service that keeps them for a year or more.

Put the logs to work

Logs are most useful when someone is alerted to unusual events while they are happening. Microsoft 365 includes alert policies for activities such as new forwarding rules, unusual file deletion and elevated admin activity. Review the default alerts, make sure notifications go to a monitored mailbox and add alerts for activity that matters to your organization.

If you work with a managed detection and response provider, ask whether they collect your Microsoft 365 and Entra logs, how long they keep them and what they watch for. Cloud account takeover is among the most common incidents small businesses face, and endpoint monitoring alone will not see it.

Document it

Write down which logs are enabled, how long each is kept, where exports go and who can search them. Restrict access to audit search to a small group, since logs themselves contain sensitive information about staff activity.

Insurers and auditors increasingly ask about logging. A short written record lets you answer accurately and shows the setup was deliberate rather than accidental. Review it once a year or whenever you change licences.

Key takeaways
  • Confirm the unified audit log and mailbox auditing are actually on.
  • Know your retention periods and export logs if you need them longer.
  • Set alerts so suspicious activity is seen while it is happening.

All your tech problems. One phone call.