---
title: "Remove User from Role"
url: "https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598/operations/RolesController_removeRole"
---

> Full API specification: https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598.md

# Remove User from Role

`DELETE` `/tenants/roles/{id}/users/{userId}`

Operation ID: `RolesController_removeRole`

Removes a specific role assignment from a user, revoking the associated permissions. This operation affects the user's access to system resources.

## Path parameters

- `id` (string, uuid, required) - The unique identifier (UUID) of the role
- `userId` (string, uuid, required) - The unique identifier (UUID) of the user to remove from the role

## Responses

- `204` - Successfully removed user from role
- `401` - Unauthorized - Invalid or missing authentication token
- `403` - Forbidden - Insufficient permissions to perform this operation.
- `404` - Role or user not found with the provided IDs

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Cipherscale API
  version: "1.0"
servers:
  - url: https://public-api.cipherscale.com/qa
    description: Cipherscale Public API Server
paths:
  /tenants/roles/{id}/users/{userId}:
    delete:
      operationId: RolesController_removeRole
      summary: Remove User from Role
      description: Removes a specific role assignment from a user, revoking the
        associated permissions. This operation affects the user's access to
        system resources.
      parameters:
        - name: id
          required: true
          in: path
          description: The unique identifier (UUID) of the role
          schema:
            format: uuid
            type: string
        - name: userId
          required: true
          in: path
          description: The unique identifier (UUID) of the user to remove from the role
          schema:
            format: uuid
            type: string
      responses:
        "204":
          description: Successfully removed user from role
        "401":
          description: Unauthorized - Invalid or missing authentication token
        "403":
          description: Forbidden - Insufficient permissions to perform this operation.
        "404":
          description: Role or user not found with the provided IDs
      tags:
        - Roles
      security:
        - ApiKeyAuth: []
security:
  - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
```
