---
title: "Update a SCIM user"
method: PUT
path: "/api/organizations/{name}/scim/v2/Users/{userId}"
tags: ["scim"]
---

# Update a SCIM user

`PUT /api/organizations/{name}/scim/v2/Users/{userId}`

Updates a provisioned user, you'll need to provide all their information fresh - just like setting them up for the first time. Any details you don't include will be automatically removed, so make sure to include everything they need to keep their account running smoothly. Setting `active` to `false` will deprovision the user from the organization.

## Path parameters

- `name` string, required
- `userId` string, required

## Request body

- object
  - `schemas` string[], required
  - `userName` string, required — Username for the user, it should respect the hub rules: No consecutive dashes, No digit-only, Does not start or end with a dash, Only dashes, letters or numbers, Not 24 chars hex string
  - `emails` object[], required
    - `value` string, email, required
  - `name` object, required
    - `givenName` string, required
    - `familyName` string, required
  - `active` boolean
  - `externalId` string, required

## Response `200`

SCIM User

- object
  - `schemas` string[], required
  - `id` string, required
  - `externalId` string, nullable, required
  - `userName` string, required
  - `displayName` string, required
  - `name` object, required
    - `givenName` string, required
    - `familyName` string, required
    - `formatted` string, required
  - `emails` object[], required
    - `value` string, required
    - `primary` boolean, required
    - `type` 'work' — We only support work emails, other types are converted to work
  - `active` boolean, required
  - `meta` object, required
    - `resourceType` 'User', required
    - `location` string, required

## Other responses

- `409` — User already exists

---

[API](https://skmtc.dev/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.dev/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/revisions/e1c551f50478/schema)
