Forum Discussion

LuigiBros's avatar
LuigiBros
Icon for Helper I rankHelper I
1 year ago
Solved

Custom Usage Metrics Report (for all reports and all workspaces)

I have an ambitious plan to create a single "golden" report to monitor the usage of all reports across all workspaces. What would be the best approach for this?   Has anyone done something similar...
  • rohit1991's avatar
    1 year ago

    Hi LuigiBros ,

    Favourable Approach is:

    1. Connect to Power BI REST API

      • Use the Admin API to get usage details across workspaces.
      • Key endpoints:
        • GetActivityEvents → Fetch user activity logs.
        • GetReportsAsAdmin → List all reports.
        • GetAppUsersAsAdmin → Fetch app access details.
    2. Extract Individual Users from Azure AD Groups

      • API returns group emails, not individual users.
      • Use Microsoft Graph API (/groups/{id}/members) to expand group members.
      • Store user mappings in a separate dataset.
    3. Build a Power BI Report

      • Load API data into Power BI via Power Query (Web Connector).
      • Model relationships between reports, workspaces, users, and access logs.
      • Use DAX measures for insights like most-viewed reports, active users, and trends.


    Challenges & Solutions:

    Issue: API limits (e.g., GetActivityEvents pulls 30 days of data).
    ➡ Solution: Schedule incremental refresh for continuous tracking.

    Issue: Access data is in groups, not users.
    ➡ Solution: Use Microsoft Graph API to resolve group members.