M365 Curated SOP / Microsoft 365 and identity
Confirm Microsoft 365 audit logging is on before rolling out AI tools
Check that the client's Microsoft 365 tenant is recording the unified audit log before anyone starts using Copilot or other AI tools.
Written and maintained by MSP Stockroom. Nobody else edits it.
On this page
Before you run anything: read every command first and understand what it does. Replace example names, domains and addresses with your own. Try it on a test device or tenant before a client's. Keep client names, passwords and keys out of tickets and chat.
Purpose
Check that the client's Microsoft 365 tenant is recording the unified audit log before anyone starts using Copilot or other AI tools. Without it there is no record of who asked an AI tool what, which files it read, or what an attacker did with a stolen account. Run it before any AI rollout and at each quarterly review. Read-only: nothing in this SOP changes the tenant.
Scope and prerequisites
- Run by the client's assigned engineer.
- Needs the Audit Logs or View-Only Audit Logs role in Exchange Online. By default the Compliance Management and Organization Management role groups have Audit Logs.
- The Exchange Online PowerShell module installed from the PowerShell Gallery.
- Store the results in your documentation platform, never in this library.
Steps
- Connect to Exchange Online. Check the setting here, not in Security & Compliance PowerShell, where the same property always reads False:
# You will be asked to sign in to the client's tenant. Connect-ExchangeOnline - Read whether audit log ingestion is on:
Get-AdminAuditLogConfig | Format-List UnifiedAuditLogIngestionEnabledRead the result:
- True: the tenant is recording the unified audit log. Go on to step 3.
- False: the tenant is not recording. Stop here and raise it with the client as a finding before any AI tool is turned on. Turning it on is a separate change.
- Confirm records are actually arriving by searching the last day:
$end = (Get-Date).ToUniversalTime() $start = $end.AddDays(-1) Search-UnifiedAuditLog -StartDate $start -EndDate $end -ResultSize 10 | Select-Object CreationDate, UserIds, RecordType, OperationsSome results mean the log is working. No results in a tenant where people work every day means you should check the role you signed in with, then look again later.
- If the client already uses Microsoft 365 Copilot, confirm its activity is recorded:
Search-UnifiedAuditLog -StartDate $start -EndDate $end -RecordType CopilotInteraction -ResultSize 10 | Select-Object CreationDate, UserIds, Operations - Look for recent changes to the audit setting itself:
Search-UnifiedAuditLog -StartDate $end.AddDays(-90) -EndDate $end -Operations Set-AdminAuditLogConfig | Select-Object CreationDate, UserIds, OperationsAny result means someone changed the audit setting. Record who and when, and confirm with the client that it was expected.
- Disconnect when finished:
Disconnect-ExchangeOnline -Confirm:$false
Verify
UnifiedAuditLogIngestionEnabled is True, a search of the last day returns records, and any change to the audit setting in the last 90 days has a known reason.
Rollback
Nothing to roll back; this SOP only reads.
Notes
Auditing is not on by default for Microsoft 365 Business Basic, Business Standard and Business Premium, which most small clients use, or for free trials of enterprise licences. Expect to find it off in those tenants. After auditing is turned on, it can take up to 60 minutes to start, and several hours before events can be searched. Audit (Standard) keeps records for 180 days (90 days for records before October 17, 2023). Users with E5 or the audit add-on keep Entra, Exchange and SharePoint records for one year. Copilot interactions are logged as CopilotInteraction. Interactions with AI apps outside Microsoft 365 appear as ConnectedAIAppInteraction or AIAppInteraction and need pay-as-you-go billing set up in Microsoft Purview. See https://learn.microsoft.com/purview/audit-log-enable-disable for Microsoft's guidance.
Sources and notes
Curated SOP from the MSP Stockroom SOP library (curated/m365-identity/confirm-microsoft-365-audit-logging-is-on-before-rolling-out-ai-tools.md). Last reviewed December 1, 2026. Tested on: Not yet run; written for Exchange Online PowerShell module 3.x; PowerShell 7.4. Vendor screens and commands change; check the vendor documentation before you rely on a step. Found a mistake? See corrections.