Skip to main content

current_user

Creates, updates, deletes, gets or lists a current_user resource.

Overview

Namecurrent_user
TypeResource
Iddatabricks_workspace.iam.current_user

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringDatabricks user ID.
nameobject
activeboolean
displayNamestringString that represents a concatenation of given and family names. For example `John Smith`. This field cannot be updated through the Workspace SCIM APIs when [identity federation is enabled]. Use Account SCIM APIs to update `displayName`. [identity federation is enabled]: https://docs.databricks.com/administration-guide/users-groups/best-practices.html#enable-identity-federation
emailsarrayAll the emails associated with the Databricks user.
entitlementsarrayEntitlements assigned to the user. See [assigning entitlements] for a full list of supported values. [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements
externalIdstringExternal ID is not currently supported. It is reserved for future use.
groupsarray
rolesarrayCorresponds to AWS instance profile/arn role.
schemasarrayThe schema of the user.
userNamestringEmail address of the Databricks user.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_nameGet details about the current method caller's identity.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Get details about the current method caller's identity.

SELECT
id,
name,
active,
displayName,
emails,
entitlements,
externalId,
groups,
roles,
schemas,
userName
FROM databricks_workspace.iam.current_user
WHERE deployment_name = '{{ deployment_name }}' -- required
;