Thing is, the bulk of the information about any specific audit event is contained within the AuditData
property, which is in JSON format. So while the export will be in CSV, you still have to parse the JSON content if you want details such as which specific report was opened, etc.
The export itself is the easy part:
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-10) -EndDate (Get-Date) -RecordType 20 | Export-Csv -Nti blabla.csv
Generating Power BI Audit Logs as .CSV using Search-UnifiedAuditLog ?

EnterpriseArchitect
5,956
Reputation points
Using PowerShell below
Search-UnifiedAuditLog: https://learn.microsoft.com/en-us/microsoft-365/compliance/audit-log-export-records?view=o365-worldwide#use-powershell-to-search-and-export-audit-log-records AuditLogRecordType: https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-schema#auditlogrecordtype
How can I export the Audit logs with the below Activities events ?
because when I export the .CSV file from https://security.microsoft.com/auditlogsearch page, it is in JSON format which is totally different from the Search result table.
Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,770 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,680 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,968 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,939 questions
Accepted answer
-
Vasil Michev 118.7K Reputation points MVP Volunteer Moderator
2023-04-11T17:16:59.06+00:00