Skip to main content
Version: 1.0.0

assign_role

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


permit.write(permit.api.assign_role(user.customId, Role.key, Tenant.key))

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