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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shanu_123
Frequent Visitor

Power BI Embedded Authentication through Azure AD

I have implemeted Power BI Embedded sample "App-Own-Data" available at Power BI-Microsoft Docs, At the time of authenticate only that users are allowed that are added in workspace created in Power BI service, I want that all member Azure AD should able to authenticate and able to see reports based on roles, how can i authencate through azure AD in Power BI Embedded Application? As well roles are here hardcoded can we make them dynamic in code? Below is code for HomeController.cs -

 generateTokenRequestParameters = new GenerateTokenRequest("View", null, identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: "username", roles: new List<string> { username == "mohit.gupta@systematixindia.com" ? "Manager" : "Manager1" }, datasets: new List<string> { "bd725bc3-09b4-4c21-84b4-727d84a3f131" }) });

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @shanu_123,

 

If you are embedding for non-Power BI users (app owns data), which is typically an ISV scenario, then you should be able to follow this article to implement RLS. You will need to configure the embed token to account for the user and role.

 As well roles are here hardcoded can we make them dynamic in code? 

Based on my understanding, if you could store all the app user info with the corresponding user name, roles, and datasets in your database or somewhere else. Then you should be able to get the required info (by retrieving the database) to generate the TokenRequest for the current app user dynamically. Smiley Happy

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @shanu_123,

 

If you are embedding for non-Power BI users (app owns data), which is typically an ISV scenario, then you should be able to follow this article to implement RLS. You will need to configure the embed token to account for the user and role.

 As well roles are here hardcoded can we make them dynamic in code? 

Based on my understanding, if you could store all the app user info with the corresponding user name, roles, and datasets in your database or somewhere else. Then you should be able to get the required info (by retrieving the database) to generate the TokenRequest for the current app user dynamically. Smiley Happy

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.