Forum Discussion
How to Handle Object Level Security without error
Hi,
I have implemented Row level and Object Level Security using this link.
Lets assume I have User Group A and User Group B. Group A can see all the columns where as Group B cannot see Column1 and Column2.
I have a table which have the few columns including Column 1 and Column 2.
Is there a way, when Group B accessing that table, can see the other data except Column1 and Column2 instead of showing the whole table as error
Thanks!
Try adding the columns via Field Parameters.
- Anonymous2 years ago
Hi sam_gift ,
Base on your description and screenshot, it seems like the visual can't be displayed normally when apply both RLS and OLS. Could you please get and provide the details of error message by clicking "See details" in below screenshot? Thank you. Later we will check it and make troubleshooting.
In addition, you can refer the following links to make troubleshooting and try to get the solution.
1. Check if hit any limitation
Considerations and limitations
2. Mastering OLS in PowerBi: Fixing Broken Visuals
How to fix broken visuals
There might different couple of workaround to fix lets discuss one of the best one i.e. using Field parameter in visual instead of using direct measure.
Scenario 1: Suppose you have two measures Discount and Sales. Under OLS particular group of people are not allowed to see sales. If we use OLS and put both measures individually it will break complete visual, it should show only Discount.To overcome this scenario make a field parameter of both Discount and Sales. Use parameter in visual instead of individual measure. Discount and Sales should be measures.
Scenario 2: If you need to restrict a particular column in a visual (direct column or calculated column), using Field Parameters may not be sufficient.
This scenario depends on use case such as if you can use measure instead of using Column/Calculated Column using Min, Max , etc of value and follow same path as scenario 1.Best Regards
8 Replies
- lbendlinSuper User
Try adding the columns via Field Parameters.
- uros_prevorcnikAdvocate I
Correct me if im wrong but this workaround doesn't work on service?
- lbendlinSuper User
Should work on the service too.
- AnonymousNot applicable
Hi sam_gift ,
Base on your description and screenshot, it seems like the visual can't be displayed normally when apply both RLS and OLS. Could you please get and provide the details of error message by clicking "See details" in below screenshot? Thank you. Later we will check it and make troubleshooting.
In addition, you can refer the following links to make troubleshooting and try to get the solution.
1. Check if hit any limitation
Considerations and limitations
2. Mastering OLS in PowerBi: Fixing Broken Visuals
How to fix broken visuals
There might different couple of workaround to fix lets discuss one of the best one i.e. using Field parameter in visual instead of using direct measure.
Scenario 1: Suppose you have two measures Discount and Sales. Under OLS particular group of people are not allowed to see sales. If we use OLS and put both measures individually it will break complete visual, it should show only Discount.To overcome this scenario make a field parameter of both Discount and Sales. Use parameter in visual instead of individual measure. Discount and Sales should be measures.
Scenario 2: If you need to restrict a particular column in a visual (direct column or calculated column), using Field Parameters may not be sufficient.
This scenario depends on use case such as if you can use measure instead of using Column/Calculated Column using Min, Max , etc of value and follow same path as scenario 1.Best Regards
- uros_prevorcnikAdvocate I
It does when using only one measure in a visual. What about when you are using more than one measure and one of them is affected by OLS? Do you have any workaround for this, because it doesn't work on service?
- lbendlinSuper User
The original question was for columns, not for measures. OLS affects columns (and tables) and doesn't really relate to measures.
- uros_prevorcnikAdvocate I
You're right, the original question was about columns. I was just jumping in because I have a similar issue, but with measures instead. I was hoping to get some help since the context felt somewhat related. I'm using OLS on the underlying columns, and while the solution with parameters works fine in Power BI Desktop, I'm running into a problem in the Power BI Service. When I have a visual that combines affected (by the OLS) and unaffected measures, instead of just showing the unaffected ones, the entire visual breaks.