assignRole( )


Assigns a role to a member.

The assignRole() function returns a Promise that resolves when the specified role is assigned to the specified member.

roleId must be an ID from an existing role in your site. The role ID can be copied from the Role Settings page. You can access the Role Settings page from your site's Member Permissions page.

Note: This function may take a few seconds until the role is assigned and the promise is resolved.

Method Declaration
Copy
Method Parameters
roleIdstringRequired

ID of the role to assign to the member.


memberIdstringRequired

ID of the member to assign the role to.


optionsAuthOptions

Authorization options.

Did this help?