Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
hi guys
I am having some trouble with getting Dynamic RLS to work.
I have created a table with all Usernames that I have related to a table with usernames and costcenters. This table is then related to the Dim Costcentertable, which is related to the fact tables.
I have with some borrowing from Radacad put in a second dimension (SeeALL) which I use to overwrite the PrincipalName filter for some individuals who should see all cost centers.
In the RLS filter I have the following DAX code:
If(
MaxX(
Filter(
Users,
'Users'[Username]=USERPRINCIPALNAME())
,'Users'[SeeAll])=0,
max('Users'[Username])=USERPRINCIPALNAME(),
1=1
)
The main problem is that it is not working, users on the User list can't get access to see anything in the app.
Furtermore the testing in the desktop is not really working either. It seems to only acknowledge myself as a User and everybody else can see everything when I enter their username in "view as roles" function:
so why is the testing giving another result (see everything = no filter) than the app in the service (no access, see below
I have already tried to skip the above DAX code and just write:
Users[Username] = Userprincipalname() This gives me the same result.. which I find quite odd.
Is there something wrong with the RLSfunction or am I doing something wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.