account users-v2 command group
Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.
The account users-v2 command group within the Databricks CLI 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 users.
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.
Examples
The following example creates a user using command-line flags:
databricks account users-v2 create --user-name "user@example.com" --display-name "Jane Doe"
The following example creates a user using JSON:
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:
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
Examples
The following example deletes a user by ID:
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.
Examples
The following example gets a user by ID:
databricks account users-v2 get 12345
The following example gets a user with specific attributes:
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.
Examples
The following example lists all users:
databricks account users-v2 list
The following example lists users with pagination:
databricks account users-v2 list --limit 10
The following example lists users with a filter:
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.
Examples
The following example patches a user using JSON:
databricks account users-v2 patch 12345 --json '{"displayName": "Jane Smith"}'
The following example patches a user using a JSON file:
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.
Examples
The following example updates a user using command-line flags:
databricks account users-v2 update 12345 --display-name "Jane Smith" --active
The following example updates a user using JSON:
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:
databricks account users-v2 update 12345 --json @update-user.json
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