cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MariosChr90
Helper II
Helper II

Issue with Row Level Security

Hello,

 

I have an issue in setting up a raw level security for my report. In my report I want to set a raw level security so each company can only see its sales in the report. Therefore, I created a raw level security from the Manage roles section under Modeling in Power BI Desktop, using the field "Company" and then authurised in Power BI service the related accounts to each role. The Company RLS worked fine.

 

The problem is when I want to apply a Raw Level Security for Group of Companies reports. There I use the field Group of companies to control the access. When I saw this did not worked I also used the "Company" field  and I chose the Companies manually (i.e. Company="Company1"||Company="Company2"||Company="Company3") but this did not work either as Group of Companies reports are always accessible to all accounts, even to the accounts that do not have permissions to see these.

 

Can you please support in this?

 

Thanks!

1 ACCEPTED SOLUTION
MariosChr90
Helper II
Helper II

Thank you all for your recomendations. However, the only way to give solution to this issue is to create a Dynamic RLS that solves the problem.

View solution in original post

8 REPLIES 8
MariosChr90
Helper II
Helper II

Thank you all for your recomendations. However, the only way to give solution to this issue is to create a Dynamic RLS that solves the problem.

V-pazhen-msft
Community Support
Community Support

@MariosChr90 ,

You can create three groups Company1, Company2, Company3 in the office365 group, place the users in the groups you want to see, and set them to Viewr, and then place the three groups created in the power bi service to the corresponding roles, so that users will view the specified data in the specified group.

If you want a user to be able to see everything, directly change the user role to Member.

Row-level security (RLS) with Power BI - Power BI | Microsoft Docs

 

Best Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yangliu-msft
Community Support
Community Support

Hi  @MariosChr90 ,

What sharing method do you use to give content to them.

The role in the workspace must be Viewer, otherwise RLS has no effect.

vyangliumsft_0-1629359144378.png

https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls#using-rls-with-workspaces-in-power...

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yangliu-msft ,

 

The role of the users in the workspace is viewer. Also I forfot to mention that the sharing is done through the workspace app if this helps to find the issue.

 

Thanks!

v-yangliu-msft
Community Support
Community Support

Hi  @MariosChr90 ,

 

Check whether there is a logical conflict between the new RLS expression relationship you created and the old RLS expression relationship.

For example, if a user has a condition, adding to another condition causes the user to exist in multiple roles, then these roles will conflict.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yangliu-msft thanks for your response. I checked for conflicts and I can confirm that there are no conflicts in these roles. I can see this after a check I did in our test environment when I leave only one role (so no chances for role conflicts) the issue still exists i.e. The RLS does not apply to the Group of Companies fields. 

 

blopez11
Super User
Super User

It would be easier to provide help if you could send screenshots of the following:

- your model, as it pertains to RLS

- roles setup in Power BI Desktop, showing role name and table

- DAX expression setup for each role

 

Thanks,

Hello @blopez11,

 

Thanks for your response, unfortunately I cannot provide any screenshots I can however provide some of the information you require.

 

Regarding DAX expression and table names for each role:

I have settled static RLS assigning the roles using the Company name field (i.e. Role1: Company Name="Company1" gained from Companies table. This works fine. When I go for group of companies I create a similar role (i.e. Group of Companies Name="Group of Companies1" gained from Group of companies table, but this does not work as everybody with no access can still see this group of companies.

 

Regarding the model please see below the structure

MariosChr90_0-1629189295112.png

 

 

Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Solution Authors
Top Kudoed Authors