---
title: "Patch User"
method: PATCH
path: "/Users/{id}"
tags: ["Users"]
---

# Patch User

`PATCH /Users/{id}`

## Request

- Base URL: `https://api.oneflow.com/scim/v1`
- URL: `https://api.oneflow.com/scim/v1/Users/{id}`
- Auth: HTTP bearer

Use this endpoint to update one or more attributes of a user.

## Path parameters

- `id` integer, required

## Query parameters

- `attributes` string
- `excludedAttributes` string

## Request body

- PatchOpRequest: Represents a patch request.
  - `schemas` string[]: A schema for representing the patch request.
  - `Operations` object[]: A list of operations, whose value is an array of one or more patch operations.
    - `op` 'add' | 'remove' | 'replace', required: Indicates the operation to perform.
    - `path` string: Indicates an attribute path describing the target of the operation.
    - `value` unknown

## Response `201`

Returns the updated user, optionally filtered by values in attributes or excludedAttributes parameters.

- User: Represents a user.
  - `active` boolean: Indicates if the user is active/enabled.
  - `displayName` string: The name of the user, suitable for display to end-users.
  - `name` object: Compatibility attribute, writes are allowed but discarded. Empty strings when read from.
    - `formatted` string
    - `familyName` string
    - `givenName` string
    - `middleName` string
    - `honorificPrefix` string
    - `honorificSuffix` string
  - `password` string: Compatibility attribute. Write-only, never returned. Writes are discarded.
  - `roles` object[]
    - `type` string, nullable: Type Identifier
    - `display` string, nullable: Roles display name
    - `value` string: Roles value
    - `primary` boolean: Roles primary
  - `externalId` string, nullable: A custom, user-supplied ID.
  - `groups` object[]: A list of groups to which the user belongs, either through direct membership, through nested groups, or dynamically calculated.
    - `display` string, nullable: Compatibility field, accepted but discarded.
    - `type` string: The name of the resource type of the resource. Always 'Group.'
    - `value` string: The ID of the group.
    - `x-ref` string: The URI of the corresponding "Group" resources to which the user belongs.
  - `id` string: The ID of this resource instance.
  - `locale` string: Indicate the User's default location for purposes of localization. It is the language tag only (no region).
  - `meta` object, nullable: An object containing user metadata properties.
    - `created` string, datetime: The time when the user was created.
    - `lastModified` string, datetime: The time when the user was last modified.
    - `location` string: The URI of the user being returned.
    - `resourceType` string: The name of the resource type of the resource. Always 'User.'
  - `phoneNumbers` object[]: Phone numbers for the user.
    - `primary` boolean: Whether or not the phone number is the user's primary phone number.
    - `value` string, nullable: The user's phone number.
    - `type` string: The phone number type.
  - `schemas` string[]: A schema for representing the user's configuration.
  - `title` string, nullable: The user's title.
  - `userName` string: A service provider's unique identifier for the user, typically used by the user to directly authenticate to the service provider.

## Other responses

- `400`: Invalid format or content of the request.
- `401`: The SCIM token is invalid.
- `403`: The request is not authorized by the server.
- `404`: A required entity is missing.
- `409`: A conflict occurred with the current state of the target resource.

---

[API](https://skmtc.dev/oneflow/apis/scim-api-for-oneflow.md) - [All operations](https://skmtc.dev/oneflow/apis/scim-api-for-oneflow/llms.txt) - [OpenAPI document](https://skmtc.dev/oneflow/apis/scim-api-for-oneflow/revisions/4373300e62fb?raw)
