Is there a way to replace user's role using the API?


Is there a way to replace existing role for the user or remove all roles and add a new one? I found an API that would allow me to add role to a user. But, I can’t find a way to remove old role before adding a new one.

How can I replace current user’s role?


Hmm - Can’t see one.

I can see they recently introduced this though not sure there an endpoint for it yet.

removeRolesByTeamIdAndUserId(teamId: string, userId: string, roles: Array<string>): Promise<UpdateWriteOpResult> {

I guess the risk is trying to remove a role with users still in it.

You could add a feature request.