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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to get Workspace metadata in PowerBI

As shown below, this is the usual table we can see once we enter any workspace. 
Is there anyway other than using API to 'Get data' in Powerbi? 
If no, please let me know how I may call the API by using python. Thanks a lot with the help!!!!!!!!

mansonwy_0-1714720213441.png

 

1 ACCEPTED SOLUTION
Bipin-Lala
Super User
Super User

Hi @Anonymous,

 

To get the Workspace Metadata and other Power BI Tenant Catalog data, you would have to make use of Power BI REST APIs in one way or another.

Means you can call the APIs in multiple ways, like using Python as you mentioned, or even calling the API directly in Power BI using Web connector in Get Data. You can also make use of PowerShell cmdlets.

 

The Get Group API would be the starting API to help you in getting the data. (use the Try It section in the documentation page to see what data it returns for your workspace) Please follow the links below that detail the steps needed to connect to Power BI APIs and get data.

You should be able to find numerous blogs and videos that should help you in getting started with using Power BI APIs.

 

PS: You would require appropriate permissions to access APIs or app registrations with appropriate permissions and access to Power BI read-only admin APIs.

At our place, we are making use of app registrations along with PowerShell scripts to fetch Power BI Tenant activity and catalog data.

 

Let me know if you need any further help.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


Regards,

Bipin Lala | Business Intelligence Developer



View solution in original post

3 REPLIES 3
Bipin-Lala
Super User
Super User

Hi @Anonymous,

 

To get the Workspace Metadata and other Power BI Tenant Catalog data, you would have to make use of Power BI REST APIs in one way or another.

Means you can call the APIs in multiple ways, like using Python as you mentioned, or even calling the API directly in Power BI using Web connector in Get Data. You can also make use of PowerShell cmdlets.

 

The Get Group API would be the starting API to help you in getting the data. (use the Try It section in the documentation page to see what data it returns for your workspace) Please follow the links below that detail the steps needed to connect to Power BI APIs and get data.

You should be able to find numerous blogs and videos that should help you in getting started with using Power BI APIs.

 

PS: You would require appropriate permissions to access APIs or app registrations with appropriate permissions and access to Power BI read-only admin APIs.

At our place, we are making use of app registrations along with PowerShell scripts to fetch Power BI Tenant activity and catalog data.

 

Let me know if you need any further help.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


Regards,

Bipin Lala | Business Intelligence Developer



Anonymous
Not applicable

Thanks so much @Bipin-Lala !! Unfortunately, due to security issue I can only access to below. I do not have the access for tenant.all. However according to the scope of Microsoft Learn https://learn.microsoft.com/en-us/rest/api/power-bi/capacities/get-refreshables#code-try-0 it should be ok. But I am still having Error 401. 

mansonwy_0-1714988964751.png

 

Hi @Anonymous,

 

To make use of Service Principal Authentication for accessing Power BI APIs such as Capacities - Get Refreshables, you would have to configure certain settings in the Power BI Admin Portal so that Service Principal can access Power BI read-only APIs. The permissions granted in the Azure Portal do not work and will have to be removed.

 

The steps are explained in detail here - https://learn.microsoft.com/en-us/power-bi/enterprise/read-only-apis-service-principal-authentication#how-to-check-if-your-app-has-admin-consent-required-permissions

 

Get Refreshables are also part of the APIs list documented in the above link.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


Regards,

Bipin Lala | Business Intelligence Developer



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.