Forum Discussion

JFrank12's avatar
JFrank12
New Member
4 years ago
Solved

RLS USERPRINCIPALNAME() - Return no records if not found

I have a user table with User emails assigned to ID. Subsequent tables linking User IDs to records. RLS is working great by matching USERPRINCIPALNAME() to email.

 

I am wanting to return no records if the USERPRINCIPALNAME() in not found in the user table emails. 

 

Is this possible? 

  • Based on the DAX condition you have setup, if the value returned by USERPRINCIPALNAME() doesn't exist in the table, the condition won't be satisfied which means no records will be returned and hence the user won't be able to see anything from that table.

    In other words, what you are wanting works by default.

1 Reply

  • Based on the DAX condition you have setup, if the value returned by USERPRINCIPALNAME() doesn't exist in the table, the condition won't be satisfied which means no records will be returned and hence the user won't be able to see anything from that table.

    In other words, what you are wanting works by default.