Forum Discussion
Get-PowerBIActivityEvent & PowerShell problems
- 7 months ago
Hi Doink,
Just wanted to follow up. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.Thank you.
Hi Doink,
Thank you for reaching out to the Microsoft Fabric Community Forum and thanks for sharing your sample output.
I completely understand how confusing it can be when the cmdlet runs but the fields appear empty. The cmdlet returns activity data as JSON strings, so when viewed directly in PowerShell (or inside SSMS), properties like ReportId and others can look blank or show {} even though they contain values. To get usable values such as UserId, ReportId, and WorkspaceId, you first need to parse the raw JSON output using ConvertFrom-Json and then select the fields you need.
If you want only specific usable fields, then this is the clean 2-line version most commonly used:
Get-PowerBIActivityEvent -StartDateTime $start -EndDateTime $end | ConvertFrom-Json | Select UserId, UserPrincipalName, ReportId, WorkspaceId, Operation
It’s also important to note that the Power BI activity log includes IDs only (e.g., ReportId, WorkspaceId) and does not include friendly names such as ReportName or WorkspaceName by design. You will need to resolve those using the Power BI REST APIs or related cmdlets like Get-PowerBIReport and Get-PowerBIWorkspace by joining on the IDs from your activity data. You can review the official documentation for Get-PowerBIActivityEvent here:
https://learn.microsoft.com/en-gb/powershell/module/microsoftpowerbimgmt.admin/get-powerbiactivityevent?view=powerbi-ps
It outlines the cmdlet usage and helps clarify how the data structure works. With this approach, you will be able to extract the usable monitoring data you’re looking for.
Hope that clarifies. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.
Big Thanks v-kpoloju-msft 🕺