Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Row Level Security WITHOUT user Email, based on userid

hey, quick question.   can i set up RLS without email?    im looking to make RLS based on userid, can i achive this?   the end target is RLS with embedded PBI that based on userid parameter.  ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    RLS is divided into dynamic and static, and dynamic requires the use of USERPRINCIPLENAME or USERNAME.

    Using the username() or userprincipalname() DAX function

    Depending on your requirements, you do not need to use the above two functions. You have static RLS here, which can be created after my example below.

    Create two roles. One is the role of user ID123 and the other is the role of user ID456. Because my sample data is only 123 and 465, you create multiple characters based on your sample data.

    The results of testing are as follows.

    After you save your report in Power BI Report Server, you manage security and add or remove members on the server.

    Add members to roles

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.