Skip to main content
Version: 2.0.0

getAssignedRoles

Get all the assigned roles for a specific user.

Parameters

userId - The ID of the user. This can also be the user key.
tenantId - optional - The id of the tenant or the tenant key. If no is tenant provided, all tenants will fetch.

Payload

{
user: "userId",
tenant: "tenantId"
}

Implementation

const roles = await permit.api.getAssignedRoles(userId, tenantId);