Forum Discussion
Row Level Security not working
When you selected the other user did you also tick the role? When you are testing as another user in the View As screen you need to specify both the role and username.
d_gosbell yes I did, and in the below screen shot when i select the role I created 'perm' it only shows data for Delaware
- d_gosbell3 years agoSuper User
amybirc77 wrote:
d_gosbell yes I did, and in the below screen shot when i select the role I created 'perm' it only shows data for Delaware
No, you didn't. When testing as another user you must click "Other user" AND one or more of the roles.
And normally when doing this you would have the role you tick setup with dynamic security (so it makes use of the USERPRINCIPALNAME() or USERNAME() functions). Because the link between a user and a role is stored on the server side it does not make sense to enter just a user when testing in desktop.
- amybirc773 years agoHelper II
d_gosbell thanks it worked on the desktop end, when I deployed it to the report server and added the user to the role, it did not work , it is showing data for all the states. I followed this video (https://www.youtube.com/watch?v=OV_l6HXATGE&t=636s) and did exactly the same using USERNAME() AND USERPRINCIPALNAME().
Did not work.