Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Doink
New Member

Get-PowerBIActivityEvent & PowerShell problems

 

Hi all

We are working on setting up some monitoring reports for out PBI solution and are using powershell scripts that we run using SSMS.
This works ok for loadtimes but now we have run into problems when trying to get data for user activities like viewreport etc.. using Get-PowerBIActivityEvent.

If we look at a specifik user like me and -ActivityType viewreport we get responses like this:
Name : ReportId
Type : Property
HasValues : True
First : {}
Last : {}
Count : 1
Parent : {Id, RecordType, CreationTime, Operation...}
Root : {Id, RecordType, CreationTime, Operation...}
Next : {}
Previous : {}
Path : ReportId
LineNumber : 0
LinePosition : 0
IsReadOnly : False
AllowNew : True
AllowEdit : True
AllowRemove : True
SupportsChangeNotification : True
SupportsSearching : False
SupportsSorting : False
IsSorted : False
SortProperty :
SortDirection : Ascending
IsFixedSize : False
SyncRoot : System.Object
IsSynchronized : False


Can anyone help me with info or links on how to get some usable info on how to retreiw usabla data like userid, userName, ReportId, ReportName, etc...
Or suggestions for alternet solutions

Best regards Doink

1 ACCEPTED SOLUTION

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.

View solution in original post

5 REPLIES 5
v-kpoloju-msft
Community Support
Community Support

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-powerbiactivityev... 

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 🕺

Hi @Doink,

Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.

Thank you.

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 Sorry for late reply, it moved me tovords a solution. issue is now resolved Thank again 

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.