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
ajokerst-dhl
Regular Visitor

PowerBI/Powershell - Get list of datasources that a PBIX file uses

I am trying to get a list of datasources that a Powerbi file is using. I seen solutions online where I can use the ReportingService module to get a list but this only works when the PowerBI report is published online. Is there a solution that would work for a local file?

Here is the situation. A user gives me a Powerbi file. In order for me to get a list of datasources, I have to go in manually and to take a look at sources manually. Ideally, I would like to use Powershell to get this list.

1 ACCEPTED SOLUTION
ajokerst-dhl
Regular Visitor

All, in order to get datasources, you have to first publish the pbix and then query it to get the list.

https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources

View solution in original post

3 REPLIES 3
ajokerst-dhl
Regular Visitor

All, in order to get datasources, you have to first publish the pbix and then query it to get the list.

https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources

ajokerst-dhl
Regular Visitor

Alrighty, I was able to use the MicrosoftPowerBIMgmt.Data and the command Get-PowerBIDatasource to get the list of datasources. However, it's not returning the connection string or name. 

Name :

ConnectionString :

 

v-yalanwu-msft
Community Support
Community Support

Hi, @ajokerst-dhl ;

As far as I know, Power BI local files need to view the data source in the Data Source setting.
Power Shell is for services and does not include local files;
So you still need to check it manually.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.