Forum Discussion
RLS in Power BI Service
Hi
I am trying to use RLS to display data in a report based on username/user principal name. We get to PowerBI service and set the security and add users and test role, it works beautifully, but I am unsure what else is required for it work after testing the role. For example, I only want to view projects that I own which is linked to my user account/email address, but for some odd reason I still view every projects. Even though the report was published by someone else and that person owns the workspace and I am only a viewer in that workspace, I am still seeing all the projects instead of the ones I own.
Also we tested this in PBI Desktop before publishing and works there too.
Am I missing a step?
Thank you,
SJ
- Anonymous7 years ago
Hi SJ -
This sounds like a similar use case to what i am working on too. Just to get more details, what filter have you set on the role in Power BI desktop. The roles have to set up on the PBI desktop and cannot be setup on the service. If you want to check it against your username, try using the function Username() instead.
I think you are doing everything right, must be that the filter for he role is not working correctly. You also have to make sure there is a relationship in the data model between the report and the username, so when you filter on the username it will filter to the right dataset.
3 Replies
- AnonymousNot applicable
Hi SJ -
This sounds like a similar use case to what i am working on too. Just to get more details, what filter have you set on the role in Power BI desktop. The roles have to set up on the PBI desktop and cannot be setup on the service. If you want to check it against your username, try using the function Username() instead.
I think you are doing everything right, must be that the filter for he role is not working correctly. You also have to make sure there is a relationship in the data model between the report and the username, so when you filter on the username it will filter to the right dataset.
- AnonymousNot applicable
Thank you very much for the response.
I have done the dataset filtering already to ensure the email address and name maps accordingly.
I thought PBI service looks at email address.I have tried username() also - no change. I will double check my fitlering between the two datasets.
Thanks again.
SJ
- AnonymousNot applicable
Ha!
One thing that I noticed was even though I used both username() and userprincipalname() and both worked in PBI Desktop, I only used UPN to publish it to the workspace. Apologies I thought I used UN also to publish it.
So this time, I used UN and it worked!
Thank you,
SJ