Skip to main content
Version: 2.0.0

unassignRole

Unassign a role from a specific user.

Parameters

unassignedRole - An object that contains the information about the role. The payload is defined below.

Payload

role - The role that will be unassigned (accepts either the role id or the role key).
tenant - The tenant the role is unassociated with (accepts either the tenant id or the tenant key).
user - The user the role will be unassigned to (accepts either the user id or the user key).

{
role: "role",
tenant: "tenant",
user: "user"
}

Implementation

const response = await permit.api.unassignRole(JSON.stringify(unassignedRole));