Forum Discussion
RLS logic help!
- 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/
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/
- k3rz0rg7 years agoAdvocate III
Hi GilbertQ ,
thanks for your response and tutorial and pardon my delayed response, i was out for 4th july vacation. I followed the similar procedure as the link suggested but when I test that rule with username offline (on desktop version while working on it), it works fine, once I publish it to the workspace and test it from there ( dataset > security > view/test as > username/email ) it does not filter and show all the data except one or two email addresses. I tried both username() and userprincipalname() and same outcome everytime.
Initially I thought maybe because some of them workspace admins so I changed their role from admin to just member as well but no luck. I even tried making one of those email id holders login from his computer and he was able to see all the data where he was not supposed to.
Do you have any idea why is this happening? Is there any PBI server glitch or something?
- GilbertQ7 years agoSuper UserHi 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.- k3rz0rg7 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.