Converting Scripts from Search-UnifiedAuditLog

Converting scripts to use the AuditLogQuery Graph API.

Investigating the work necessary to convert PowerShell scripts based on the Search-UnifiedAuditLog cmdlet to use the AuditLogQuery Graph API shows that it’s not easy. Running audit jobs is a multi-stage process rather than running a simple cmdlet. Parameter values are now passed in a request body, and the properties output in the AuditData payload use a different format. This is definitely not a drop-in exercise, so it’s time to find scripts that need conversion.

Microsoft to Retire the Search-UnifiedAuditLog Cmdlet in 2027

Microsoft to retire Seach-UnifiedAuditLog cmdlet in October 2027.

MC1505599 covers two big announcements. First, the AuditLogQuery Graph API is GA. Second, Microsoft will retire the heavily used Search-UnifiedAuditLog cmdlet in October 2027. Microsoft hasn’t said why they want to retire Search-UnifiedAuditLog and have tenants convert their PowerShell scripts to use the AuditLogQuery API but reducing engineering cost and complexity are probably at the heart of the matter. In any case, the conversion will cost Microsoft 365 development effort and money between now and October 2027, and that’s a bad thing.

Primer: Running Audit Searches and Sending Email from Azure Automation

Microsoft 365 audit log searches with Azure Automation.

This article describes how to use Azure Automation for audit searches. The runbook runs an audit search to find events for specific operations, refines the set of events found by the search, and sends the information by email. Hopefully, someone will respond to the message and do the right thing to check the insight derived from the events.