Forum Discussion
Dynamic Row level security
- Anonymous1 year ago
Hi raju8004212 ,
To clarify it isn’t possible to pass slicer values or variables into RLS. Power BI always applies RLS first (based on user identity), and only afterwards slicers/filters.That means a “toggle RLS by slicer” design isn’t supported. The only supported approaches are:
Dynamic RLS using USERPRINCIPALNAME() and a security mapping table.
Report-level toggles (disconnected slicer + measures/filters) to switch between PU/HR views within the user’s authorized data.
Separate roles/reports if different security contexts are mandatory.
So the workarounds I shared earlier will help you simulate the toggle experience, but the true RLS logic can’t be driven by slicers.
I'm not able to pass slicer values into rls whether it's a disconnected/ same table that's main problem I tried that as well it's not working thanks for checking I'm really looking for some help here to identify a way to make it working.
I did some digging, and it looks like there’s no direct way to have a slicer function like that in conjunction with RLS. The only possible approach would be a workaround without using any RLS, but that would be purely for user experience and not enforce any real security.
In terms of RLS, the proper method is still to define distinct roles and apply the appropriate filters based on user condition essentially assigning users to the roles that match their access requirements.