Skip to main content
Version: 1.0.0

assignRole

To update the user role after the user has been synced/created, use the following function:

assignedRole = permit.api.assignRole(user.customId, Role.key, Tenant.externalId);

// returns the assigned role with RoleAssignmentModel type
// {
// id: string,
// role: {
// id: string,
// name: string,
// description: string,
// tenantId: string,
// },
// user: string,
// scope: string,
// }