Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JFrank12
New Member

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.

JFrank12_2-1653075546751.png

 

JFrank12_1-1653075323331.png

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

 

Is this possible? 

1 ACCEPTED SOLUTION
Shahfaisal
Solution Sage
Solution Sage

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.

View solution in original post

1 REPLY 1
Shahfaisal
Solution Sage
Solution Sage

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors