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 = await permit.Api.AssignRole(user.customId, Role.id, Tenant.externalId);

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