Forum Discussion
How to retrieve month-wise usage logs across multiple workspaces or capacity in Microsoft Fabric?
- 2 months ago
Hi Anusha66,
The Power BI GetActivityEvents API is what you're after.
This has all logs for everything that happens in Fabric.
I recommend setting up a process that pulls this information daily into a lakehouse or another database.The API only stores 28 days of data, and you can pull at max 24 hours of data at a time.
https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-activity-events
- 2 months ago
Hi Anusha66,
Hope you're doing well!
Here are direct answers to your 3 questions:
Retrieve usage logs centrally for multiple workspaces? Admin Activity Log API or Unified Audit Log, tenant-wide
Aggregated report-level metrics month-wise? via downstream aggregation in Lakehouse/Notebook or KQL in Log Analytics
Avoid workspace-by-workspace looping? Admin API is tenant-scoped; loop over days not workspaces
Hi Anusha66
To centrally track report usage metrics across your entire tenant or capacity without the overhead of looping through workspaces individually, the recommended enterprise approach is to utilize the Power BI Activity Log API (or its PowerShell wrapper cmdlet Get-PowerBIActivityEvent). Unlike the individual workspace usage metrics or standard scanner APIs that require explicit workspace-by-workspace iteration, the Activity Log API is designed for tenant-level scalability and allows you to fetch all user activities—including report views, queries, and data exports—across all workspaces simultaneously in a single consolidated request stream. Because the API allows you to extract raw events for an entire day at a time using a streaming continuation token pattern, you can eliminate loop-based API throttling by running a daily or monthly extraction script that pipes these raw events into a central repository like a Fabric Lakehouse, Azure Log Analytics, or a SQL database. Once centralized, you can run a single SQL query or DAX expression to group by report ID, workspace ID, and month, instantly yielding aggregated report-level metrics (such as total monthly views and distinct daily/monthly active users) across your entire capacity without hitting the scalability limits of individual workspace connectors.