---
title: "Remove roles from User"
method: POST
path: "/business/v2/employees/{userId}/unassignRole"
tags: ["User Roles"]
---

# Remove roles from User

`POST /business/v2/employees/{userId}/unassignRole`

## Request

- Base URL: `https://api.soldo.com`
- URL: `https://api.soldo.com/business/v2/employees/{userId}/unassignRole`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.soldo.com/oauth/authorize` scopes: `employee_write`

Endpoint to remove a `Role` from an `User`.

## Path parameters

- `userId` string, required: The `User` ID to remove `Role` from.

## Request body

- UpdateUserRoleAssignment: Remove `Role` from `User` JSON parameters.
  - `name` string: The name of the `Role`.
  - `description` string: The description of the `Role`.
  - `scope` string: The name of the scope.

## Response `200`

The returned resource is a single `User`.

- AssignedUserRoles
  - `id` string: The `User` ID.
  - `roles` UserRole[]: The list of `UserRole` of the `User`.
    - `id` string: The ID of the `UserRole`.
    - `name` string: The name of the `UserRole`.
    - `description` string: The description of the `UserRole`.
    - `scope` string: The scope of the `UserRole`.

## Other responses

- `400`: Your request has missing arguments or is malformed.

---

[API](https://skmtc.dev/soldo/apis/soldo-business-api-v2-0.md) - [All operations](https://skmtc.dev/soldo/apis/soldo-business-api-v2-0/llms.txt) - [OpenAPI document](https://skmtc.dev/soldo/apis/soldo-business-api-v2-0/revisions/23fc5d07b367?raw)
