---
title: "Unassign roles from user"
method: DELETE
path: "/resources/users/v1/{userId}/roles"
tags: ["User management"]
---

# Unassign roles from user

`DELETE /resources/users/v1/{userId}/roles`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/users/v1/{userId}/roles`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/users/v1/:userId/roles/delete.ts> (a function with typed inputs; its response is checked against the schema)

This route disassociates roles from a specific user for a specific tenant. Send the tenant’s ID in the **`frontegg-tenant-id`** header to declare which tenant. Send the role IDs in the POST body. The role IDs need to be an array of strings. Also send the user's ID as a path params.

## Path parameters

- `userId` string, required

## Headers

- `frontegg-tenant-id` string, required

## Request body

- UnassignUserFromRolesDto
  - `roleIds` string[], required

## Response `200`

- DeleteUserToRolesResponseDto
  - `tenantId` string, required
  - `userId` string, required
  - `roles` IRole[], required
    - `id` string, required
    - `key` string, required
    - `name` string, required
    - `description` string, required
    - `isDefault` boolean, required
    - `level` number, required
    - `createdAt` string, date-time, required

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
