Forum Discussion
Update Datasource and Refresh using Service Principal
- Anonymous4 years ago
Hi JAnder ,
It looks like scheduled refresh failed because at least one data source is missing credentials.
To start the refresh again, go to this dataset's settings page and enter credentials for all data sources.According to your statement, please make sure you have configured credentials of your data source correctly in Power BI Service. If your data source need gateway to refresh, please add the credential to data source in gateway.
Add or remove a gateway data source
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi bhushant and JAnder , I have a similar use case to refresh datasets using SPN. please help me know if this got resolved
- bhushant3 years agoFrequent Visitor
Hi vamshikrishna20 ,
Using "Service Principal to Authenticate Data Source Credentials" , is still not supported. Power BI is unable to get RefreshToken for Service Principal after initial Authentication during Data Source Credentials update. As a work-around, I have implemented following
- Embedd Report using Service Principal or Master Account
- Update Data Source Credentials using Service Principal or Master Account
- While Updating Data Source Credentials with OAUTH2.0 set this [useEndUserOAuth2Credentials] to True,this will ensure EndUser AD credentials are used for Authenticating DataSource
- If the above param is not set to true, Service Principal or Master Account credentials/token is stored in connection, this token will expire after few hrs based on Service Principal or Master Account AD config
- To render / load PBI report in Application using iframe, I am using a Master Account as ServicePrincipals can not be assigned PBI licenses
Hope this will help you, I think with MS Fabric there are changes expected in the REST API and AUTH process
Thanks
- vamshikrishna203 years agoHelper III
bhushant , will this option also works for Direct Query also ?
- bhushant3 years agoFrequent Visitor
vamshikrishna20 - Yes, this will work for Direct Query as well , I have used this method for Direct Query connection to Azure Databricks Unity Catallog tables, Azure SQL Server Tables , ADLS Gen2 files