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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
cwcusumano
Frequent Visitor

Script to pull Power BI information and create a custom Search for users

Screenshot 2024-04-16 124031.png

 

At my company, our Power BI reports have expanded significantly over the years. It’s been great and has had a huge impact on the business. However, the growing number of available reports has occasionally made it challenging to locate the most relevant information quickly.

 

A couple months ago, I started looking into using the Power BI REST API to pull our Power BI information and ultimately create URL links to every individual page we have available to the business, across all reports.

 

After a lot of fine-tuning, some ChatGPT help, and the team’s creativity, we have created a PowerShell script that pulls all of our Power BI information and paired it with a simple excel catalog of report page definitions….ultimately ending with a custom search ‘report’ for our users (shared in the same Power BI App as our primary company reports)

 

I’ve modified the final script to make it more universal to the masses and wanted to share. The link below is only for the PowerShell script - but it’s the main building block to then add onto it for a similar solution….or just a great tool for governance of what is available within Power BI in general.

 

The script will output an Excel doc with all the Power BI info related to:

  • Workspaces

  • Datasets

  • Reports

  • Pages within Reports

  • Apps

  • Reports within Apps

(URL links to each Power BI report page follows the same pattern of using a combination of Workspace ID or App ID, Report ID, and Page ID)

 

Side note: for ease of sharing, this script is entirely user-focused. It does not require any computer or Power BI Admin rights or an Azure app/secret. This also means the Power BI results will be specific to the permissions of the user who runs it.

 

This will also check for every PowerShell module and rights and install if necessary. I tried to make it so no matter what, even if you’ve never used PowerShell, simply copying and pasting the script will output the excel file into the directory defined in the first line of the script!

 

TLDR: here is a script to easily pull Power BI environment and report information….and either use it for governance or a quick way of creating a custom search with direct links.


All to say….hope people get use out of it!

https://github.com/chris1642/PowerBI-RestAPI-PStoExcel-InformationExtract

 

(It's designed so there is no 'real' need to edit the script in any way, outside of maybe the destination folder of where it saves....since it will pop up and ask you to log in and run based on the user's Power BI credentials and permissions).

1 ACCEPTED SOLUTION
cwcusumano
Frequent Visitor

This script will output an Excel doc with all the Power BI info related to:

 

  • Workspaces

  • Datasets

  • Reports

  • Pages within Reports

  • Apps

  • Reports within Apps

 

You can either use it for governance or a quick way of creating a custom search with direct links!


All to say….hope people get use out of it!

https://github.com/chris1642/PowerBI-RestAPI-PStoExcel-InformationExtract

View solution in original post

3 REPLIES 3
cwcusumano
Frequent Visitor

This script will output an Excel doc with all the Power BI info related to:

 

  • Workspaces

  • Datasets

  • Reports

  • Pages within Reports

  • Apps

  • Reports within Apps

 

You can either use it for governance or a quick way of creating a custom search with direct links!


All to say….hope people get use out of it!

https://github.com/chris1642/PowerBI-RestAPI-PStoExcel-InformationExtract

v-rongtiep-msft
Community Support
Community Support

Hi @cwcusumano ,

Thanks for your sharing!

You could reply yourself to share the links again, and then accept your reply as solution. An answered thread is searched more easily than an open one. Others will learn more from your sharing.

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you kindly! Done. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.