PRODUCTS / COMPONENTS INVOLVED
- Microsoft Power BI
- Microsoft Office 365 - Audit Logs
PROBLEM SCENARIO DESCRIPTION / GOAL
The goal here, is to look for a remote way that one can export the Office 365 Audit Log with a focus on Power BI for a given data range.
RESOLUTION ( SCRIPT )
The below script I was able to get to work in my environment. It is very simple to provide an illustration of how to achieve the given goal.
NOTE: The following script is provided as a sample / illustration.
$UserCredential = Get-Credential
#the link specified here is strictly for use in the powershell and you will need to authenticate to use it
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Search-UnifiedAuditLog -StartDate 4/11/2019 -EndDate 5/9/2019 -RecordType PowerBI -ResultSize 1000 | Format-Table | More
ADDITIONAL INFORMATION / RESOURCE LINKS
Here is product documentaton on the Search-UnifiedAuditLog PowerShell cmdlet: https://docs.microsoft.com/en-us/powershell/module/exchange/policy-and-compliance-audit/search-unifi...