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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

New Usage Metrics Report across workspaces

Hello, 

is there a way to get similar data to the "New Usage Report" that is created when we choose "View Usage Metrics Report" on a report level but across different workspaces? The data is there, so I guess it is possible getting these through an API so we could create our own reports, but is this documented somewhere?

I have tried the Admin Portal -> Usage statistics but they are not satisfying our needs, we have also got data from the Office 365 Management API but the information there are not that satisfying either. The data points that are shown on individual report level on "New Usage Report" could be useful, as long we get them across the different workspaces.  In addition it would be very useful to see which pages people are using on each report as well as capacity consumption per workspace/report/page. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

We had the same problem and decided the best approach was to do this ourselves. We wrote some simple PowerShell scripts that connect to the Power BI REST APIs which then pull down the usage metrics. Then we have a SSIS package that picks up that output and loads it into a SQL table which we use going forward to query.  

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

We had the same problem and decided the best approach was to do this ourselves. We wrote some simple PowerShell scripts that connect to the Power BI REST APIs which then pull down the usage metrics. Then we have a SSIS package that picks up that output and loads it into a SQL table which we use going forward to query.  

Anonymous
Not applicable

That's great, could you maybe upload these scripts (without sensitive information of course) so I could reuse them with a bit of tweaking? 
I guess this is the road we need to go to. 

Anonymous
Not applicable

I don't see a way to attach a file here so I'll paste a couple sample scripts here.  

1. Usage Metrics Script.....pulls down of yesterday's usage metrics and outputs to csv file

 

#credentials for connecting to PBI Service
Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint XXXXXX -ApplicationId XXXXXX -Tenant XXXXXX

#get date info for appending to csv export
$CurrentDate = Get-Date
$CD = $CurrentDate.AddDays(-1)
$CurrentDate2 = $CD.ToString('MM-dd-yyyy')

#Get Yesterday's date
$Today = Get-Date
$Yesterday = $Today.AddDays(-1)

#Get dates to use in API and then call API using PBI cmdlet
$startDate = $Yesterday.ToString("yyyy-MM-ddT00:00:00.000")
$endDate = $Yesterday.ToString("yyyy-MM-ddT23:59:59.999")
$Activities = Get-PowerBIActivityEvent -StartDateTime $startDate -EndDateTime $endDate | ConvertFrom-Json
$Activities | Format-Table

#export results to CSV
#INSERT FILE PATH BELOW
$Activities| Export-Csv -Path Z:\Usage_Metrics\PowerBIUsageMetrics_$CurrentDate2.csv -NoTypeInformation

 

 

2. Workspace Reports.....loops through each workspace and provides all reports

 

Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint XXXXX -ApplicationId XXXXX -Tenant XXXXX

#loops through each workspace and grabs reports
Get-PowerBIWorkspace -Scope Organization -Include All -All |
ForEach-Object {
$Workspace = $_.name
$WorkspaceId = $_.Id
foreach ($Report in $_.Reports) {
[PSCustomObject]@{I
Workspace = $Workspace
WorkspaceId = $WorkspaceId
ReportName = $Report.Name
ReportID =$Report.Id}}} | Export-CSV "C:\Script Output\Reports "

ribisht17
Super User
Super User

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors