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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MaraT
Frequent Visitor

RLS in app works only in "view as role" but not when the actual user views the report

Hi, Hoping for assistance.
I have RLS setup and for all users except 2 it works as expected.  For 2 users however, they can sucessfully access the App and report however it's showing no rows/data. I have tested their account in the "view as role" feature and can see their rows/data.

I've found 2 solutions on this community but neither worked in this case:
1. The users does not have access to the workspace so it's not to do with those secruity settings (all users who can successfully see their rows also do not have access to the workspace).
2. Have also updated the syntax from USERNAME to USERPRINCIPALNAME in the model however hasn't resolved.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Most likely their USERPRINCIPALNAME() value is not what you have in your RLS table. Troubleshoot that part.

View solution in original post

2 REPLIES 2
MaraT
Frequent Visitor

Thankyou, yes it turns out to be an interesting case where microsoft authenticator has logged the user in with the correct email address, however making the USERPRINCIPALNAME() visible on PBI report showed that that user had an extra "mail#" at the start of their account login.  Added an Or condition in the Dax to pick up either the main email address or with the "mail#" at the start which has fixed the problem.  Hopefully this will help other people!

lbendlin
Super User
Super User

Most likely their USERPRINCIPALNAME() value is not what you have in your RLS table. Troubleshoot that part.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.