Has the powershell PBI cmdlet Get-PowerBIActivityEvent changed?

Caitlin McConnery 20 Reputation points

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++)
    Write-Verbose "Checking $ActivityDate" -Verbose 
        #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 {
$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.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,168 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 24,286 Reputation points Microsoft Vendor


    You can find the version history of the MicrosoftPowerBIMgmt module over here.


    It was last updated on 11/15/2022.

    Best Regards,

    Ian Xue

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful