Skip to main content

Workspace Direct Group Member

View as Markdown

A user, service principal, or group that's a direct member of a group. To address a membership, put its resource name in the URL: GET /api/2.0/identity/accounts/{account_id}/groups/{group_id}/direct-members/{principal_id} in account APIs, or GET /api/2.0/identity/groups/{group_id}/direct-members/{principal_id} in workspace APIs.

DirectGroupMember object​

A user, service principal, or group that's a direct member of a group. To address a membership, put its resource name in the URL: GET /api/2.0/identity/accounts/{account_id}/groups/{group_id}/direct-members/{principal_id} in account APIs, or GET /api/2.0/identity/groups/{group_id}/direct-members/{principal_id} in workspace APIs.

namestringIDImmutable

The resource name of the membership, in one of these formats:

  • Account APIs: accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}
  • Workspace APIs: groups/{group_id}/direct-members/{principal_id}
parentstringOutput onlyImmutable

The resource name of the group, in one of these formats:

  • Account APIs: accounts/{account_id}/groups/{group_id}
  • Workspace APIs: groups/{group_id}
principal_idint64Immutable

The Databricks ID of the member.

principal_typestringOutput only

Whether the member is a user, service principal, or group.

Values:

  • USER
  • SERVICE_PRINCIPAL
  • GROUP
membership_sourcestringOutput only

Where the membership comes from.

Values:

  • INTERNAL
  • IDENTITY_PROVIDER
display_namestringOutput only

The member's display name.

external_idstringOutput only

The ID of the member in your identity provider (IdP).

group_idint64Output only

The Databricks ID of the group.

Get a direct group member GA​

GET /api/2.0/identity/{name=groups/*/direct-members/*}

Gets a direct member of a group in the account that contains this workspace, including where the membership comes from. Returns an error if the principal isn't a direct member.

API scopes: identity

Parameters​

namestringRequiredpath

The resource name of the membership, in the format groups/{group_id}/direct-members/{principal_id}.

Example: groups/8763426537429053/direct-members/6412798305127934

Response​

Returns the DirectGroupMember object.

List direct group members GA​

GET /api/2.0/identity/{parent=groups/*}/direct-members

Lists the direct members of a group in the account that contains this workspace, sorted by display name, with where each membership comes from. Members in your identity provider who haven't been added to Databricks aren't included.

API scopes: identity

Parameters​

parentstringRequiredpath

The resource name of the group, in the format groups/{group_id}.

Example: groups/8763426537429053

page_sizeint32query

The maximum number of members to return, up to 1000. The default is 1000. A page can contain fewer members.

page_tokenstringquery

The next_page_token from a previous response, to get the next page.

Response​

Returns a list of DirectGroupMember objects.

Create a direct group membership GA​

POST /api/2.0/identity/{parent=groups/*}/direct-members

Adds a user, service principal, or group as a direct member of a group in the account that contains this workspace.

If automatic identity management is on and the group has an external_id, its members come from your identity provider and can't be changed in Databricks.

API scopes: identity

Parameters​

parentstringRequiredpath

The resource name of the group to add the member to, in the format groups/{group_id}.

Example: groups/8763426537429053

Request body​

The member to add. Set its principal_id.

namestringIDImmutable

The resource name of the membership, in one of these formats:

  • Account APIs: accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}
  • Workspace APIs: groups/{group_id}/direct-members/{principal_id}
principal_idint64RequiredImmutable

The Databricks ID of the member.

Response​

Returns the DirectGroupMember object.

Delete a direct group membership GA​

DELETE /api/2.0/identity/{name=groups/*/direct-members/*}

Removes a direct member from a group in the account that contains this workspace.

If automatic identity management is on and the group has an external_id, its members come from your identity provider and can't be changed in Databricks.

API scopes: identity

Parameters​

namestringRequiredpath

The resource name of the membership, in the format groups/{group_id}/direct-members/{principal_id}.

Example: groups/8763426537429053/direct-members/6412798305127934