Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am a PBI service admin, and I am trying to use PowerShell to call the PBI API and return results from the PBI Activity Log. I run the command below and it returns the expected JSON response, however it doesn't return any data. I have all of the auditing and logging options enabled in the "Audit and usage settings", so I should be logging events.
Command:
$activities = Get-PowerBIActivityEvent -StartDateTime '2020-02-26T00:00:00' -EndDateTime '2020-02-26T23:59:59' | ConvertFrom-Json
$activities | Out-File -FilePath C:\Temp\PowerBIAuditLogs\test.csv
Any ideas why I'm not returning data in the response?
I see this is an old thread so hopefully you have resolves it:
I had same issue earlier this week and had to change the call to use Invoke-PowerBiRestMethod and am now getting results.
Here's my full script with comments ( I do not find writing code easy so lots of comments and it may not be the best script)
Hi @mmassey1010 ,
After my tests, I couldn't reproduce your issues. The feature works properly on my side.
You could create a support ticket here for further help.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 56 | |
| 56 | |
| 35 | |
| 18 | |
| 14 |