users-v2 command group
This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.
Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.
The users-v2 command group within the Databricks CLI allows you to manage user identities in the Databricks workspace. Databricks recommends using SCIM provisioning to sync users and groups automatically from your identity provider to your Databricks workspace.
databricks users-v2 create
Create a new user in the Databricks workspace. This new user will also be added to the Databricks account.
databricks users-v2 create [flags]
Arguments
None
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. Not currently supported.
--id string
Databricks user ID.
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--user-name string
Email address of the Databricks user.
Examples
The following example creates a new user:
databricks users-v2 create --user-name "user@example.com" --display-name "Test User"
databricks users-v2 delete
Delete a user. Deleting a user from a Databricks workspace also removes objects associated with the user.
databricks users-v2 delete ID [flags]
Arguments
ID
Unique ID for a user in the Databricks workspace.
Options
Examples
The following example deletes a user:
databricks users-v2 delete 12345678
databricks users-v2 get
Get information for a specific user in the Databricks workspace.
databricks users-v2 get ID [flags]
Arguments
ID
Unique ID for a user in the Databricks workspace.
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 user details:
databricks users-v2 get 12345678
databricks users-v2 list
Get details for all the users associated with a Databricks workspace.
databricks users-v2 list [flags]
Arguments
None
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 ListSortOrder
The order to sort the results. Supported values: ascending, descending
--start-index int
Specifies the index of the first result.
Examples
The following example lists all users:
databricks users-v2 list
The following example lists users matching a filter:
databricks users-v2 list --filter "userName sw \"admin\""
databricks users-v2 patch
Partially update a user resource by applying the supplied operations on specific user attributes.
databricks users-v2 patch ID [flags]
Arguments
ID
Unique ID in the Databricks workspace.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
Examples
The following example patches a user using a JSON file:
databricks users-v2 patch 12345678 --json @patch.json
databricks users-v2 update
Replace a user's information with the data supplied in the request.
databricks 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. Not currently supported.
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--user-name string
Email address of the Databricks user.
Examples
The following example updates a user:
databricks users-v2 update 12345678 --display-name "Test User"
databricks users-v2 get-permission-levels
Get password permission levels that a user can have on an object.
databricks users-v2 get-permission-levels [flags]
Arguments
None
Options
Examples
The following example gets password permission levels:
databricks users-v2 get-permission-levels
databricks users-v2 get-permissions
Get the permissions of all passwords. Passwords can inherit permissions from their root object.
databricks users-v2 get-permissions [flags]
Arguments
None
Options
Examples
The following example gets password permissions:
databricks users-v2 get-permissions
databricks users-v2 set-permissions
Set password permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object.
databricks users-v2 set-permissions [flags]
Arguments
None
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
Examples
The following example sets password permissions using a JSON file:
databricks users-v2 set-permissions --json @permissions.json
databricks users-v2 update-permissions
Update the permissions on all passwords. Passwords can inherit permissions from their root object.
databricks users-v2 update-permissions [flags]
Arguments
None
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
Examples
The following example updates password permissions using a JSON file:
databricks users-v2 update-permissions --json @permissions.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