Forum Discussion
RLS Only Works For Some Users
We have a problem with our RLS whereby it is working for some users and not others, for these it is displaying all records unfiltered.
All users have the same permission level for the Workspace and they are all in the same role (and they are not duplicated across roles either). Also, this issue is across multiple Workspaces and datasets.
I've removed the workspace, recreated it, etc. as still the problem persists.
Any other suggestions would be greatly appreciated as Google has let me down 😊
10 Replies
- Tutu_in_YYCSuper User
Did you add them to the workspace with a role other than "Viewer", if yes, that would overwrite the RLS. Only "Viewer" works with RLS.
- otraversCommunity Champion
This is the most likely explanation. I blame Microsoft for defaulting to Member when you add users to a workspace.
- Lee_D2022Regular Visitor
Hi
Thanks for the reply (and apolgies for not getting back sooner)
The users have the same permissions level in the WS (viewer) and are in the same RLS security group.
There are 2 different datasets in the WS and the problem persists for the same users across dataset
- otraversCommunity Champion
Do you have an RLS role that can view everything? What's the DAX expression that defines it?
- Lee_D2022Regular Visitor
It passes userprinciplename to the users name (code below)
There is a role that sees everything. This doesn't have any filters applied.
DAX
Username =var atpos = iferror(search("@",USERPRINCIPALNAME()),0)returnif(atpos > 0,SUBSTITUTE(left(USERPRINCIPALNAME(),atpos-1),"."," "),"Error")