# Update

Launch stage: Beta

`PATCH /api/2.0/identity/accounts/{account_id}/users/{user_id}`

Updates an existing user in the <Databricks> account and returns the updated user. Only the
 fields named in the update mask are modified. The updatable fields are fullName.givenName,
 fullName.familyName, status, and externalId.

 When AIM is enabled and the user is an external identity (its external_id is set), only
 external_id can be updated; its other fields are sourced from your identity provider.

API scopes: identity

## Path parameters

- `account_id` (string, optional)
  Required. The account ID for which the user is being updated.
- `user_id` (string, optional)
  Required. Internal ID of the user in <Databricks>.

## Query parameters

- `update_mask` (string, optional)
  Optional. The list of fields to update.

## Request body

- `user` (object, optional)
  Required. User to be updated in <Databricks>
  - `account_id` (string, optional)
    The accountId parent of the user in <Databricks>.
  - `user_id` (string, optional)
    Internal userId of the user in <Databricks>.
  - `external_id` (string, optional)
    ExternalId of the user in the customer's IdP.
  - `username` (string, optional)
    Username/email of the user.
  - `full_name` (object, optional)
    - `given_name` (string, optional)
    - `family_name` (string, optional)
  - `account_user_status` (string, optional)
    The activity status of a user in a <Databricks> account.
    Possible values: `STATE_UNSPECIFIED`, `ACTIVE`, `INACTIVE`

## Returns

Returns the User object.

## Response

```json
{
  "account_id": "string",
  "user_id": "string",
  "external_id": "string",
  "username": "string",
  "full_name": {
    "given_name": "string",
    "family_name": "string"
  },
  "account_user_status": "string"
}
```

