Forum Discussion
What to use as Data Source credentials?
- 3 years ago
You would need to use the Power BI Rest API to get this info. Admin - Get Refreshables - REST API (Power BI Power BI REST APIs) | Microsoft Learn for example will give you info on who has configured a dataset to refresh.
Dataflows - Get Dataflow Data Sources - REST API (Power BI Power BI REST APIs) | Microsoft Learn will show you what datasources are used in a dataflow, and there is a sister command for datasets.
There isn't one call that gets all datasets/dataflows and returns who has access to those data sources, but it isn't quite that simple as any data source that is through a gateway, the end user configuring the refresh only needs access to the gateway and doesn't configure each data source, so even for data sources that don't require a gateway, by putting them in the gateway, it is much easier to manage. The permissions are granted by the gateway, not the user configuring the refresh. They just need permissions as a gateway user.
But through the few Rest API's I've shown and the dozens and dozens of others, you could put together the info you need.
Is there a way to easily see what accounts are being used to refresh datasets, dataflows, etc.?
You would need to use the Power BI Rest API to get this info. Admin - Get Refreshables - REST API (Power BI Power BI REST APIs) | Microsoft Learn for example will give you info on who has configured a dataset to refresh.
Dataflows - Get Dataflow Data Sources - REST API (Power BI Power BI REST APIs) | Microsoft Learn will show you what datasources are used in a dataflow, and there is a sister command for datasets.
There isn't one call that gets all datasets/dataflows and returns who has access to those data sources, but it isn't quite that simple as any data source that is through a gateway, the end user configuring the refresh only needs access to the gateway and doesn't configure each data source, so even for data sources that don't require a gateway, by putting them in the gateway, it is much easier to manage. The permissions are granted by the gateway, not the user configuring the refresh. They just need permissions as a gateway user.
But through the few Rest API's I've shown and the dozens and dozens of others, you could put together the info you need.