Docs
Live demo
POST/api/v2/identities/{id}/members

Add an existing user identity as a Principal-managed manual member of a group identity. Both manual and connector-managed groups are supported. The membership lives only on the Principal side and is never written back to the provider.

Parameters

Path1 required of 1
idstringpathrequired

Group Identity ID (UUID)

Request body application/json · AddGroupMemberRequest

Member addition request

Required1 of 1 fields
member_idstringrequired

Responses

201

Created

PrincipalGroupMemberResponse · 9 fields
created_atstring
created_bystring

Absent: Principal does not record who added a group member. The audit event of the change names the administrator.

group_idstring
idstring

The member identity. Absent when it could not be read.

25 fields
is_botboolean

Provider-confirmed account classification. Absent when unknown.

avatar_urlstring

Provider avatar or Gravatar URL for user identities.

created_atstring
descriptionstring
display_namestring
emailstring

Email from the identity metadata, when it is an address.

external_idstring
idstring
kindstring (IdentityKind)
usergroupservice
managedboolean
members_countinteger

Direct member total (group identities only): users, service accounts and nested groups, without GitLab access-token bots. GET /identities/graph reports the same number for the group.

members_through_subgroups_countinteger

Group identities only: members the group reaches only through its nested groups, at any depth, nested groups included, without GitLab access-token bots and without its own direct members. GET /identities/graph reports the same number.

people_through_subgroups_countinteger

Group identities only: people (users, a user marked as a service account too, no groups, no identities of kind service, no GitLab access-token bots) the group reaches only through its nested groups, each once, without its own direct members.

direct_people_countinteger

Group identities only: direct members that are people (users, a user marked as a service account too), without nested groups, identities of kind service and GitLab access-token bots.

service_accountboolean

True for a user an application uses instead of a person. A service account is the same user for rules, groups, credentials and targets. The mark only describes it. Absent for people, groups and service identities.

secret_locationstring

Service accounts only: where the application's secret is kept or is to be kept, as a path in the organization secret store. A description, never a secret. Principal does not read it. Absent when not recorded.

profile_sourcesarray of IdentityProfileSourceResponse

Returned only by GET /identities/{id}: the writer each profile field shows the value of, and other writers that hold a different value.

5 fields
fieldstringrequired
usernamedisplay_nameemailavatar_urlaccount_type
sourcestringrequired

connector: a connector sync. Principal: set in Principal. Legacy: kept from before sources were recorded. Sign_in: value of the first Dex sign-in.

connectorprincipallegacysign_in
connector_idstring · uuid
connector_namestring

Other writers that hold a different value. The shown value wins by priority.

Returned only by GET /identities/{id} for a person: whether an administrator or a connector suspended them.

3 fields
suspendedbooleanrequired
reasonstring

Who suspended the person, an administrator or a connector that no longer finds them.

administratorconnector
suspended_atstring · date-time
connector_namesarray of string
metadatamap of string → any
organization_idstring
organization_namestring
sourcesarray of string
updated_atstring
usernamestring

Login from the identity provider. A single sign-on user may have a generated key here.

member_idstring
member_typestring
organization_idstring
providerstring

Membership origin - "manual" for Principal-managed memberships, otherwise the connector provider that synced it.

403

The caller's roles do not grant the permission of the operation

409

Conflict - member already exists

Common errors: 400 401 404 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close