Forum Discussion
Role Level Security - Dynamic List of Users
Hi, I need to apply Row Level Security for the below list of user.
Scenarios:
The below table may dynamically change. I will have this file saved in SharePoint
One User may need access to multiple companies.
One Company may need to shared with multiple Users.
Few users needs access to all the Companies data.
| Company | User |
| A | [email protected] |
| B | [email protected] |
| C | cda@gmail |
| D | cda@gmail |
| D | [email protected] |
Kindly help me how to acheive this Solution.
@amitchandak , @Greg_Deckler @lbendlin , @DesktopOwl @Goodlytics4U @help Ahmedx @Ahmedx @lbendlin v-huijie-msft
- Anonymous2 years ago
Hi gssarathkumar ,
According to your description, your idea can be realized by dynamic RLS, you need to use the UserName() or UserPrincipalName() function in DAX. You also need to have at least two tables, one for company and user information, and another for what content each user or company can see, and create relationships between those two tables.
Then when creating the RLS, define this RLS with a statement similar to this one:[Username] = USERPRINCIPALNAME()and assign users in Power BI Service to Security.
This way, when a user logs in with the corresponding account, he can only see the corresponding content.
You can refer to the following documentation, where an example is provided:
Dynamic Row Level Security with Power BI Made Simple - RADACAD
Dynamic Row Level Security with Manager Level Access in Power BI - RADACAD
https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security#using-the-username-or-userprincipalname-dax-function
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi gssarathkumar ,
According to your description, your idea can be realized by dynamic RLS, you need to use the UserName() or UserPrincipalName() function in DAX. You also need to have at least two tables, one for company and user information, and another for what content each user or company can see, and create relationships between those two tables.
Then when creating the RLS, define this RLS with a statement similar to this one:[Username] = USERPRINCIPALNAME()and assign users in Power BI Service to Security.
This way, when a user logs in with the corresponding account, he can only see the corresponding content.
You can refer to the following documentation, where an example is provided:
Dynamic Row Level Security with Power BI Made Simple - RADACAD
Dynamic Row Level Security with Manager Level Access in Power BI - RADACAD
https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security#using-the-username-or-userprincipalname-dax-function
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.