# Replace a user

Launch stage: Public Preview

`PUT /api/2.0/preview/scim/v2/Users/{id}`

Replaces a user's information with the data supplied in request.
 The `userName` and `emails` attributes cannot be updated through this API; any supplied changes to them are ignored (no-op).

API scopes: scim

## Path parameters

- `id` (string, int64, required)
  Databricks user ID.

## Request body

- `active` (boolean, optional)
  If this user is active
- `displayName` (string, optional)
  String that represents a concatenation of given and family names. For example `John Smith`. This field cannot be updated through the Workspace SCIM APIs when [identity federation is enabled](https://docs.databricks.com/administration-guide/users-groups/best-practices.html#enable-identity-federation). Use Account SCIM APIs to update `displayName`.
- `emails` (array of object, optional)
  All the emails associated with the Databricks user. This attribute cannot be updated through the SCIM PATCH or PUT APIs; any supplied change is ignored.
  - `display` (string, optional)
  - `primary` (boolean, optional)
  - `$ref` (string, optional)
  - `type` (string, optional)
  - `value` (string, optional)
- `entitlements` (array of object, optional)
  Entitlements assigned to the user. See [assigning entitlements](https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements) for a full list of supported values.
  - `display` (string, optional)
  - `primary` (boolean, optional)
  - `$ref` (string, optional)
  - `type` (string, optional)
  - `value` (string, optional)
- `externalId` (string, optional)
  External ID is not currently supported. It is reserved for future use.
- `groups` (array of object, optional)
  - `display` (string, optional)
  - `primary` (boolean, optional)
  - `$ref` (string, optional)
  - `type` (string, optional)
  - `value` (string, optional)
- `name` (object, optional)
  - `familyName` (string, optional)
    Family name of the Databricks user.
  - `givenName` (string, optional)
    Given name of the Databricks user.
- `roles` (array of object, optional)
  Corresponds to AWS instance profile/arn role.
  - `display` (string, optional)
  - `primary` (boolean, optional)
  - `$ref` (string, optional)
  - `type` (string, optional)
  - `value` (string, optional)
- `schemas` (array of string, optional)
  The schema of the user.
  Possible values:
  - `USER_SCHEMA_UNSPECIFIED`
  - `urn:ietf:params:scim:schemas:core:2.0:User`
  - `urn:ietf:params:scim:schemas:extension:workspace:2.0:User`
- `userName` (string, email, optional)
  Email address of the Databricks user. This attribute cannot be updated through the SCIM PATCH or PUT APIs; any supplied change is ignored.

## Response

```json
{}
```

