Forum Discussion
Using RLS with Datasets
- 4 years ago
RLS should be defined in the parent dataset, not in the Live Connection report. If memory serves you can't use the security settings RLS test functionality with Live Connection report, you'll have to test accessing the report with one of the RLS'd users (make sure they're a Viewer in the workspace).
- 4 years ago
Yep, you'll have to test RLS in the workspace, the Live Connection will inherit RLS rules from the parent dataset since they're part of the data model.
https://docs.microsoft.com/en-us/power-bi/enterprise/service-admin-rls
Description: We've added 1) the appropriate table and relationship to the dataset 2) roles to the dataset which define the rls 3) linked the dashboard to the dataset 4) defined blank roles in the dashboard. The RLS works in the dataset file itself. The RLS does not work in the dashboard which is linked to the dataset. I have tried making the user we are testing someone with build access to the dataset and testing their permissions in the service. This does give them access to the dashboard.
This is working as intended, only users with the Viewer workspace role have RLS applied to them. Everyone who is Member or above will see everything.
You can test what RLS does in a report from the Security settings of the dataset and preview the result in reports (but not dashboards, they're not listed there).
- dwel01204 years ago
Helper III
otravers
I am testing it in the desktop dashboard as view role as and it is not working.- otravers4 years ago
Community Champion
To be able to help you we need you to be as precise as possible. There's no such thing as a "desktop dashboard", dashboards only exist in the service. The PBIX file you're opening in the desktop is a report with its underlying dataset.
Can you show a screenshot of what you're doing in Power BI Desktop to test RLS, as well one of your RLS DAX expressions?
- dwel01204 years ago
Helper III
I have the RLS email table connected to a table in my dataset with a many to many relationship and a single direction (from rls email table to table in dataset). I set up the roles (image below) in the dataset. The RLS worked in my dataset.
For my pbix file, I have the RLS email table connected through the pbi dataset. What would be the next steps? The table obviously doesn't show up because it is not directly connected to the PBIX file (see image below). Do I need to connect the RLS email table directly to the PBI file as well and then create the same roles and DAX expression?