Forum Discussion
Export is not filtering the row level security
Hello Guys,
I have a report with a row level security.
If i export data from a table in power bi desktop the row level works and the csv is filtered right.
However, while testing different users in the power bi app, the exported data will not be filtered right and the user can see all data without any restrictions in the export.
Does anyone know if this is just in the testing because im the admin of the workspace or will this be the final behaviour for the users in our app?
BEst regards
Hello schaetzles!
You are right this should be due to your role as the Admin in the workspace. Any role except the Viewer role will not have RLS applied to them. From the documentation:
"If you publish your Power BI Desktop report to a workspace in the Power BI service, the RLS roles are applied to members who are assigned to the Viewer role in the workspace. Even if Viewers are given Build permissions to the dataset, RLS still applies. For example, if Viewers with Build permissions use Analyze in Excel, their view of the data will be protected by RLS. Workspace members assigned Admin, Member, or Contributor have edit permission for the dataset and, therefore, RLS doesn’t apply to them. If you want RLS to apply to people in a workspace, you can only assign them the Viewer role. Read more about roles in workspaces."
Row-level security (RLS) with Power BI - Power BI | Microsoft Learn
Try to create a user with the viewer role and see if RLS applies.
Best,
MatthiasPaul
2 Replies
- edhans
Community Champion
RLS only works if users are Viewers. If they have Contribution, Member, or Admin rights, they can see everything anyway as they have direct access to the datasets and RLS doesn't kick in.
- MatthiasPaulNew Member
Hello schaetzles!
You are right this should be due to your role as the Admin in the workspace. Any role except the Viewer role will not have RLS applied to them. From the documentation:
"If you publish your Power BI Desktop report to a workspace in the Power BI service, the RLS roles are applied to members who are assigned to the Viewer role in the workspace. Even if Viewers are given Build permissions to the dataset, RLS still applies. For example, if Viewers with Build permissions use Analyze in Excel, their view of the data will be protected by RLS. Workspace members assigned Admin, Member, or Contributor have edit permission for the dataset and, therefore, RLS doesn’t apply to them. If you want RLS to apply to people in a workspace, you can only assign them the Viewer role. Read more about roles in workspaces."
Row-level security (RLS) with Power BI - Power BI | Microsoft Learn
Try to create a user with the viewer role and see if RLS applies.
Best,
MatthiasPaul