Forum Discussion
Extracting Report and Data Source Metadata from Power BI
But like this, I can only do it report by report. Imagine I have 1000 reports, this is going to be a painful task.
Hi again bdpr_95 ,
Yes, completely understand your concern doing this one by one for each report can get very time-consuming, especially when you're dealing with hundreds or thousands of reports.
To handle this more efficiently, you can actually automate the entire process using a combination of Power BI REST APIs and XMLA connectivity. Using REST APIs, you can loop through all the workspaces and fetch the list of reports or datasets programmatically.
Then, for each dataset, you can connect via the XMLA endpoint and run TMSL or DMV queries to get detailed metadata like tables, columns, relationships, etc.
This approach helps you avoid doing it manually for each report and makes it much more scalable. You can use PowerShell or Python to script this out, and even schedule it to run regularly if needed.
Thank you.
- v-tejrama1 year agoCommunity Support
Hi bdpr_95 ,
Apologies for the inconvenience caused.
You can definitely extract details like the number of reports, connected data sources (such as Snowflake), and schema information from Power BI using the Power BI REST API or Admin API, provided you have the right permissions.
For your convenience, here are the official Microsoft documentation link:
Power BI Scanner API
The Scanner API is especially useful for accessing comprehensive metadata, including schema details, and integrates smoothly with notebooks or other processing tools.
Best regards,
Tejaswi.