I have been using the Get-PowerBIActivityEvent cmdlet to create a custom activity log for my tenant. It was working on October 2nd 2023, but now the output has seemed to changed. The data fields in the output has seemed to reduced, and almost all of the fields are null.
The following is the code block that uses the cmdlet:
# get the audit information
$NbrOfDaysToCheck =3
$FullResults = @()
#Use today to start counting back the number of days to check:
$DayUTC = (([datetime]::Today.ToUniversalTime()).Date)
#Iteratively loop through each of the last N days to view events:
For($LoopNbr=1; $LoopNbr -le $NbrOfDaysToCheck; $LoopNbr++)
{
$PeriodStart=$DayUTC.AddDays(-$LoopNbr)
$ActivityDate=$PeriodStart.ToString("yyyy-MM-dd")
Write-Verbose "Checking $ActivityDate" -Verbose
try{
#Check activity events once per loop (once per day):
$FullResults += Get-PowerBIActivityEvent `
-StartDateTime ($ActivityDate + 'T00:00:00.000') `
-EndDateTime ($ActivityDate + 'T23:59:59.999') `
| ConvertFrom-Json
}
catch {
break
}
}
$FullResults = $FullResults | ConvertTo-Json
$FullResults | Out-File -FilePath $activitylogpath -Append
And the output is a json file is populating (the output file size is 4652kb), but almost all the fields are empty and the column names are inconstant with the ones being returned earlier last month. I was wondering if this was due to a cmdlet change or if there is some other outstanding issue.