Skip to main content

Workspace User

View as Markdown

User object​

The details of a User resource.

namestringBetaIDImmutable

The resource name of the user. The format depends on the API that returned it:

  • Account-scoped: accounts/{account_id}/users/{user_id}
  • Workspace-scoped: users/{user_id}
parentstringBetaOutput onlyImmutable

The resource name of the account that contains the user, accounts/{account_id}. Both the account-scoped and workspace-scoped APIs return it.

account_idstringBetaOutput onlyImmutable

The accountId parent of the user in Databricks.

user_idstringBetaOutput onlyImmutable

Internal userId of the user in Databricks.

external_idstringBeta

ExternalId of the user in the customer's IdP.

usernamestringBetaImmutable

Username/email of the user.

full_nameobjectBeta
Show child attributesHide child attributes
given_namestringBeta
family_namestringBeta
account_user_statusstringBeta

The activity status of a user in a Databricks account.

Values:

  • ACTIVE
  • INACTIVE

Get a user in the account Beta​

GET /api/2.0/identity/{name=users/*}

Fetches a user by its internal ID from the Databricks account that parents the calling workspace.

API scopes: identity

Parameters​

namestringRequiredpath

The resource name of the user. Format: users/{user_id}

Response​

Returns the User object.

List users in the account Beta​

GET /api/2.0/identity/users

Lists the users in the Databricks account that parents the calling workspace, returning one page per call. Supports filtering by username or external ID.

API scopes: identity

Parameters​

page_sizeint32query

The maximum number of users to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000.

page_tokenstringquery

A page token, received from a previous ListUsers call. Provide this to retrieve the subsequent page.

filterstringquery

Optional. Allows filtering users by username or external id.

parentstringquery

The resource name of the account to list users in, accounts/{account_id}. Optional: defaults to the account of the calling workspace, and any other account is rejected.

Response​

Returns a list of User objects.

Create a user in the account Beta​

POST /api/2.0/identity/users

Creates a local user in the Databricks account that parents the calling workspace and returns the created user. A local user is one that is not synced from the customer's identity provider, and can be created whether or not Account Identity Management (AIM) is enabled.

When AIM is enabled, supplying an external ID returns an error. To provision the identity from your identity provider, resolve it by its external ID with ResolveUser; to read an existing external identity, use the ExternalUser resource.

API scopes: identity

Parameters​

parentstringquery

The resource name of the account to create the user in, accounts/{account_id}. Optional: defaults to the account of the calling workspace, and any other account is rejected.

Request body​

Required. User to be created in Databricks

namestringIDImmutable

The resource name of the user. The format depends on the API that returned it:

  • Account-scoped: accounts/{account_id}/users/{user_id}
  • Workspace-scoped: users/{user_id}
external_idstring

ExternalId of the user in the customer's IdP.

usernamestringRequiredImmutable

Username/email of the user.

full_nameobjectRequired
Show child attributesHide child attributes
given_namestring
family_namestring
account_user_statusstringRequired

The activity status of a user in a Databricks account.

Values:

  • ACTIVE
  • INACTIVE

Response​

Returns the User object.

Update a user in the account Beta​

PATCH /api/2.0/identity/{name=users/*}

Updates an existing user in the Databricks account that parents the calling workspace 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

Parameters​

namestringRequiredIDImmutablepath

The resource name of the user. The format depends on the API that returned it:

  • Account-scoped: accounts/{account_id}/users/{user_id}
  • Workspace-scoped: users/{user_id}
update_maskstringRequiredquery

Required. The list of fields to update.

Request body​

Required. User to be updated in Databricks

external_idstring

ExternalId of the user in the customer's IdP.

usernamestringRequiredImmutable

Username/email of the user.

full_nameobjectRequired
Show child attributesHide child attributes
given_namestring
family_namestring
account_user_statusstringRequired

The activity status of a user in a Databricks account.

Values:

  • ACTIVE
  • INACTIVE

Response​

Returns the User object.

Delete a user in the account Beta​

DELETE /api/2.0/identity/{name=users/*}

Deletes a user by its internal ID from the Databricks account that parents the calling workspace.

API scopes: identity

Parameters​

namestringRequiredpath

The resource name of the user. Format: users/{user_id}

Resolve an external user in the Databricks account Beta​

POST /api/2.0/identity/users/resolve-by-external-id

Resolves a user with the given external ID from the customer's IdP. If the user does not exist, it will be created. If the customer is not onboarded onto Automatic Identity Management (AIM), this will return an error.

API scopes: identity

Request body​

external_idstringRequired

Required. The external ID of the user in the customer's IdP.

Response​

userobject

The user that was resolved.

Show child attributesHide child attributes
namestringIDImmutable

The resource name of the user. The format depends on the API that returned it:

  • Account-scoped: accounts/{account_id}/users/{user_id}
  • Workspace-scoped: users/{user_id}
parentstringOutput onlyImmutable

The resource name of the account that contains the user, accounts/{account_id}. Both the account-scoped and workspace-scoped APIs return it.

account_idstringOutput onlyImmutable

The accountId parent of the user in Databricks.

user_idstringOutput onlyImmutable

Internal userId of the user in Databricks.

external_idstring

ExternalId of the user in the customer's IdP.

usernamestringRequiredImmutable

Username/email of the user.

full_nameobjectRequired
Show child attributesHide child attributes
given_namestring
family_namestring
account_user_statusstringRequired

The activity status of a user in a Databricks account.

Values:

  • ACTIVE
  • INACTIVE