Skip to main content

Account Direct Group Member

View as Markdown

DirectGroupMember object​

A user, service principal, or group that's a direct member of a group.

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=accounts/*/groups/*/direct-members/*}

Gets a direct member of a group, 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 accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}.

Response​

Returns the DirectGroupMember object.

List direct group members GA​

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

Lists the direct members of a group, 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 accounts/{account_id}/groups/{group_id}.

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=accounts/*/groups/*}/direct-members

Adds a user, service principal, or group as a direct member of a group.

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 accounts/{account_id}/groups/{group_id}.

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=accounts/*/groups/*/direct-members/*}

Removes a direct member from a group.

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 accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}.