Update an identity's role and scopes within an organization. The request body (dto.OrgMembershipUpdateRequest) requires a role. Scopes are optional and, when omitted, the existing scopes are preserved (send an explicit array to replace them, or an empty array to clear).
Parameters
Organization ID (UUID)
Identity ID (UUID)
Request body application/json · OrgMembershipUpdateRequest
Membership update request
Organization role. "member" is a deprecated alias of "user".
adminusermemberviewerIf omitted, existing scopes are preserved. To replace scopes send an explicit scopes array (empty to clear).
Custom role the member holds on top of the built-in role. Omitted keeps the current custom role, null removes it.
Responses
OK
OrgMembershipResponse · 10 fields
The member user. Absent when it could not be read. A member that belongs to another organization (the administrator who created this organization) is shown by name, login, email and source only.
25 fields
Provider-confirmed account classification. Absent when unknown.
Provider avatar or Gravatar URL for user identities.
Email from the identity metadata, when it is an address.
usergroupserviceDirect 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.
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.
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.
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.
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.
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.
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
usernamedisplay_name emailavatar_url account_type 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 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
Who suspended the person, an administrator or a connector that no longer finds them.
administratorconnectorLogin from the identity provider. A single sign-on user may have a generated key here.
Effective organization role resolved from roles.
adminvieweruserCustom role the member holds on top of the built-in role.
2 fields
Everything the member may do in the organization: the built-in role, the custom role and the roles of the groups the member belongs to directly.
access:applyaccess:manageaccess:readapplications:manageapplications:readaudit:readdrift:managedrift:readidentities:manageidentities:readjobs:managejobs:readmembers:managemembers:readnotifications:managenotifications:readorganization:readsecurity:managesecurity:readtargets:managetargets:readtokens:managetokens:readConflict: the caller would lower their own administrator role, or an organization API token its responsible administrator's. Also (details.error_code organization_administrator_required) the change would leave the organization without a person who holds every permission and can sign in.
Common errors: 400 401 403 404 413 429 503 504. They mean the same for every operation, see Errors.