Forum Discussion

rperes's avatar
rperes
New Member
6 years ago
Solved

How to add a member to a RLS via Power Shell, API or programatically

I would like to know if there is any way to add members (people or group) to a specific role using some kind of power shell script or API or even programatically. The users with access will be sitting in a table populated by an external system. So bascically every time an user is added to the table, I will trigger a process to add the user as a member.

  • hi  rperes 

    To my knowledge, There is no way to add a user for RLS via  Power Shell, API directly.

    And you try this workaround, you could add users into security group, then set RLS by this security group.

    Now add users in a table to security group via Power Shell.

     

    Regards,

    Lin

2 Replies

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    hi  rperes 

    To my knowledge, There is no way to add a user for RLS via  Power Shell, API directly.

    And you try this workaround, you could add users into security group, then set RLS by this security group.

    Now add users in a table to security group via Power Shell.

     

    Regards,

    Lin