[Skip to main content](https://docs.gitlab.com/api/group_members/#skipTarget) [Go to GitLab Docs homepage](https://docs.gitlab.com/)
`/`
[What's new?](https://about.gitlab.com/releases/whats-new/)
English
  * Language
  * English
  * 日本語


v18.10
  *     * [18.10 (not yet released)](https://docs.gitlab.com/api/group_members/)
  *     * [18.9 (recently released)](https://docs.gitlab.com/18.9/api/group_members/)
    * [18.8](https://docs.gitlab.com/18.8/api/group_members/)
    * [18.7](https://archives.docs.gitlab.com/18.7/api/group_members/)
  *     * [17.11](https://archives.docs.gitlab.com/17.11/api/group_members/)
    * [16.11](https://archives.docs.gitlab.com/16.11/ee/api/group_members.html)
  *     * [Archives](https://docs.gitlab.com/archives)


Select theme and layout
  * Light mode
  * Dark mode
  * Auto


  * Fixed width
  * Fluid width


[What's new?](https://about.gitlab.com/releases/whats-new/) [Get free trial](https://gitlab.com/-/trial_registrations/new?glm_source=docs.gitlab.com&amp;glm_content=navigation-cta-docs)
Toggle menu
  * [Use GitLab](https://docs.gitlab.com/user/)
  * [GitLab Duo](https://docs.gitlab.com/user/gitlab_duo/)
  * [Extend](https://docs.gitlab.com/api/)
  * [Install](https://docs.gitlab.com/install/)
  * [Administer](https://docs.gitlab.com/administration/)
  * [Subscribe](https://docs.gitlab.com/subscriptions/)
  * [Contribute](https://docs.gitlab.com/development/)
  * [Solutions](https://docs.gitlab.com/solutions/)


Select a topicUse GitLab GitLab Duo Extend Install Administer Subscribe Contribute Solutions
[Getting started](https://docs.gitlab.com/api/get_started/get_started_extending/)
[Tutorials](https://docs.gitlab.com/tutorials/develop/)
[Integrations](https://docs.gitlab.com/integration/)
[Webhooks](https://docs.gitlab.com/user/project/integrations/webhooks/)
[REST API](https://docs.gitlab.com/api/rest/)
[Resources](https://docs.gitlab.com/api/api_resources/)
[.gitignore (templates)](https://docs.gitlab.com/api/templates/gitignores/)
[.gitlab-ci.yml (templates)](https://docs.gitlab.com/api/templates/gitlab_ci_ymls/)
[Access requests](https://docs.gitlab.com/api/access_requests/)
[Agent for Kubernetes](https://docs.gitlab.com/api/cluster_agents/)
[AI Catalog admin](https://docs.gitlab.com/api/admin/ai_catalog/)
[Alert management](https://docs.gitlab.com/api/alert_management_alerts/)
[Application appearance](https://docs.gitlab.com/api/appearance/)
[Application settings](https://docs.gitlab.com/api/settings/)
[Application statistics](https://docs.gitlab.com/api/statistics/)
[Applications](https://docs.gitlab.com/api/applications/)
[Attestations](https://docs.gitlab.com/api/attestations/)
[Audit events](https://docs.gitlab.com/api/audit_events/)
[Avatar](https://docs.gitlab.com/api/avatar/)
[Branches](https://docs.gitlab.com/api/branches/)
[Broadcast messages](https://docs.gitlab.com/api/broadcast_messages/)
[Cluster discovery (certificate-based) (deprecated)](https://docs.gitlab.com/api/cluster_discovery/)
[Code Suggestions](https://docs.gitlab.com/api/code_suggestions/)
[Commits](https://docs.gitlab.com/api/commits/)
[Compliance and policy settings](https://docs.gitlab.com/api/compliance_policy_settings/)
[Composer](https://docs.gitlab.com/api/packages/composer/)
[Conan v1](https://docs.gitlab.com/api/packages/conan_v1/)
[Conan v2](https://docs.gitlab.com/api/packages/conan_v2/)
[Container registry](https://docs.gitlab.com/api/container_registry/)
[Container repository protection rules](https://docs.gitlab.com/api/container_repository_protection_rules/)
[Container registry protection tag rules](https://docs.gitlab.com/api/container_registry_protection_tag_rules/)
[Container virtual registry](https://docs.gitlab.com/api/container_virtual_registries/)
[Custom attributes](https://docs.gitlab.com/api/custom_attributes/)
[Database migrations](https://docs.gitlab.com/api/database_migrations/)
[Data management](https://docs.gitlab.com/api/admin/data_management/)
[Debian](https://docs.gitlab.com/api/packages/debian/)
[Debian group distributions](https://docs.gitlab.com/api/packages/debian_group_distributions/)
[Debian project distributions](https://docs.gitlab.com/api/packages/debian_project_distributions/)
[Dependencies](https://docs.gitlab.com/api/dependencies/)
[Dependency list export](https://docs.gitlab.com/api/dependency_list_export/)
[Dependency Proxy](https://docs.gitlab.com/api/dependency_proxy/)
[Deploy keys](https://docs.gitlab.com/api/deploy_keys/)
[Deploy tokens](https://docs.gitlab.com/api/deploy_tokens/)
[Deployments](https://docs.gitlab.com/api/deployments/)
[Discussions](https://docs.gitlab.com/api/discussions/)
[Dockerfile (templates)](https://docs.gitlab.com/api/templates/dockerfiles/)
[DORA4 metrics](https://docs.gitlab.com/api/dora/metrics/)
[Emoji reactions](https://docs.gitlab.com/api/emoji_reactions/)
[Environments](https://docs.gitlab.com/api/environments/)
[Epics (deprecated)](https://docs.gitlab.com/api/epics/)
[Error tracking](https://docs.gitlab.com/api/error_tracking/)
[Events](https://docs.gitlab.com/api/events/)
[Experiments](https://docs.gitlab.com/api/experiments/)
[External status checks](https://docs.gitlab.com/api/status_checks/)
[Feature flags](https://docs.gitlab.com/api/feature_flags/)
[Feature flag user lists](https://docs.gitlab.com/api/feature_flag_user_lists/)
[Freeze periods](https://docs.gitlab.com/api/freeze_periods/)
[Geo nodes (deprecated)](https://docs.gitlab.com/api/geo_nodes/)
[Geo sites](https://docs.gitlab.com/api/geo_sites/)
[GitLab Duo Chat completions](https://docs.gitlab.com/api/chat/)
[GitLab Pages](https://docs.gitlab.com/api/pages/)
[GLQL](https://docs.gitlab.com/api/glql/)
[Go Proxy](https://docs.gitlab.com/api/packages/go_proxy/)
[Google Cloud integration](https://docs.gitlab.com/api/google_cloud_integration/)
[Groups](https://docs.gitlab.com/api/groups/)
[Access tokens](https://docs.gitlab.com/api/group_access_tokens/)
[Activity analytics](https://docs.gitlab.com/api/group_activity_analytics/)
[Badges](https://docs.gitlab.com/api/group_badges/)
[CI/CD variables](https://docs.gitlab.com/api/group_level_variables/)
[Enterprise users](https://docs.gitlab.com/api/group_enterprise_users/)
[Epic boards](https://docs.gitlab.com/api/group_epic_boards/)
[Import and export](https://docs.gitlab.com/api/group_import_export/)
[Integrations](https://docs.gitlab.com/api/group_integrations/)
[Issue boards](https://docs.gitlab.com/api/group_boards/)
[Iterations](https://docs.gitlab.com/api/group_iterations/)
[Labels](https://docs.gitlab.com/api/group_labels/)
[LDAP group links](https://docs.gitlab.com/api/group_ldap_links/)
[Markdown uploads](https://docs.gitlab.com/api/group_markdown_uploads/)
[Members](https://docs.gitlab.com/api/group_members/)
[Migration by direct transfer](https://docs.gitlab.com/api/bulk_imports/)
[Milestones](https://docs.gitlab.com/api/group_milestones/)
[Placeholder reassignments](https://docs.gitlab.com/api/group_placeholder_reassignments/)
[Protected branches](https://docs.gitlab.com/api/group_protected_branches/)
[Protected environments](https://docs.gitlab.com/api/group_protected_environments/)
[Push rules](https://docs.gitlab.com/api/group_push_rules/)
[Relations export](https://docs.gitlab.com/api/group_relations_export/)
[Releases](https://docs.gitlab.com/api/group_releases/)
[Repository storage moves](https://docs.gitlab.com/api/group_repository_storage_moves/)
[SAML](https://docs.gitlab.com/api/saml/)
[SCIM](https://docs.gitlab.com/api/scim/)
[Security settings](https://docs.gitlab.com/api/group_security_settings/)
[SSH certificates](https://docs.gitlab.com/api/group_ssh_certificates/)
[Webhooks](https://docs.gitlab.com/api/group_webhooks/)
[Wikis](https://docs.gitlab.com/api/group_wikis/)
[Helm](https://docs.gitlab.com/api/packages/helm/)
[Import](https://docs.gitlab.com/api/import/)
[Instance CI/CD variables](https://docs.gitlab.com/api/instance_level_ci_variables/)
[Invitations](https://docs.gitlab.com/api/invitations/)
[Issues](https://docs.gitlab.com/api/issues/)
[Issues (epic) (deprecated)](https://docs.gitlab.com/api/epic_issues/)
[Issues statistics](https://docs.gitlab.com/api/issues_statistics/)
[Jobs](https://docs.gitlab.com/api/jobs/)
[Job artifacts](https://docs.gitlab.com/api/job_artifacts/)
[Job token scopes](https://docs.gitlab.com/api/project_job_token_scopes/)
[Keys](https://docs.gitlab.com/api/keys/)
[License](https://docs.gitlab.com/api/license/)
[Licenses (templates)](https://docs.gitlab.com/api/templates/licenses/)
[Linked epics (deprecated)](https://docs.gitlab.com/api/linked_epics/)
[Links (issue)](https://docs.gitlab.com/api/issue_links/)
[Links (epic) (deprecated)](https://docs.gitlab.com/api/epic_links/)
[Lint .gitlab-ci.yml](https://docs.gitlab.com/api/lint/)
[Markdown](https://docs.gitlab.com/api/markdown/)
[Maven](https://docs.gitlab.com/api/packages/maven/)
[Maven virtual registry](https://docs.gitlab.com/api/maven_virtual_registries/)
[Member roles](https://docs.gitlab.com/api/member_roles/)
[Merge request approvals](https://docs.gitlab.com/api/merge_request_approvals/)
[Merge request approval settings](https://docs.gitlab.com/api/merge_request_approval_settings/)
[Merge request context commits](https://docs.gitlab.com/api/merge_request_context_commits/)
[Merge requests](https://docs.gitlab.com/api/merge_requests/)
[Merge trains](https://docs.gitlab.com/api/merge_trains/)
[Metadata](https://docs.gitlab.com/api/metadata/)
[Model registry](https://docs.gitlab.com/api/model_registry/)
[Namespaces](https://docs.gitlab.com/api/namespaces/)
[Notes (comments)](https://docs.gitlab.com/api/notes/)
[Notification settings](https://docs.gitlab.com/api/notification_settings/)
[npm](https://docs.gitlab.com/api/packages/npm/)
[NuGet](https://docs.gitlab.com/api/packages/nuget/)
[Organizations](https://docs.gitlab.com/api/organizations/)
[Packages](https://docs.gitlab.com/api/packages/)
[Pages domains](https://docs.gitlab.com/api/pages_domains/)
[Personal access tokens](https://docs.gitlab.com/api/personal_access_tokens/)
[Pipeline schedules](https://docs.gitlab.com/api/pipeline_schedules/)
[Pipeline trigger tokens](https://docs.gitlab.com/api/pipeline_triggers/)
[Pipelines](https://docs.gitlab.com/api/pipelines/)
[Plan limits](https://docs.gitlab.com/api/plan_limits/)
[Product analytics](https://docs.gitlab.com/api/product_analytics/)
[Projects](https://docs.gitlab.com/api/projects/)
[PyPI](https://docs.gitlab.com/api/packages/pypi/)
[Repositories](https://docs.gitlab.com/api/repositories/)
[Repository files](https://docs.gitlab.com/api/repository_files/)
[Repository submodules](https://docs.gitlab.com/api/repository_submodules/)
[Resource group](https://docs.gitlab.com/api/resource_groups/)
[Resource iteration events](https://docs.gitlab.com/api/resource_iteration_events/)
[Resource label events](https://docs.gitlab.com/api/resource_label_events/)
[Resource milestone events](https://docs.gitlab.com/api/resource_milestone_events/)
[Resource state events](https://docs.gitlab.com/api/resource_state_events/)
[Resource weight events](https://docs.gitlab.com/api/resource_weight_events/)
[Ruby gems](https://docs.gitlab.com/api/packages/rubygems/)
[Runners](https://docs.gitlab.com/api/runners/)
[Runner controllers](https://docs.gitlab.com/api/runner_controllers/)
[Runner controller tokens](https://docs.gitlab.com/api/runner_controller_tokens/)
[Search](https://docs.gitlab.com/api/search/)
[Search migrations](https://docs.gitlab.com/api/search_admin/)
[Secure files](https://docs.gitlab.com/api/secure_files/)
[Service accounts](https://docs.gitlab.com/api/service_accounts/)
[Service Ping](https://docs.gitlab.com/api/usage_data/)
[Sidekiq metrics](https://docs.gitlab.com/api/sidekiq_metrics/)
[Sidekiq queues](https://docs.gitlab.com/api/admin_sidekiq_queues/)
[Snippet repository storage moves](https://docs.gitlab.com/api/snippet_repository_storage_moves/)
[Snippets](https://docs.gitlab.com/api/snippets/)
[Suggestions](https://docs.gitlab.com/api/suggestions/)
[System hooks](https://docs.gitlab.com/api/system_hooks/)
[Tags](https://docs.gitlab.com/api/tags/)
[Terraform registry](https://docs.gitlab.com/api/packages/terraform-modules/)
[To-Do List](https://docs.gitlab.com/api/todos/)
[Token information](https://docs.gitlab.com/api/admin/token/)
[Topics](https://docs.gitlab.com/api/topics/)
[Users](https://docs.gitlab.com/api/users/)
[Version](https://docs.gitlab.com/api/version/)
[Virtual registries cleanup policies](https://docs.gitlab.com/api/virtual_registries_cleanup_policies/)
[Vulnerabilities](https://docs.gitlab.com/api/vulnerabilities/)
[Vulnerability archive export](https://docs.gitlab.com/api/vulnerability_archive_exports/)
[Vulnerability export](https://docs.gitlab.com/api/vulnerability_exports/)
[Vulnerability findings](https://docs.gitlab.com/api/vulnerability_findings/)
[Web commits](https://docs.gitlab.com/api/web_commits/)
[Authentication](https://docs.gitlab.com/api/rest/authentication/)
[Third-party clients](https://docs.gitlab.com/api/rest/third_party_clients/)
[Deprecations and removals](https://docs.gitlab.com/api/rest/deprecations/)
[OpenAPI](https://docs.gitlab.com/api/openapi/openapi_interactive/)
[Automate storage management](https://docs.gitlab.com/user/storage_management_automation/)
[Troubleshooting](https://docs.gitlab.com/api/rest/troubleshooting/)
[GraphQL API](https://docs.gitlab.com/api/graphql/)
[OAuth 2.0 identity provider API](https://docs.gitlab.com/api/oauth2/)
[GitLab Duo CLI (duo)](https://docs.gitlab.com/user/gitlab_duo_cli/)
[GitLab CLI (glab)](https://docs.gitlab.com/cli/)
[Editor and IDE extensions](https://docs.gitlab.com/editor_extensions/)
/
  1. [GitLab Docs](https://docs.gitlab.com/)
  2. [Extend](https://docs.gitlab.com/api/)
  3. [REST API](https://docs.gitlab.com/api/rest/)
  4. [Resources](https://docs.gitlab.com/api/api_resources/)
  5. [Groups](https://docs.gitlab.com/api/groups/)
  6. [Members](https://docs.gitlab.com/api/group_members/)


* * *
# Groups members API
  * Tier: Free, Premium, Ultimate
  * Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated


Use this endpoint to interact with group members.
For information about project members, see the [Project members API](https://docs.gitlab.com/api/project_members/).
## Known issues[](https://docs.gitlab.com/api/group_members/#known-issues "Permalink")
  * The `group_saml_identity` and `group_scim_identity` attributes are only visible to group owners for [SSO-enabled groups](https://docs.gitlab.com/user/group/saml_sso/).
  * The `email` attribute is only visible to group owners for [enterprise users](https://docs.gitlab.com/user/enterprise_user/) of the group when an API request is sent to the group itself, or that group’s subgroups or projects.


## List all group members[](https://docs.gitlab.com/api/group_members/#list-all-group-members "Permalink")
Lists all direct members of a specified group. Returns only direct members and not inherited members through ancestor groups or members from an invited group.
This function takes pagination parameters `page` and `per_page` to restrict the list of users.
```
GET /groups/:id/members
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the group](https://docs.gitlab.com/api/rest/#namespaced-paths).
`query` | string | no | Filters results based on a given name, email, or username. Use partial values to widen the scope of the query.
`user_ids` | array of integers | no | Filter the results on the given user IDs.
`skip_users` | array of integers | no | Filter skipped users out of the results.
`show_seat_info` | boolean | no | Show seat information for users.
shell
```
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members"
```

Example response:
json
```
[
  {
    "id": 1,
    "username": "raymond_smith",
    "name": "Raymond Smith",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "created_at": "2012-09-22T14:13:35Z",
    "created_by": {
      "id": 2,
      "username": "john_doe",
      "name": "John Doe",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
      "web_url": "http://192.168.1.8:3000/root"
    },
    "expires_at": "2012-10-22",
    "access_level": 30,
    "group_saml_identity": null,
    "is_using_seat": true
  },
  {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "created_at": "2012-09-22T14:13:35Z",
    "created_by": {
      "id": 1,
      "username": "raymond_smith",
      "name": "Raymond Smith",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
      "web_url": "http://192.168.1.8:3000/root"
    },
    "expires_at": "2012-10-22",
    "access_level": 30,
    "email": "john@example.com",
    "group_saml_identity": {
      "extern_uid":"ABC-1234567890",
      "provider": "group_saml",
      "saml_provider_id": 10
    }
  }
]
```

## List all group members, including inherited and invited members[](https://docs.gitlab.com/api/group_members/#list-all-group-members-including-inherited-and-invited-members "Permalink")
History
  * [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/219230) to return members of the invited private group if the current user is a member of the shared group or project in GitLab 16.10 [with a flag](https://docs.gitlab.com/administration/feature_flags/) named `webui_members_inherited_users`. Disabled by default.
  * Feature flag `webui_members_inherited_users` was [enabled on GitLab.com and GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/issues/219230) in GitLab 17.0.
  * Feature flag `webui_members_inherited_users` [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/163627) in GitLab 17.4. Members of invited groups displayed by default.


Lists all members of a specified group, including inherited members, invited users, and permissions through ancestor groups.
If a user is a member of this group and also of one or more ancestor groups, only its membership with the highest `access_level` is returned. This represents the effective permission of the user.
Members from an invited group are returned if either:
  * The invited group is public.
  * The requester is also a member of the invited group.
  * The requester is a member of the shared group.


The invited group members have shared membership in the shared group. This means that if the requester is a member of a shared group, but not a member of an invited private group, then using this endpoint the requester can get all the shared group members, including the invited private group members.
This function takes pagination parameters `page` and `per_page` to restrict the list of users.
```
GET /groups/:id/members/all
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the group](https://docs.gitlab.com/api/rest/#namespaced-paths).
`query` | string | no | Filters results based on a given name, email, or username. Use partial values to widen the scope of the query.
`user_ids` | array of integers | no | Filter the results on the given user IDs.
`show_seat_info` | boolean | no | Show seat information for users.
`state` | string | no | Filter results by member state, one of `awaiting` or `active`. Premium and Ultimate only.
shell
```
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/all"
```

Example response:
json
```
[
  {
    "id": 1,
    "username": "raymond_smith",
    "name": "Raymond Smith",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "created_at": "2012-09-22T14:13:35Z",
    "created_by": {
      "id": 2,
      "username": "john_doe",
      "name": "John Doe",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
      "web_url": "http://192.168.1.8:3000/root"
    },
    "expires_at": "2012-10-22",
    "access_level": 30,
    "group_saml_identity": null
  },
  {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "created_at": "2012-09-22T14:13:35Z",
    "created_by": {
      "id": 1,
      "username": "raymond_smith",
      "name": "Raymond Smith",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
      "web_url": "http://192.168.1.8:3000/root"
    },
    "expires_at": "2012-10-22",
    "access_level": 30,
    "email": "john@example.com",
    "group_saml_identity": {
      "extern_uid":"ABC-1234567890",
      "provider": "group_saml",
      "saml_provider_id": 10
    }
  },
  {
    "id": 3,
    "username": "foo_bar",
    "name": "Foo bar",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "created_at": "2012-10-22T14:13:35Z",
    "created_by": {
      "id": 2,
      "username": "john_doe",
      "name": "John Doe",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
      "web_url": "http://192.168.1.8:3000/root"
    },
    "expires_at": "2012-11-22",
    "access_level": 30,
    "group_saml_identity": null
  }
]
```

## Retrieve a group member[](https://docs.gitlab.com/api/group_members/#retrieve-a-group-member "Permalink")
Retrieves a specified member of a group. Returns only direct members and not inherited members through ancestor groups.
```
GET /groups/:id/members/:user_id
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the group](https://docs.gitlab.com/api/rest/#namespaced-paths).
`user_id` | integer | yes | The user ID of the member.
shell
```
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/:user_id"
```

To update or remove a custom role from a group member, pass an empty `member_role_id` value:
shell
```
# Updates a group membership
curl --request PUT --header "Content-Type: application/json" \
  --header "Authorization: Bearer <your_access_token>" \
  --data '{"member_role_id": null, "access_level": 10}' "https://gitlab.example.com/api/v4/groups/<group_id>/members/<user_id>"
```

Example response:
json
```
{
  "id": 1,
  "username": "raymond_smith",
  "name": "Raymond Smith",
  "state": "active",
  "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
  "web_url": "http://192.168.1.8:3000/root",
  "access_level": 30,
  "email": "john@example.com",
  "created_at": "2012-10-22T14:13:35Z",
  "created_by": {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root"
  },
  "expires_at": null,
  "group_saml_identity": null
}
```

## Retrieve a group member, including inherited and invited members[](https://docs.gitlab.com/api/group_members/#retrieve-a-group-member-including-inherited-and-invited-members "Permalink")
History
  * [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17744) in GitLab 12.4.
  * [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/219230) to return members of the invited private group if the current user is a member of the shared group or project in GitLab 16.10 [with a flag](https://docs.gitlab.com/administration/feature_flags/) named `webui_members_inherited_users`. Disabled by default.
  * [Enabled on GitLab.com and GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/issues/219230) in GitLab 17.0.
  * Feature flag `webui_members_inherited_users` [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/163627) in GitLab 17.4. Members of invited groups displayed by default.


Retrieves a specified member of a group, including members inherited or invited through ancestor groups. For more information, see [List all inherited members](https://docs.gitlab.com/api/group_members/#list-all-group-members-including-inherited-and-invited-members).
The invited group members have shared membership in the shared group. This means that if the requester is a member of a shared group, but not a member of an invited private group, then using this endpoint the requester can get all the shared group members, including the invited private group members.
```
GET /groups/:id/members/all/:user_id
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the group](https://docs.gitlab.com/api/rest/#namespaced-paths).
`user_id` | integer | yes | The user ID of the member.
shell
```
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/all/:user_id"
```

Example response:
json
```
{
  "id": 1,
  "username": "raymond_smith",
  "name": "Raymond Smith",
  "state": "active",
  "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
  "web_url": "http://192.168.1.8:3000/root",
  "access_level": 30,
  "created_at": "2012-10-22T14:13:35Z",
  "created_by": {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root"
  },
  "email": "john@example.com",
  "expires_at": null,
  "group_saml_identity": null
}
```

## List all billable group members[](https://docs.gitlab.com/api/group_members/#list-all-billable-group-members "Permalink")
Lists all billable members of a specified group. The list includes members in subgroups and projects.
Prerequisites:
  * You must have the Owner role to access the API endpoint for billing permissions, as shown in [billing permissions](https://docs.gitlab.com/user/free_user_limit/).
  * This API endpoint works on top-level groups only. It does not work on subgroups.


This function takes [pagination](https://docs.gitlab.com/api/rest/#pagination) parameters `page` and `per_page` to restrict the list of users.
Use the `search` parameter to search for billable group members by name, and `sort` to sort the results.
```
GET /groups/:id/billable_members
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path](https://docs.gitlab.com/api/rest/#namespaced-paths) of the group.
`search` | string | no | A query string to search for group members by name, username, or public email.
`sort` | string | no | A query string containing parameters that specify the sort attribute and order. See supported values below.
The supported values for the `sort` attribute are:
Value | Description
---|---
`access_level_asc` | Access level, ascending
`access_level_desc` | Access level, descending
`last_joined` | Last joined
`name_asc` | Name, ascending
`name_desc` | Name, descending
`oldest_joined` | Oldest joined
`oldest_sign_in` | Oldest sign in
`recent_sign_in` | Recent sign in
`last_activity_on_asc` | Last active date, ascending
`last_activity_on_desc` | Last active date, descending
shell
```
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/billable_members"
```

Example response:
json
```
[
  {
    "id": 1,
    "username": "raymond_smith",
    "name": "Raymond Smith",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "last_activity_on": "2021-01-27",
    "membership_type": "group_member",
    "removable": true,
    "created_at": "2021-01-03T12:16:02.000Z",
    "last_login_at": "2022-10-09T01:33:06.000Z"
  },
  {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "email": "john@example.com",
    "last_activity_on": "2021-01-25",
    "membership_type": "group_member",
    "removable": true,
    "created_at": "2021-01-04T18:46:42.000Z",
    "last_login_at": "2022-09-29T22:18:46.000Z"
  },
  {
    "id": 3,
    "username": "foo_bar",
    "name": "Foo bar",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "last_activity_on": "2021-01-20",
    "membership_type": "group_invite",
    "removable": false,
    "created_at": "2021-01-09T07:12:31.000Z",
    "last_login_at": "2022-10-10T07:28:56.000Z"
  }
]
```

## List all memberships for a billable group member[](https://docs.gitlab.com/api/group_members/#list-all-memberships-for-a-billable-group-member "Permalink")
Lists all memberships for a specified billable member of a group.
Prerequisites:
  * The response represents only direct memberships. Inherited memberships are not included.
  * This API endpoint works on top-level groups only. It does not work on subgroups.
  * This API endpoint requires permission to administer memberships for the group.


Lists all projects and groups a user is a member of. Only projects and groups in the group hierarchy are included. For instance, if the requested group is `Top-Level Group`, and the requested user is a direct member of both `Top-Level Group / Subgroup One` and `Other Group / Subgroup Two`, then only `Top-Level Group / Subgroup One` is returned, because `Other Group / Subgroup Two` is not in the `Top-Level Group` hierarchy.
This API endpoint takes [pagination](https://docs.gitlab.com/api/rest/#pagination) parameters `page` and `per_page` to restrict the list of memberships.
```
GET /groups/:id/billable_members/:user_id/memberships
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path](https://docs.gitlab.com/api/rest/#namespaced-paths) of the group.
`user_id` | integer | yes | The user ID of the billable member.
shell
```
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/billable_members/:user_id/memberships"
```

Example response:
json
```
[
  {
    "id": 168,
    "source_id": 131,
    "source_full_name": "Top-Level Group / Subgroup One",
    "source_members_url": "https://gitlab.example.com/groups/root-group/sub-group-one/-/group_members",
    "created_at": "2021-03-31T17:28:44.812Z",
    "expires_at": "2022-03-21",
    "access_level": {
      "string_value": "Developer",
      "integer_value": 30
    }
  },
  {
    "id": 169,
    "source_id": 63,
    "source_full_name": "Top-Level Group / Subgroup One / My Project",
    "source_members_url": "https://gitlab.example.com/root-group/sub-group-one/my-project/-/project_members",
    "created_at": "2021-03-31T17:29:14.934Z",
    "expires_at": null,
    "access_level": {
      "string_value": "Maintainer",
      "integer_value": 40
    }
  }
]
```

## List all indirect memberships for a billable group member[](https://docs.gitlab.com/api/group_members/#list-all-indirect-memberships-for-a-billable-group-member "Permalink")
  * Status: Experiment


History
  * [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/386583) in GitLab 16.11.


Gets a list of indirect memberships for a billable member of a group.
Prerequisites:
  * This API endpoint works on top-level groups only. It does not work on subgroups.
  * This API endpoint requires permission to administer memberships for the group.


Lists all projects and groups that a user is a member of, that have been invited to the requested top-level group. For instance, if the requested group is `Top-Level Group`, and the requested user is a direct member of `Other Group / Subgroup Two`, which was invited to `Top-Level Group`, then only `Other Group / Subgroup Two` is returned.
The response lists only indirect memberships. Direct memberships are not included.
This API endpoint takes [pagination](https://docs.gitlab.com/api/rest/#pagination) parameters `page` and `per_page` to restrict the list of memberships.
```
GET /groups/:id/billable_members/:user_id/indirect
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path](https://docs.gitlab.com/api/rest/#namespaced-paths) of the group.
`user_id` | integer | yes | The user ID of the billable member.
shell
```
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/billable_members/:user_id/indirect"
```

Example response:
json
```
[
  {
    "id": 168,
    "source_id": 132,
    "source_full_name": "Invited Group / Subgroup One",
    "source_members_url": "https://gitlab.example.com/groups/invited-group/sub-group-one/-/group_members",
    "created_at": "2021-03-31T17:28:44.812Z",
    "expires_at": "2022-03-21",
    "access_level": {
      "string_value": "Developer",
      "integer_value": 30
    }
  }
]
```

## Remove a billable group member[](https://docs.gitlab.com/api/group_members/#remove-a-billable-group-member "Permalink")
Removes a specified billable member from a group and its subgroups and projects.
The user does not need to be a group member to qualify for removal. For example, if the user was added directly to a project in the group, you can still use this API endpoint to remove them.
Member removal is handled asynchronously, so the changes complete in a few minutes.
```
DELETE /groups/:id/billable_members/:user_id
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path](https://docs.gitlab.com/api/rest/#namespaced-paths) of the group.
`user_id` | integer | yes | The user ID of the member.
shell
```
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/billable_members/:user_id"
```

## Change group membership state for a user[](https://docs.gitlab.com/api/group_members/#change-group-membership-state-for-a-user "Permalink")
Changes the membership state for a specified user in a group.
When a user is over [the free user limit](https://docs.gitlab.com/user/free_user_limit/), changing their membership state for a group or project to `awaiting` or `active` can allow them to access that group or project. The change is applied to applied to all subgroups and projects.
```
PUT /groups/:id/members/:user_id/state
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path](https://docs.gitlab.com/api/rest/#namespaced-paths) of the group.
`user_id` | integer | yes | The user ID of the member.
`state` | string | yes | The new state for the user. State is either `awaiting` or `active`.
shell
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/:user_id/state?state=active"
```

Example response:
json
```
{
  "success":true
}
```

## Add a group member[](https://docs.gitlab.com/api/group_members/#add-a-group-member "Permalink")
Adds a member to a specified group.
```
POST /groups/:id/members
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the group](https://docs.gitlab.com/api/rest/#namespaced-paths).
`user_id` | integer or string | yes, if `username` is not provided | The user ID of the new member or multiple IDs separated by commas.
`username` | string | yes, if `user_id` is not provided | The username of the new member or multiple usernames separated by commas.
`access_level` | integer | yes | A valid [access level](https://docs.gitlab.com/user/permissions/#default-roles) Possible values: `0` (No access), `5` (Minimal access), `10` (Guest), `15` (Planner), `20` (Reporter), `30` (Developer), `40` (Maintainer), `50` (Owner). Default: `30`.
`expires_at` | string | no | A date string in the format `YEAR-MONTH-DAY`.
`invite_source` | string | no | The source of the invitation that starts the member creation process. GitLab team members can view more information in this confidential issue: `https://gitlab.com/gitlab-org/gitlab/-/issues/327120>`.
`member_role_id` | integer | no | Ultimate only. The ID of a custom member role.
shell
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
     --data "user_id=1&access_level=30" "https://gitlab.example.com/api/v4/groups/:id/members"
```

Example response:
json
```
{
  "id": 1,
  "username": "raymond_smith",
  "name": "Raymond Smith",
  "state": "active",
  "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
  "web_url": "http://192.168.1.8:3000/root",
  "created_at": "2012-10-22T14:13:35Z",
  "created_by": {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root"
  },
  "expires_at": "2012-10-22",
  "access_level": 30,
  "email": "john@example.com",
  "group_saml_identity": null
}
```

If [administrator approval for role promotions](https://docs.gitlab.com/administration/settings/sign_up_restrictions/#turn-on-administrator-approval-for-role-promotions) is turned on, membership requests that promote existing users into a billable role require administrator approval.
To enable **Manage Non-Billable Promotions** , you must first enable the `enable_member_promotion_management` application setting.
Example of queueing a single user:
shell
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
     --data "user_id=1&access_level=30" "https://gitlab.example.com/api/v4/groups/:id/members"
```

json
```
{
  "message":{
    "username_1":"Request queued for administrator approval."
  }
}
```

Example of queueing multiple users:
shell
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
     --data "user_id=1,2&access_level=30" "https://gitlab.example.com/api/v4/groups/:id/members"
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
     --data "user_id=1,2&access_level=30" "https://gitlab.example.com/api/v4/projects/:id/members"
```

json
```
{
  "queued_users": {
    "username_1": "Request queued for administrator approval.",
    "username_2": "Request queued for administrator approval."
  },
  "status": "success"
}
```

## Update a group member[](https://docs.gitlab.com/api/group_members/#update-a-group-member "Permalink")
Updates a specified member of a group.
```
PUT /groups/:id/members/:user_id
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the group](https://docs.gitlab.com/api/rest/#namespaced-paths).
`user_id` | integer | yes | The user ID of the member.
`access_level` | integer | yes | A valid [access level](https://docs.gitlab.com/user/permissions/#default-roles) Possible values: `0` (No access), `5` (Minimal access), `10` (Guest), `15` (Planner), `20` (Reporter), `30` (Developer), `40` (Maintainer), `50` (Owner), `60` (Admin). Default: `30`.
`expires_at` | string | no | A date string in the format `YEAR-MONTH-DAY`.
`member_role_id` | integer | no | Ultimate only. The ID of a custom member role. If no value is specified, removes all roles.
shell
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/:user_id?access_level=40"
```

Example response:
json
```
{
  "id": 1,
  "username": "raymond_smith",
  "name": "Raymond Smith",
  "state": "active",
  "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
  "web_url": "http://192.168.1.8:3000/root",
  "created_at": "2012-10-22T14:13:35Z",
  "created_by": {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root"
  },
  "expires_at": "2012-10-22",
  "access_level": 40,
  "email": "john@example.com",
  "group_saml_identity": null
}
```

If [administrator approval for role promotions](https://docs.gitlab.com/administration/settings/sign_up_restrictions/#turn-on-administrator-approval-for-role-promotions) is turned on, membership requests that promote existing users into a billable role require administrator approval.
To enable **Manage non-billable promotions** , you must first enable the `enable_member_promotion_management` application setting.
Example response:
json
```
{
  "message":{
    "username_1":"Request queued for administrator approval."
  }
}
```

### Set override flag for a member of a group[](https://docs.gitlab.com/api/group_members/#set-override-flag-for-a-member-of-a-group "Permalink")
By default, the access level of LDAP group members is set to the value specified by LDAP through Group Sync. You can allow access level overrides by calling this endpoint.
```
POST /groups/:id/members/:user_id/override
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path](https://docs.gitlab.com/api/rest/#namespaced-paths) of the group.
`user_id` | integer | yes | The user ID of the member.
shell
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/:user_id/override"
```

Example response:
json
```
{
  "id": 1,
  "username": "raymond_smith",
  "name": "Raymond Smith",
  "state": "active",
  "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
  "web_url": "http://192.168.1.8:3000/root",
  "created_at": "2012-10-22T14:13:35Z",
  "created_by": {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root"
  },
  "expires_at": "2012-10-22",
  "access_level": 40,
  "email": "john@example.com",
  "override": true
}
```

### Remove override for a member of a group[](https://docs.gitlab.com/api/group_members/#remove-override-for-a-member-of-a-group "Permalink")
Sets the override flag to false and allows LDAP Group Sync to reset the access level to the LDAP-prescribed value.
```
DELETE /groups/:id/members/:user_id/override
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path](https://docs.gitlab.com/api/rest/#namespaced-paths) of the group.
`user_id` | integer | yes | The user ID of the member.
shell
```
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/:user_id/override"
```

Example response:
json
```
{
  "id": 1,
  "username": "raymond_smith",
  "name": "Raymond Smith",
  "state": "active",
  "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
  "web_url": "http://192.168.1.8:3000/root",
  "created_at": "2012-10-22T14:13:35Z",
  "created_by": {
    "id": 2,
    "username": "john_doe",
    "name": "John Doe",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root"
  },
  "expires_at": "2012-10-22",
  "access_level": 40,
  "email": "john@example.com",
  "override": false
}
```

## Remove a group member[](https://docs.gitlab.com/api/group_members/#remove-a-group-member "Permalink")
Removes a specified user from a group where the user has been explicitly assigned a role.
The user needs to be a group member to qualify for removal. For example, if the user was added directly to a project in the group but not this group explicitly, you cannot use this API endpoint to remove them. See [Remove a billable member from a group](https://docs.gitlab.com/api/group_members/#remove-a-billable-group-member) for an alternative approach.
```
DELETE /groups/:id/members/:user_id
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the group](https://docs.gitlab.com/api/rest/#namespaced-paths).
`user_id` | integer | yes | The user ID of the member.
`skip_subresources` | boolean | false | Whether the deletion of direct memberships of the removed member in subgroups and projects should be skipped. Default is `false`.
`unassign_issuables` | boolean | false | Whether the removed member should be unassigned from any issues or merge requests inside a given group or project. Default is `false`.
Example request:
shell
```
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/:user_id"
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/:id/members/:user_id"
```

## Approve a group member[](https://docs.gitlab.com/api/group_members/#approve-a-group-member "Permalink")
Approves a specified pending user for a group and its subgroups and projects.
```
PUT /groups/:id/members/:member_id/approve
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the top-level group](https://docs.gitlab.com/api/rest/#namespaced-paths).
`member_id` | integer | yes | The ID of the member.
Example request:
shell
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/:member_id/approve"
```

## Approve all pending group members[](https://docs.gitlab.com/api/group_members/#approve-all-pending-group-members "Permalink")
Approves all pending users for a specified group and its subgroups and projects.
```
POST /groups/:id/members/approve_all
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path of the top-level group](https://docs.gitlab.com/api/rest/#namespaced-paths).
Example request:
shell
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/members/approve_all"
```

## List all pending group members in a group and its subgroups and projects[](https://docs.gitlab.com/api/group_members/#list-all-pending-group-members-in-a-group-and-its-subgroups-and-projects "Permalink")
Lists all members in an `awaiting` state and those who are invited but do not have a GitLab account for a specified group and its subgroups and projects.
Prerequisites:
  * This API endpoint works on top-level groups only. It does not work on subgroups.
  * This API endpoint requires permission to administer members for the group.


This request returns all matching group and project members from all groups and projects in the top-level group’s hierarchy.
When the member is an invited user that has not signed up for a GitLab account yet, the invited email address is returned.
This API endpoint takes [pagination](https://docs.gitlab.com/api/rest/#pagination) parameters `page` and `per_page` to restrict the list of members.
```
GET /groups/:id/pending_members
```

Attribute | Type | Required | Description
---|---|---|---
`id` | integer or string | yes | The ID or [URL-encoded path](https://docs.gitlab.com/api/rest/#namespaced-paths) of the group.
shell
```
curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/pending_members"
```

Example response:
json
```
[
  {
    "id": 168,
    "name": "Alex Garcia",
    "username": "alex_garcia",
    "email": "alex@example.com",
    "avatar_url": "http://example.com/uploads/user/avatar/1/cd8.jpeg",
    "web_url": "http://example.com/alex_garcia",
    "approved": false,
    "invited": false
  },
  {
    "id": 169,
    "email": "sidney@example.com",
    "avatar_url": "http://gravatar.com/../e346561cd8.jpeg",
    "approved": false,
    "invited": true
  },
  {
    "id": 170,
    "email": "zhang@example.com",
    "avatar_url": "http://gravatar.com/../e32131cd8.jpeg",
    "approved": true,
    "invited": true
  }
]
```

Was this page helpful?YesNo
Edit this page
  *     * [ Open in Web IDE`.`Quickly and easily edit multiple files. ](https://gitlab.com/-/ide/project/gitlab-org/gitlab/edit/master/-/doc/api/group_members.md)
    * [ View page sourceEdit this file only. ](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/api/group_members.md)
    * [ Create an issueSuggest improvements. ](https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Documentation)


  * [Known issues](https://docs.gitlab.com/api/group_members/#known-issues)
  * [List all group members](https://docs.gitlab.com/api/group_members/#list-all-group-members)
  * [List all group members, including inherited and invited members](https://docs.gitlab.com/api/group_members/#list-all-group-members-including-inherited-and-invited-members)
  * [Retrieve a group member](https://docs.gitlab.com/api/group_members/#retrieve-a-group-member)
  * [Retrieve a group member, including inherited and invited members](https://docs.gitlab.com/api/group_members/#retrieve-a-group-member-including-inherited-and-invited-members)
  * [List all billable group members](https://docs.gitlab.com/api/group_members/#list-all-billable-group-members)
  * [List all memberships for a billable group member](https://docs.gitlab.com/api/group_members/#list-all-memberships-for-a-billable-group-member)
  * [List all indirect memberships for a billable group member](https://docs.gitlab.com/api/group_members/#list-all-indirect-memberships-for-a-billable-group-member)
  * [Remove a billable group member](https://docs.gitlab.com/api/group_members/#remove-a-billable-group-member)
  * [Change group membership state for a user](https://docs.gitlab.com/api/group_members/#change-group-membership-state-for-a-user)
  * [Add a group member](https://docs.gitlab.com/api/group_members/#add-a-group-member)
  * [Update a group member](https://docs.gitlab.com/api/group_members/#update-a-group-member)
  * [Set override flag for a member of a group](https://docs.gitlab.com/api/group_members/#set-override-flag-for-a-member-of-a-group)
  * [Remove override for a member of a group](https://docs.gitlab.com/api/group_members/#remove-override-for-a-member-of-a-group)
  * [Remove a group member](https://docs.gitlab.com/api/group_members/#remove-a-group-member)
  * [Approve a group member](https://docs.gitlab.com/api/group_members/#approve-a-group-member)
  * [Approve all pending group members](https://docs.gitlab.com/api/group_members/#approve-all-pending-group-members)
  * [List all pending group members in a group and its subgroups and projects](https://docs.gitlab.com/api/group_members/#list-all-pending-group-members-in-a-group-and-its-subgroups-and-projects)


[![GitLab Docs logo](https://docs.gitlab.com/gitlab-logo-footer.svg)](https://docs.gitlab.com/)
  * [Facebook](https://www.facebook.com/gitlab)
  * [LinkedIn](https://www.linkedin.com/company/gitlab-com)
  * [Twitter](https://twitter.com/gitlab)
  * [YouTube](https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg)

[![Creative Commons License](https://docs.gitlab.com/by-sa.svg)](https://creativecommons.org/licenses/by-sa/4.0/)
Company
  * [About GitLab](https://about.gitlab.com/company/)
  * [View pricing](https://about.gitlab.com/pricing/)
  * [Try GitLab for free](https://about.gitlab.com/free-trial/)


Feedback
  * [View page source](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/api/group_members.md)
  * [Edit in Web IDE](https://gitlab.com/-/ide/project/gitlab-org/gitlab/edit/master/-/doc/api/group_members.md)
  * [Contribute to GitLab](https://about.gitlab.com/community/contribute/)
  * [Suggest updates](https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Documentation)


Help & Community
  * [Get certified](https://university.gitlab.com/pages/certifications)
  * [Get support](https://about.gitlab.com/support/)
  * [Post on the GitLab forum](https://forum.gitlab.com/new-topic?title=topic%20title&body=topic%20body&tags=docs-feedback)


Resources
  * [Terms](https://about.gitlab.com/terms/)
  * [Privacy statement](https://about.gitlab.com/privacy/)
  * [Use of generative AI](https://docs.gitlab.com/legal/use_generative_ai/)
  * [Acceptable use of user licenses](https://docs.gitlab.com/legal/licensing_policy/)
  * Cookie Preferences


![](https://cdn.bizible.com/ipv?_biz_r=&_biz_h=800054037&_biz_u=10503924d6784ad3f2d352558587a67a&_biz_l=https%3A%2F%2Fdocs.gitlab.com%2Fapi%2Fgroup_members%2F&_biz_t=1772174284713&_biz_i=Groups%20members%20API%20%7C%20GitLab%20Docs&_biz_n=67&rnd=637874&cdn_o=a&_biz_z=1772174284714)
![Company Logo](https://cdn.cookielaw.org/logos/aa14a5c8-79e3-442a-8177-464ad850b19d/e46c1d0d-1f66-481f-bc06-5427671431da/253e6fee-c4c0-4b60-bc35-79cdae5dda32/gitlab-logo-100.png)
## Privacy Preference Center
## Privacy Preference Center
  * ### Your Privacy
  * ### Strictly Necessary Cookies
  * ### Functionality Cookies
  * ### Performance and Analytics Cookies
  * ### Targeting and Advertising Cookies
  * ### Ad User Data
  * ### Ad Personalization


#### Your Privacy
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
[Cookie Policy](https://about.gitlab.com/privacy/cookies/)
**User ID:** 42fad8d5-ed56-4786-8d74-3c72635252d2
_This User ID will be used as a unique identifier while storing and accessing your preferences for future._
**Timestamp:** --
#### Strictly Necessary Cookies
Always Active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, enabling you to securely log into the site, filling in forms, or using the customer checkout. GitLab processes any personal data collected through these cookies on the basis of our legitimate interest.
Cookies Details
#### Functionality Cookies
Functionality Cookies
These cookies enable helpful but non-essential website functions that improve your website experience. By recognizing you when you return to our website, they may, for example, allow us to personalize our content for you or remember your preferences. If you do not allow these cookies then some or all of these services may not function properly. GitLab processes any personal data collected through these cookies on the basis of your consent
Cookies Details
#### Performance and Analytics Cookies
Performance and Analytics Cookies
These cookies allow us and our third-party service providers to recognize and count the number of visitors on our websites and to see how visitors move around our websites when they are using it. This helps us improve our products and ensures that users can easily find what they need on our websites. These cookies usually generate aggregate statistics that are not associated with an individual. To the extent any personal data is collected through these cookies, GitLab processes that data on the basis of your consent.
Cookies Details
#### Targeting and Advertising Cookies
Targeting and Advertising Cookies
These cookies enable different advertising related functions. They may allow us to record information about your visit to our websites, such as pages visited, links followed, and videos viewed so we can make our websites and the advertising displayed on it more relevant to your interests. They may be set through our website by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant advertisements on other websites. GitLab processes any personal data collected through these cookies on the basis of your consent.
Cookies Details
#### Ad User Data
Ad User Data
Sets consent for sending user data to Google for advertising purposes.
Cookies Details
#### Ad Personalization
Ad Personalization
Sets consent for personalized advertising.
Cookies Details
Back Button
### Cookie List
Filter Button
Consent Leg.Interest
checkbox label label
checkbox label label
checkbox label label
Clear
  * checkbox label label


Apply Cancel
Confirm My Choices
Allow All
[![Powered by Onetrust](https://cdn.cookielaw.org/logos/static/powered_by_logo.svg)](https://www.onetrust.com/products/cookie-consent/)
