Power bi dataset refresh: how to use Service Principal for data source credentials

Viewed 158

One of the data sources in the Power Bi dataset points to Azure SQL straight (No Data Gateways). Service Principal can take ownership of the data set, but I do not see a way to assign credentials to the SQL data source inside this data set. In this case the credentials of the "managing" service principal would be fine.

1 Answers

Connecting to cloud datasources with powerbi happens also using a gateway, it is like a virtual one for the user. You can find more information here on how to update the credentials for the datasource created.

https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/update-datasource

One draw back, is that using the oauth2 method to pass an accesstoken will work but you will need to trigger it frequently as the accesstoken will expire after one hour ( with default configuration from azureAD)

Related