> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Patch a SCIM user

> Applies partial updates to a SCIM user using SCIM PatchOp operations. Returns 200 with the updated user. Returns 204 when setting `active` to `false` on a pending invite.

Required scopes: `user_management:read-write`.

Supported token levels: `workspace`.

#### Authorizations

**Authorization** `string` *required*

This API uses OAuth 2.0 with the authorization code grant flow.

#### Path

**user\_id** `string` *required*

The workspace membership ID or workspace invite ID of the user to update.

Bodyapplication/json

**schemas** `string[]` *required*

Must include `"urn:ietf:params:scim:api:messages:2.0:PatchOp"`.

**Operations** `object[]` *required*

List of patch operations to apply sequentially.

**Operations\[]**

**op** `string` *required*

The operation type: `"add"`, `"replace"`, or `"remove"`. `"remove"` is only supported for `"name.givenName"` and `"name.familyName"`.

**path** `string`

The attribute to target. Supported paths: `"name.givenName"`, `"name.familyName"`, `"active"`, `"appRole"`. May be omitted when `value` contains a keyed object.

**value** `any`

The new value for the operation.

#### Response

Returns `200` with the updated user object (same shape as [Update a SCIM user](https://docs.attio.com/rest-api/scim/update-user.md)). Returns `204 No Content` when setting `active` to `false` on a pending invite; deprovisioning an active member returns `200`.

```json Update name theme={"system"}
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [
    {
      "op": "replace",
      "path": "name.givenName",
      "value": "Jane"
    }
  ]
}
```

```json Deprovision user theme={"system"}
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [
    {
      "op": "replace",
      "path": "active",
      "value": false
    }
  ]
}
```

```json Promote to admin theme={"system"}
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [
    {
      "op": "replace",
      "path": "appRole",
      "value": "admin"
    }
  ]
}
```

```json 200 theme={"system"}
{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "id": "3a8f5b2c-9e14-4d7a-b832-1c6f85d90e47",
  "userName": "john.doe@example.com",
  "name": {
    "givenName": "Jane",
    "familyName": "Doe"
  },
  "emails": [
    {
      "value": "john.doe@example.com",
      "primary": true,
      "type": "work"
    }
  ],
  "appRole": "member",
  "active": true,
  "meta": {
    "resourceType": "User",
    "created": "2024-01-01T00:00:00.000Z",
    "lastModified": "2024-01-02T00:00:00.000Z"
  }
}
```

```json 204 theme={"system"}
{}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.