cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
New Member

Re: RLS with USERPRINCIPALNAME not working

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
Highlighted
Community Support
Community Support

Re: RLS with USERPRINCIPALNAME not working

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 it as the solution to help the other members find it more quickly.
Highlighted
New Member

Re: RLS with USERPRINCIPALNAME not working

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

Highlighted
New Member

Re: RLS with USERPRINCIPALNAME not working

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

Helpful resources

Announcements
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors