---
title: "Modify User"
method: PATCH
path: "/api/scim/v2/Users/{id}"
tags: ["Users V2"]
---

# Modify User

`PATCH /api/scim/v2/Users/{id}`

Use this API to activate a user, deactivate a user, or partially update a user's attributes. This API should only be used when provisioning and managing users from your Identity Provider using the System for Cross-Domain Identity Management (SCIM) standard to facilitate the automated creation of user identities from a third-party identity management application.

> 🗒 Things to Know
>
> - This API supports OneTrust's Legacy SCIM Integration that leverages SCIM groups, which are unique role-organization combinations that each represent a specific role within a particular organization. For more information, see [Legacy SCIM User Provisioning](https://my.onetrust.com/s/article/UUID-abda73a7-4996-c1b4-2e2a-e46aa3f2a3cc).
> - The following user attributes can be modified using this API: `givenName`, `familyName`, `externalId`, `active`, `division`, `userType`, `employeeNumber`, `department`, `manager`, and `title`.

## Path parameters

- `id` string, uuid, required

## Request body

- PatchUserResourceRequest
  - `id` string, uuid — Unique identifier for the user created by the OneTrust application.
  - `externalId` string — External Id
  - `meta` Meta
    - `created` string, date-time — The date and time when the resource was created
    - `lastModified` string, date-time — The date and time when the resource was last modified
    - `location` string, uri — The URL for the resource
    - `version` string — The version of the resource
    - `attributes` unknown[]
      - unknown
    - `resourceType` 'User' | 'Group' | 'ResourceType' | 'ServiceProviderConfig' | 'Schema' — The resource type
  - `schemas` string[]
  - `Operations` UserPatchApiOperation[]
    - `op` 'add' | 'remove' | 'replace', required — Operation to be performed. `add` will add new attributes, `replace` will update current attributes, and `remove` deletes attributes.
    - `path` string — Path of operation. If using `path` then only send the `value` as a string not an array. For example, for the `path` of `name.familyName`, send the `value` as `\"Burdell\"`.
    - `value` object, required — User attributes to be updated. This is a map of attribute names to their values.
      - `id` string, uuid — Unique identifier for the user created by the OneTrust application.
      - `externalId` string — External Id
      - `meta` Meta
        - `created` string, date-time — The date and time when the resource was created
        - `lastModified` string, date-time — The date and time when the resource was last modified
        - `location` string, uri — The URL for the resource
        - `version` string — The version of the resource
        - `attributes` unknown[]
          - unknown
        - `resourceType` 'User' | 'Group' | 'ResourceType' | 'ServiceProviderConfig' | 'Schema' — The resource type
      - `schemas` string[]
      - `businessUnit` string — User's business unit.
      - `division` string — The division with which the user is associated.
      - `employeeNumber` string — User's employee number or ID.
      - `officeLocation` string — The office location of the user.
      - `department` string — The department with which the user is associated.
      - `manager` Manager
        - `value` string, required — The manager's GUID or `id` in the OneTrust application. Leverage the [Get List of Users](/onetrust/reference/getusers) API to obtain a list of users. Use the manager's `id` to populate `value`.
        - `displayName` string — Manager's full name in the application.
        - `$ref` string, url — Reference URL to the user
      - `organization` string — Organization of the user within the OneTrust application.
      - `legacyManager` string — The legacy manager of the user.

## Response `200`

OK

- UserResource
  - `id` string, uuid — Unique identifier for the user created by the OneTrust application.
  - `externalId` string — External Id
  - `meta` Meta
    - `created` string, date-time — The date and time when the resource was created
    - `lastModified` string, date-time — The date and time when the resource was last modified
    - `location` string, uri — The URL for the resource
    - `version` string — The version of the resource
    - `attributes` unknown[]
      - unknown
    - `resourceType` 'User' | 'Group' | 'ResourceType' | 'ServiceProviderConfig' | 'Schema' — The resource type
  - `schemas` string[]
  - `userName` string, email — Username of the user in the OneTrust application.
  - `name` Name, required
    - `familyName` string — Family name (last name) of the user.
    - `givenName` string — Given name (first name) of the user.
  - `userType` 'Internal' | 'External' — Type of the user.
  - `active` boolean — The flag to check whether the user is an active or an inactive user.
  - `groups` UserGroup[]
    - `value` string — Unique identifier of a group in the application.
    - `display` string — Name of the User Group in the application.
  - `emails` Email[]
    - `value` string, email, required — Email of the user.
    - `display` string, email — Email of the user.
    - `primary` boolean — Is the email the user's primary. Always `true` in the OneTrust application.
    - `$ref` string, string — Reference for the attribute
    - `type` string — The type of the email. In the OneTrust application, type is always 'work'.
  - `roles` string[]
  - `title` string — Job title of the user
  - `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User` EnterpriseUser
    - `businessUnit` string — User's business unit.
    - `division` string — The division with which the user is associated.
    - `employeeNumber` string — User's employee number or ID.
    - `officeLocation` string — The office location of the user.
    - `department` string — The department with which the user is associated.
    - `manager` Manager
      - `value` string, required — The manager's GUID or `id` in the OneTrust application. Leverage the [Get List of Users](/onetrust/reference/getusers) API to obtain a list of users. Use the manager's `id` to populate `value`.
      - `displayName` string — Manager's full name in the application.
      - `$ref` string, url — Reference URL to the user
    - `organization` string — Organization of the user within the OneTrust application.
    - `legacyManager` string — The legacy manager of the user.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500` — Internal Server Error

---

[API](https://skmtc.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/versions/21de3aa0b170/schema)
