Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

how to fetch all Datasources for all Datasets

Hello, i am trying with the PowerShell apis but to no avail. i am looking for a way to retreive all the datasets and their underlying data sources for the whole organization. so i do not want to have to enter the DatasetID ot PowerBIDatasouce api.


anyhelp would be well appreciated



Not applicable

Any update on that ? 

Not applicable

Not sure what you mean by "whole organisation" but my guess is all workspaces that your user has access to.

Get all datasets in your organization: (Example 2)

Loop through all datasets and get all datasources in each dataset: (Example 2 if you only want datasources in your organization in the specified dataset)


You can call the REST api using Powershell , if you want to do that my suggestion would be to get all workspaces which you have access to:

Loop through all workspaces and for each workspace get all datasets :

And then for each dataset get all datasources :



Hi thanks for your reply, so when i say 'whole organization' i actually mean the organization.

so it looks like i need to write some powershell script to loop through the results from one api, and add as a parameter to another api.

is that what you mean ?



Not applicable

Okay, then yes I believe that is how you'll have to do it

mmmmm, fair enough.

i was hoping to run the individual apis, each into a file, and perform some joining in Power BI.

but due to having to have a DatasetID as an input parameter, i cannot run it wide open.

it's a shame as other apis, can be run wide open, with just the 'organization' -scope value




Not applicable

This is just a guess from my side, I don't know the Power BI Powershell API, powershell in general, well enough to tell you this is the way to go

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.