Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Powershell script previously working to retrieve activitiy logs using Get-PowerBIActivityEvents cmdlet now returns a large but empty json
This is the call I am doing*
$Date = Get-Date
Solved! Go to Solution.
After much trouble shooting the issue seemed to be with using vscode, when I switched to powershell ISE it worked fine. I'm assuming vscode and powershell ISE had some differences in versions of PS or the modules
After much trouble shooting the issue seemed to be with using vscode, when I switched to powershell ISE it worked fine. I'm assuming vscode and powershell ISE had some differences in versions of PS or the modules
Hi @Anonymous ,
According to your description, it seems that it only return empty json when call REST API to get activitiy logs. Howevery, before it is working normally. Am I right? To troubleshoot this issue, please follow the steps below:
1. Check the PowerShell module version: Ensure that you are using the latest version of the Power BI PowerShell module.
Update-Module -Name MicrosoftPowerBIMgmt
2. Verify the authentication: Make sure that you are authenticated correctly to access the Power BI service.
Power BI Cmdlets reference | Microsoft Learn
Connect-PowerBIServiceAccount # or use aliases: Login-PowerBIServiceAccount, Login-PowerBI
3. Check the date range: Verify that the date range you are specifying is correct and includes the desired activity logs. Double-check the start and end dates in your script.
4. Test with a single date: To isolate the issue, try running the script with a single date instead of iterating over a range of dates. This will help determine if the issue is specific to the date range or if it persists even with a single date.
Get-PowerBIActivityEvent (MicrosoftPowerBIMgmt.Admin) | Microsoft Learn
Get-PowerBIActivityEvent -StartDateTime 2019-08-10T14:35:20 -EndDateTime 2019-08-10T18:25:50
Best Regards
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |