---
title: "Replace a User"
method: PUT
path: "/scim/v2/Users/{user_id}"
tags: ["SCIM"]
---

# Replace a User

`PUT /scim/v2/Users/{user_id}`

## Request

- Base URL: `https://api.byndid.com`
- URL: `https://api.byndid.com/scim/v2/Users/{user_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/beyondidentity/apis/beyond-identity-secure-workforce-api/docs/scim/v2/Users/:user_id/put.ts> (a function with typed inputs; its response is checked against the schema)

To replace all attributes of an existing user, send a PUT request to `/Users/$USER_ID`. As specified in [RFC-7644 §3.5.1](https://datatracker.ietf.org/doc/html/rfc7644#section-3.5.1), this operation performs a complete replacement of all attributes except server-managed attributes.
Values in the request body for immutable or read-only fields will be ignored. If an attribute is not specified in the request, it will be removed or reset to its default value.
Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored

## Path parameters

- `user_id` string, required

## Request body

- object: Request for UpdateUser.
  - `user` SCIMUser, required: A user represents a human entity as defined by [RFC 7643 Section 4.1](https://www.rfc-editor.org/rfc/rfc7643#section-4.1). The externalId attribute must be unique across all users in the system.
    - `schemas` string[], required: The list of schemas used to define the user. This must contain only the core User schema ("urn:ietf:params:scim:schemas:core:2.0:User").
    - `id` string: The unique ID of the user. This is automatically generated on creation. This field is immutable and output-only.
    - `externalId` string: The provisioning client's unique identifier for the resource. This value must be unique across all users.
    - `userName` string: The unique username of the user. The value of this field will be returned as the subject of an OIDC ID Token.
    - `displayName` string: Display name of the User. This name is used for display purposes.
    - `active` boolean: Indicator for the user's administrative status. If true, the user has administrative capabilities.
    - `emails` object[]: The list containing the user's emails. Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored
      - `primary` boolean: Indicator for the primary email address. Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored
      - `value` string: The email address. Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored
      - `type` 'work' | 'home' | 'other': The type of email address. Valid values are "work", "home", and "other" as defined in [RFC 7643](https://www.rfc-editor.org/rfc/rfc7643). Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored
    - `name` object: Definition of the user's name.
      - `givenName` string: The given name of the user, or first name in most Western languages.
      - `familyName` string: The family name of the user, or last name in most Western languages.
    - `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User` object: The Employee Number as defined in the enterprise SCIM extension
      - `employeeNumber` string: A string identifier, typically numeric or alphanumeric, assigned to a person, typically based on order of hire or association with an organization as defined in [RFC 7643](https://datatracker.ietf.org/doc/html/rfc7643#section-4.3).
    - `groups` object[]: A list of groups that the user belongs to, as defined in [RFC 7643 Section 4.1.2](https://www.rfc-editor.org/rfc/rfc7643#section-4.1.2). This is a read-only attribute populated by the service provider.
      - `value` string: The identifier of the group.
      - `$ref` string: The URI of the corresponding group resource.
      - `type` string: A label indicating the attribute's function, e.g., 'direct' for direct group membership. Beyond Identity SCIM server supports only 'direct' membership for groups. Indirect membership is not supported.
    - `meta` object: Resource metadata as defined in [RFC 7643 Section 3.1](https://www.rfc-editor.org/rfc/rfc7643#section-3.1). This attribute is only populated on responses and is ignored on requests.
      - `resourceType` string, required: The name of the resource type of the resource.
      - `created` string, date-time, required: Timestamp of when the resource was created.
      - `lastModified` string, date-time, required: Timestamp of when the resource was last updated.
      - `location` string, required: The URI of the resource being returned.
      - `version` string, required: The version of the resource being returned. This is always "W/0".

## Response `200`

Successfully replaced the User resource. The response contains the full representation of the modified User, including any server-side changes and read-only attributes as specified in [RFC-7644 §3.5.1](https://datatracker.ietf.org/doc/html/rfc7644#section-3.5.1).

- SCIMUser: A user represents a human entity as defined by [RFC 7643 Section 4.1](https://www.rfc-editor.org/rfc/rfc7643#section-4.1). The externalId attribute must be unique across all users in the system.
  - `schemas` string[], required: The list of schemas used to define the user. This must contain only the core User schema ("urn:ietf:params:scim:schemas:core:2.0:User").
  - `id` string: The unique ID of the user. This is automatically generated on creation. This field is immutable and output-only.
  - `externalId` string: The provisioning client's unique identifier for the resource. This value must be unique across all users.
  - `userName` string: The unique username of the user. The value of this field will be returned as the subject of an OIDC ID Token.
  - `displayName` string: Display name of the User. This name is used for display purposes.
  - `active` boolean: Indicator for the user's administrative status. If true, the user has administrative capabilities.
  - `emails` object[]: The list containing the user's emails. Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored
    - `primary` boolean: Indicator for the primary email address. Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored
    - `value` string: The email address. Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored
    - `type` 'work' | 'home' | 'other': The type of email address. Valid values are "work", "home", and "other" as defined in [RFC 7643](https://www.rfc-editor.org/rfc/rfc7643). Important notes about email handling: - Only one email address is supported per user - The email must be marked as primary (primary: true) - If multiple email addresses are provided, only the primary email will be used and all others will be ignored
  - `name` object: Definition of the user's name.
    - `givenName` string: The given name of the user, or first name in most Western languages.
    - `familyName` string: The family name of the user, or last name in most Western languages.
  - `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User` object: The Employee Number as defined in the enterprise SCIM extension
    - `employeeNumber` string: A string identifier, typically numeric or alphanumeric, assigned to a person, typically based on order of hire or association with an organization as defined in [RFC 7643](https://datatracker.ietf.org/doc/html/rfc7643#section-4.3).
  - `groups` object[]: A list of groups that the user belongs to, as defined in [RFC 7643 Section 4.1.2](https://www.rfc-editor.org/rfc/rfc7643#section-4.1.2). This is a read-only attribute populated by the service provider.
    - `value` string: The identifier of the group.
    - `$ref` string: The URI of the corresponding group resource.
    - `type` string: A label indicating the attribute's function, e.g., 'direct' for direct group membership. Beyond Identity SCIM server supports only 'direct' membership for groups. Indirect membership is not supported.
  - `meta` object: Resource metadata as defined in [RFC 7643 Section 3.1](https://www.rfc-editor.org/rfc/rfc7643#section-3.1). This attribute is only populated on responses and is ignored on requests.
    - `resourceType` string, required: The name of the resource type of the resource.
    - `created` string, date-time, required: Timestamp of when the resource was created.
    - `lastModified` string, date-time, required: Timestamp of when the resource was last updated.
    - `location` string, required: The URI of the resource being returned.
    - `version` string, required: The version of the resource being returned. This is always "W/0".

## Other responses

- `400`: Request validation error. May occur due to: - Missing required attributes - Invalid attribute values - Schema validation failures - Missing or invalid email configuration
- `401`: Unauthorized.
- `404`: The resource was not found.
- `429`: Rate limit exceeded.
- `500`: Server error.

---

[API](https://skmtc.dev/beyondidentity/apis/beyond-identity-secure-workforce-api.md) - [All operations](https://skmtc.dev/beyondidentity/apis/beyond-identity-secure-workforce-api/llms.txt) - [OpenAPI document](https://skmtc.dev/beyondidentity/apis/beyond-identity-secure-workforce-api/revisions/562e14b2e4ba?raw)
