Forum Discussion
Managed indentity and Power BI
- 2 years ago
Hi boble ,
The idea is to refresh the token right before a semantic model refresh is triggered from the refreshes REST API. It's almost like a Just-In-Time access control approach: Anytime you want to fetch data from your sources, grab an access token from Entra ID (former Azure Active Directory) and use it for authentication. Then trigger a semantic model refresh via the REST API to get the data into Power BI. If you are already using the refreshes API to trigger a refresh (from a Data Factory, PowerShell, Python Script etc.) you would just need to add that part of fetching a token and updating the semantic model credentials before.
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Tom,
I'd be interested in reading more about your solution on your blog (great blog by the way). Which one is it? I thought it might be https://www.tackytech.blog/how-to-refresh-power-bi-datasets-from-data-factory-with-managed-identity/
but I wasn't sure.
Thanks
Tim
Hi TU186002 ,
It depends a little on what you wanna be doing. The article you are referring to uses Data Factory's Managed Identity to refresh a semantic model in Power BI.
The query in this thread here, however, was about using some kind of Managed Identity that authenticates from Power BI into data sources. Since Power BI does not have a Managed Identity, you need to use Service Principals. For this, you can programmatically assign a Service Principal to take over the semantic model and then use its credentials for authentication (e.g. via an access token).
I have seen in Fabric, that you can directly add a Service Principal and its secret without taking over the semantic model. I am not sure, whether this works out-of-the-box in Power BI already.
Here, the article that shows how to set a service principal as a semantic model owner:
https://www.tackytech.blog/how-to-make-a-service-principal-the-owner-of-a-power-bi-dataset/
Hope this helps!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/