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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
gssarathkumar
Frequent Visitor

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.

 

CompanyUser
Aabc@gmail.com
Bbcd@gmail.com
Ccda@gmail
Dcda@gmail
Dabc@gmail.com

 

Kindly help me how to acheive this Solution.

 

@amitchandak , @Greg_Deckler @lbendlin , @DesktopOwl @Goodlytics4U @help Ahmedx @Ahmedx @lbendlin @v-huijie-msft 

1 ACCEPTED SOLUTION
v-junyant-msft
Community Support
Community Support

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-usernam... 

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.

View solution in original post

1 REPLY 1
v-junyant-msft
Community Support
Community Support

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-usernam... 

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.

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.