current_user
Creates, updates, deletes, gets or lists a current_user resource.
Overview
| Name | current_user |
| Type | Resource |
| Id | databricks_workspace.iam.current_user |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | Databricks user ID. |
name | object | |
active | boolean | |
displayName | string | String 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 |
emails | array | All the emails associated with the Databricks user. |
entitlements | array | Entitlements 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 |
externalId | string | External ID is not currently supported. It is reserved for future use. |
groups | array | |
roles | array | Corresponds to AWS instance profile/arn role. |
schemas | array | The schema of the user. |
userName | string | Email address of the Databricks user. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | deployment_name | Get 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.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT examples
- get
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
;