Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
boble
New Member

Managed indentity and Power BI

Hello,

 

We aim to ensure our reports are not user-dependent. That's why we're interested in using a managed identity to manage the connections to our data sources. However, we're struggling to find information on this topic. Is this a common challenge?

1 ACCEPTED SOLUTION

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

3 REPLIES 3
tackytechtom
Super User
Super User

Hi @boble ,

 

I interpret your query that you want to use Power BI's "managed identity" to login to your data sources in order to fetch the data from there. However, Power BI does not have its own managed identity. You could use Service Principals instead, though. For this, the Service Principal needs to take over / own the semantic model. Here a blog about this topic. It utilises an Azure DevOps Pipeline to do the job as part of an CICD process for an Azure SQL Database. But in the end it is just a PowerShell script that you can also run from other clients. 

 

Let me know, if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Hi,

 

Thank you for the link. It was very informative. I see at the end of the article that there is an issue with the token expiration. How did you solve this?

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.