assignRole
To update the user role after the user has been synced/created, use the following function:
assignedRole = await permit.write(permit.api.assignRole(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,
// }