---
title: account users-v2 command group
description: Learn how to use the Databricks CLI account users-v2 commands
canonical_url: https://docs.databricks.com/gcp/en/dev-tools/cli/reference/account-users-v2-commands
---

# `account users-v2` command group

> [!NOTE]
>
> Databricks CLI use is subject to the [Databricks License](https://github.com/databricks/cli?tab=License-1-ov-file#readme) and [Databricks Privacy Notice](https://www.databricks.com/legal/privacynotice), including any Usage Data provisions.

The `account users-v2` command group within the [Databricks CLI](https://docs.databricks.com/gcp/en/dev-tools/cli/index.md) contains commands to perform create, get, list, update, and delete operations on users. User identities are recognized by Databricks and represented by email addresses.

Databricks recommends using SCIM provisioning to sync users and groups automatically from your identity provider to your Databricks account. SCIM streamlines onboarding a new employee or team by using your identity provider to create users and groups in Databricks account and give them the proper level of access. When a user leaves your organization or no longer needs access to Databricks account, admins can terminate the user in your identity provider and that user's account will also be removed from Databricks account. This ensures a consistent offboarding process and prevents unauthorized users from accessing sensitive data. See [Manage Databricks users](https://docs.databricks.com/gcp/en/admin/users-groups/users.md).

## databricks account users-v2 create

Create a new user in the Databricks account.

```
databricks account users-v2 create [flags]
```

#### Options

**`--active`**

 If this user is active.

**`--display-name string`**

 String that represents a concatenation of given and family names.

**`--external-id string`**

 External ID is not currently supported.

**`--id string`**

 Databricks user ID.

**`--json JSON`**

 Either inline JSON string or @path/to/file.json with request body.

**`--user-name string`**

 Email address of the Databricks user.

[Global flags](https://docs.databricks.com/gcp/en/dev-tools/cli/reference/account-users-v2-commands.md#global-flags)

#### Examples

The following example creates a user using command-line flags:

```bash
databricks account users-v2 create --user-name "user@example.com" --display-name "Jane Doe"
```

The following example creates a user using JSON:

```bash
databricks account users-v2 create --json '{"userName": "user@example.com", "displayName": "Jane Doe", "active": true}'
```

The following example creates a user using a JSON file:

```bash
databricks account users-v2 create --json @user.json
```

## databricks account users-v2 delete

Delete a user from the Databricks account.

Deleting a user from a Databricks account also removes objects associated with the user.

```
databricks account users-v2 delete ID [flags]
```

#### Arguments

**`ID`**

    Unique ID for a user in the Databricks account.

#### Options

[Global flags](https://docs.databricks.com/gcp/en/dev-tools/cli/reference/account-users-v2-commands.md#global-flags)

#### Examples

The following example deletes a user by ID:

```bash
databricks account users-v2 delete 12345
```

## databricks account users-v2 get

Get information for a specific user in the Databricks account.

```
databricks account users-v2 get ID [flags]
```

#### Arguments

**`ID`**

    Unique ID for a user in the Databricks account.

#### Options

**`--attributes string`**

 Comma-separated list of attributes to return in response.

**`--count int`**

 Desired number of results per page.

**`--excluded-attributes string`**

 Comma-separated list of attributes to exclude in response.

**`--filter string`**

 Query by which the results have to be filtered.

**`--sort-by string`**

 Attribute to sort the results.

**`--sort-order GetSortOrder`**

 The order to sort the results. Supported values: `ascending`, `descending`.

**`--start-index int`**

 Specifies the index of the first result.

[Global flags](https://docs.databricks.com/gcp/en/dev-tools/cli/reference/account-users-v2-commands.md#global-flags)

#### Examples

The following example gets a user by ID:

```bash
databricks account users-v2 get 12345
```

The following example gets a user with specific attributes:

```bash
databricks account users-v2 get 12345 --attributes "userName,displayName"
```

## databricks account users-v2 list

Get details for all users associated with a Databricks account.

```
databricks account users-v2 list [flags]
```

#### Options

**`--attributes string`**

 Comma-separated list of attributes to return in response.

**`--excluded-attributes string`**

 Comma-separated list of attributes to exclude in response.

**`--filter string`**

 Query by which the results have to be filtered.

**`--limit int`**

 Maximum number of results to return.

**`--sort-by string`**

 Attribute to sort the results.

**`--sort-order ListSortOrder`**

 The order to sort the results. Supported values: `ascending`, `descending`.

[Global flags](https://docs.databricks.com/gcp/en/dev-tools/cli/reference/account-users-v2-commands.md#global-flags)

#### Examples

The following example lists all users:

```bash
databricks account users-v2 list
```

The following example lists users with pagination:

```bash
databricks account users-v2 list --limit 10
```

The following example lists users with a filter:

```bash
databricks account users-v2 list --filter "userName eq \"user@example.com\""
```

## databricks account users-v2 patch

Partially update a user resource by applying the supplied operations on specific user attributes.

```
databricks account users-v2 patch ID [flags]
```

#### Arguments

**`ID`**

    Unique ID in the Databricks workspace.

#### Options

**`--json JSON`**

 Either inline JSON string or @path/to/file.json with request body.

[Global flags](https://docs.databricks.com/gcp/en/dev-tools/cli/reference/account-users-v2-commands.md#global-flags)

#### Examples

The following example patches a user using JSON:

```bash
databricks account users-v2 patch 12345 --json '{"displayName": "Jane Smith"}'
```

The following example patches a user using a JSON file:

```bash
databricks account users-v2 patch 12345 --json @patch-user.json
```

## databricks account users-v2 update

Replace a user's information with the data supplied in request.

```
databricks account users-v2 update ID [flags]
```

#### Arguments

**`ID`**

    Databricks user ID.

#### Options

**`--active`**

 If this user is active.

**`--display-name string`**

 String that represents a concatenation of given and family names.

**`--external-id string`**

 External ID is not currently supported.

**`--json JSON`**

 Either inline JSON string or @path/to/file.json with request body.

**`--user-name string`**

 Email address of the Databricks user.

[Global flags](https://docs.databricks.com/gcp/en/dev-tools/cli/reference/account-users-v2-commands.md#global-flags)

#### Examples

The following example updates a user using command-line flags:

```bash
databricks account users-v2 update 12345 --display-name "Jane Smith" --active
```

The following example updates a user using JSON:

```bash
databricks account users-v2 update 12345 --json '{"userName": "user@example.com", "displayName": "Jane Smith", "active": true}'
```

The following example updates a user using a JSON file:

```bash
databricks account users-v2 update 12345 --json @update-user.json
```

## <a id="global-flags" />Global flags

**`--debug`**

  Whether to enable debug logging.

**`-h` or `--help`**

    Display help for the Databricks CLI or the related command group or the related command.

**`--log-file` string**

    A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.

**`--log-format` format**

    The log format type, `text` or `json`. The default value is `text`.

**`--log-level` string**

    A string representing the log format level. If not specified then the log format level is disabled.

**`-o, --output` type**

    The command output type, `text` or `json`. The default value is `text`.

**`-p, --profile` string**

    The name of the profile in the `~/.databrickscfg` file to use to run the command. If this flag is not specified then if it exists, the profile named `DEFAULT` is used.

**`--progress-format` format**

    The format to display progress logs: `default`, `append`, `inplace`, or `json`

**`-t, --target` string**

    If applicable, the bundle target to use
