assignRole( )


Assigns a role to group members.

Note: This function is only relevant for site admins, and group members with group admin permissions.

The assignRole() function returns a Promise that resolves to the newly-assigned role after it has successfully been assigned. Assigning a role overrides an existing role. For example, assigning a member role to an admin unassigns their admin role.

Method Declaration
Copy
Method Parameters
identifiersIdentifiersRequired

Group ID and member IDs.


rolestringRequired

Group member role to assign. One of:

  • "MEMBER": Group member.
  • "ADMIN": Group admin.

optionsOptions

Authorization options.

Returns
Return Type:Promise<Role>
Did this help?