The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi folks,
I’m looking for guidance on how to export a list or connect Power BI Desktop to the Power BI API to periodically retrieve data about all the reports in my tenant. Specifically, I need information such as:
Could you please assist me or point me in the right direction to set this up?
Thank you in advance for your help!
Best regards
Solved! Go to Solution.
Hi @devGV_88 ,
Currently, there is no API that can directly meet your needs, nor can you rely solely on the API to meet your needs. I can give you an idea for implementation.
First, use the API to get reports for all workspaces. This API will have a Workspace name column, and report name, report id columns. Create a data table Factworkspace or FactReport in Power BI based on the results obtained from the API.
Reports - Get Reports In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Groups - Get Groups - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Then, use the API to get the user access rights for each report. This table contains a username, userremail, report, role, permission, report name, report id column, etc. And use this data to create a user permission table FactUser in Power BI.
Admin - Reports GetReportUsersAsAdmin - REST API (Power BI Power BI REST APIs) | Microsoft Learn
By establishing a connection between the two tables, you can count users and analyze them by workspace and report dimensions.
Power BI Service has usage metrics for each report. Use the usage metrics data to create a third data table, and connect the previous two reports for analysis based on report id and workspace id. This way, you can know which users have viewed this report in the current time period, which reports they have viewed, and in which workspace each user is in. Or you can use the API mentioned in my first reply, as long as you can get the corresponding timestamp, report id, user id, email, which can record the user identity and viewing time and content, it will be fine.
Monitor report usage metrics - Power BI | Microsoft Learn
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello!
Thanks for this.
It looks like I can retrieve the last 'access' using this method.
However, I’m also looking for the count of users who have access to each report, as well as the location (workspace) for each of these reports. Could you assist with this?
Hi @devGV_88 ,
Currently, there is no API that can directly meet your needs, nor can you rely solely on the API to meet your needs. I can give you an idea for implementation.
First, use the API to get reports for all workspaces. This API will have a Workspace name column, and report name, report id columns. Create a data table Factworkspace or FactReport in Power BI based on the results obtained from the API.
Reports - Get Reports In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Groups - Get Groups - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Then, use the API to get the user access rights for each report. This table contains a username, userremail, report, role, permission, report name, report id column, etc. And use this data to create a user permission table FactUser in Power BI.
Admin - Reports GetReportUsersAsAdmin - REST API (Power BI Power BI REST APIs) | Microsoft Learn
By establishing a connection between the two tables, you can count users and analyze them by workspace and report dimensions.
Power BI Service has usage metrics for each report. Use the usage metrics data to create a third data table, and connect the previous two reports for analysis based on report id and workspace id. This way, you can know which users have viewed this report in the current time period, which reports they have viewed, and in which workspace each user is in. Or you can use the API mentioned in my first reply, as long as you can get the corresponding timestamp, report id, user id, email, which can record the user identity and viewing time and content, it will be fine.
Monitor report usage metrics - Power BI | Microsoft Learn
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @devGV_88 ,
You can try this API:
Admin - Get Activity Events - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Solved: Re: How to fetch usage metric details through Powe... - Microsoft Fabric Community
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
82 | |
81 | |
36 | |
32 | |
32 |
User | Count |
---|---|
93 | |
79 | |
62 | |
54 | |
51 |