Forum Discussion
row level security not working in app/web
- Anonymous8 years ago
Anonymous,
Based on your description, you want to achieve the requirement that user123 can see all rows but other users can only see their respective rows.
In your scenario, you can create two roles in Power BI Desktop, one for user123 without any filter applied which is called Admin, and another role for other users with filter by UserName(). There is an example for your reference, in the second screeshot, replace the DAX with “[Email] = UserName()”.
After you publish the report to Power BI Service, go to Dataset->Security, add email address of user123 under Admin role, add email addresses of other users under OtherUser role. When adding members to the role in Power BI service, you can type in the email address, or name, of the user, security group or distribution list you want to add. For more details, please review this article: https://powerbi.microsoft.com/en-us/documentation/powerbi-admin-rls/ .Regards,
Lydia
Anonymous,
Based on your description, you want to achieve the requirement that user123 can see all rows but other users can only see their respective rows.
In your scenario, you can create two roles in Power BI Desktop, one for user123 without any filter applied which is called Admin, and another role for other users with filter by UserName(). There is an example for your reference, in the second screeshot, replace the DAX with “[Email] = UserName()”.
After you publish the report to Power BI Service, go to Dataset->Security, add email address of user123 under Admin role, add email addresses of other users under OtherUser role. When adding members to the role in Power BI service, you can type in the email address, or name, of the user, security group or distribution list you want to add. For more details, please review this article: https://powerbi.microsoft.com/en-us/documentation/powerbi-admin-rls/ .
Regards,
Lydia
- Anonymous8 years agoNot applicable
Hi Lydia,
thanks for your reply!
What you are describing is exactly what I am trying to achieve.
The only problem I still have is the last step you mentioned: "(...) add email addresses of other users under OtherUser role. (...)"
In my case I would have to add 200+ email addresses (if this little prove-of-concept I am trying to deliver is working as required).
Those 200+ users are also changing quite regularly. So my goal would be to have this filter enabled for ALL users as default filter.
Is there any possibility to add such a default filter for each and every user?
Thanks!
chris
- Anonymous8 years agoNot applicable
Anonymous,
I am not very clear about the filter you refer to. If you mean that create a role in Power BI Desktop, after you publish the report to Power BI Service, you still need to add users as members to the role in Power BI Service in order for RLS to work.
And you can add users in a security group or distribution list , this way, you don't need to type 200 email addresses to the role, just type security group or distribution list instead. Once you change users, you can just remove users or add users in the security group or distribution list .
Regards,
Lydia