Forum Discussion
Dynamic RLS not working
Hi there,
I would like to implement dynamic RLS based on USERPRINCIPALENAME().
I've tried setting it up, but didnt worked as i expected.
what am i doing wrong here?
ofcourse the measure 'Erwin email' is just to dummy the principal name.
Anonymous few things, change RLS to this because your measure contains the UPN
to test you need to do this:
and here is the output:
3 Replies
- parry2k
Super User
Anonymous few things, change RLS to this because your measure contains the UPN
to test you need to do this:
and here is the output:
- AnonymousNot applicable
realy 😂 i didnt worked because i didnt used the square bracktes [].
- parry2k
Super User
Anonymous hmmm, it is not random, it has a different meaning: anything in the quotes is treated as string, and if you want to refer to a measure or column, you have to wrap it in the square bracket. As a best practice, with columns, you will always use the table name and then the column name, for the measure you will never use the table name because it is global to the model.