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
eddieh
New Member

RLS with USERPRINCIPALNAME not working

Hi Experts, 

 

Previously, I created a sales individual role to filter the report by the individual user as below.

AND([Email] = userprincipalname(), [Country] = "SG")

 

It worked well but there was a weird issue happened yesterday.

All users with the role can only see one sales' data. I tried to refresh and polish the dataset again. Then they became to see another one's data. I have no idea why the filter for userprincipalname() is not working. The only change I did yesterday was I upgraded the powerBI desktop to the latest version(Version: 2.66.5376.2521 64-bit (February 2019)). Please give me some advice. Thank you.  

1 ACCEPTED SOLUTION

After I republished the dataset, the issue was gone the next day. The issue remained 2 days. I don't know the root cause of this issue because I did not change the RLS setting. There may be some fixes in powerBI. 

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @eddieh ,

 

If you can please share a pbix file with part of sample data for test, it will be help for troubleshooting.


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

After I republished the dataset, the issue was gone the next day. The issue remained 2 days. I don't know the root cause of this issue because I did not change the RLS setting. There may be some fixes in powerBI. 

I'm having the same problem as in the post. It happened in the same day that happened to @eddieh.
I have 4 security roles and in each one i have a security group with the users. My security rules are also [Email User] = UserPrincipalName().

In my case every user in a security group sees the information related to an user, the mapped user changes when the schedule refresh is executed.
User 1/User2/User3 - mapped to Security role A -> after refresh -> sees User 2 Data
I was able to contain the situation disabling the schedule refresh and refreshing the dataset in Power BI Desktop and republishing the model.
I need help with this. Thank you.

Bruno Mairos Ferreira

DevScope

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.