Forum Discussion
k3rz0rg
7 years agoAdvocate III
RLS logic help!
Hi all, I don't do RLS much so I need some help regarding the RLS logic. I have an extracted table from usage metrics which has user principal names or emails they used to login in a column and ...
- 7 years agoHi there
It sounds like you need Dynamic RLS, which makes it easier to manage
I suggest you read and try out this blog post from Kasper. There is a good working example which you can try and once you get that working, you can then apply it to your data.
https://www.kasperonbi.com/power-bi-desktop-dynamic-security-cheat-sheet/
GilbertQ
7 years agoSuper User
Hi there
If the users are members of the App Workspace V1, they are treated as Admins and will always see all the data.
You will need to remove the users from the App Workspace and share it via an App.
Or you can use the App Workspace V2 and assign the users a Viewer role.
If the users are members of the App Workspace V1, they are treated as Admins and will always see all the data.
You will need to remove the users from the App Workspace and share it via an App.
Or you can use the App Workspace V2 and assign the users a Viewer role.
k3rz0rg
7 years agoAdvocate III
Hi GilbertQ ,
pardon my delayed response and yes I noticed that admin/member role issue with the older version of workspace too and I believe, MS still need to work on the v2 as well. To avoid complication for the time being with such small report I created, I am just following the link you provided.
While I was working with dynamic RLS, I found the functions username() and userprincipalname() are the same (or at least giving me the same output in this case), do you know any differences between these two functions?
Thanks,
K3.
- GilbertQ7 years agoSuper UserHi there
Yes I do know the difference.
If you use USERNAME() and you are logged into a Domain controlled PC it will return DomainName\UserName
If you use USERPRINCIPALNAME() and you are logged into a Domain controlled PC it will return [email protected]
When you are on the Power BI Service, it uses the USERPRINCIPALNAME() I would suggest using the USERPRINCIPALNAME()