0
votes

I configured a quite simple powerbi report. I imported a excel (one table called Names) into powerbi containing two fields:

Name, email

eg:

John Doe, [email protected]
Jane Doe, [email protected]
Johnny Bravo, [email protected]

The emailadresses are equal to the ones the users use for logging in. In PowerBI Desktop I set up a role called 'OnlyMyName' on the only table. The expression is [email]=USERPRINCIPALNAME()

Now when testing the role in PowerBI Desktop everything works. I see only my name. When entering Johnny's email I see only Johnny's data.

I set up RLS on the Powerbi Service side. I added all users to the role.

Then I test de dataset logged in as as Jane Doe and I see only Jane's name. Testing the dataset with my login shows me my name. Logging in as Johnny, testing the dataset and I see only JOhnny.

Yay!

However, when opening the report I see all the names. No filtering takes place. Not for me, not for JOe, Jane or Johnny. Everybody sees everybodie's data.

If I replace [email]=userprincipalname() with [email]="Johnny Bravo" every user sees only Johnny Bravo in the list..........

I created a measure UPN = userprincipalname(), put that on the report and UPN is the same as the email... So why does userprincipalname() not work?

thanx for thinking with me

I just found out that, when I publish the report to an app, in the app the filtering works....

I remember that in a project 8 months ago the filtering based on RLS would happen in the workspaves too. Has this changed? Or is something else happening?

1

1 Answers

0
votes

Well, next time I will check in the app, not in the workspace......... RLS has no effect in the workspace