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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Microsoft Employee
Microsoft 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
Microsoft Employee
Microsoft 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors