Forum Discussion
being_human
1 year agoRegular Visitor
Embed an RLS based Direct query mode power bi report's iframe link in an web application
Hello Community, I have created a power bi report and published it my web application, now the problem is i have to create a role based view for my dashboard i.e., when group1 manager logs in he ...
Poojara_D12
1 year agoSuper User
Hi being_human
Create Roles in Power BI:
- Go to Modeling > Manage Roles in Power BI Desktop.
- Define roles using DAX filters, e.g., [Group] = "Group1". Repeat for all 16 groups.
Use Row-Level Security (RLS):
- Publish the report to Power BI Service.
- Assign users to roles under Security settings of the dataset.
Dynamic RLS with UPN (for dynamic filtering):
- Use USERPRINCIPALNAME() in the DAX filter to match logged-in user emails with a mapping table of groups.
Embed with Role Enforcement:
- Pass the user's Group/Email to Power BI Embedded using the embed token.
- Use the API to enforce the corresponding RLS role.
Done! The embedded report will now filter data based on the logged-in user's group.
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Please Subscribe my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
- being_human1 year agoRegular Visitor
Can you please share any articles or vedio link regarding it, also not getting how to achive below points
- Pass the user's Group/Email to Power BI Embedded using the embed token.
- Use the API to enforce the corresponding RLS role.