---
title: "List the groups of a principal"
method: GET
path: "/v2/directories/{directoryId}/principals/{principalId}/groups"
tags: ["KongPrincipal"]
---

# List the groups of a principal

`GET /v2/directories/{directoryId}/principals/{principalId}/groups`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v2/directories/{directoryId}/principals/{principalId}/groups`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Retrieves a paginated list of every group the principal belongs to, of any type, including memberships inherited through nested teams. Results are ordered by when the membership was created, oldest first.

## Path parameters

- `directoryId` string, uuid, required
- `principalId` string, uuid, required

## Query parameters

- `page` CursorPageParameters
  - `size` integer: The number of items included per page.
  - `after` string: Cursor param specifying the page (i.e. the next page) of data returned.
  - `before` string: Cursor param specifying the page (i.e. the previous page) of data returned.

## Response `200`

List of the groups of a principal

- ListKongPrincipalGroups: A paginated list of the groups a principal belongs to.
  - `meta` CursorMeta, required: Pagination metadata.
    - `page` CursorMetaPage, required
      - `first` string, path: URI to the first page
      - `last` string, path: URI to the last page
      - `next` string, path, nullable, required: URI to the next page
      - `previous` string, path, nullable, required: URI to the previous page
      - `size` number, required: Requested page size
  - `data` KongPrincipalGroup[], required
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `name` string, required: Name of the group.
    - `type` 'group' | 'team', nullable, required: Classifies the kind of group. `group` is the default policy-attachment point for access across principals. `team` is a node of the organization chart: its members are principals of type `user` and other `team` groups, and it may carry an `owner` custom identity referencing a principal of type `user`. When omitted or null, the group is a `group`.
    - `direct` boolean, required: `true` when the principal was added to the group directly, `false` when the membership is inherited through a nested team.
    - `provisioned_by` 'konnect_user' | 'developer_portal' | 'trusted_idp', required: Identifies the actor that provisioned this principal. Defaults to `konnect_user` for principals created directly by a user; other values identify a service that provisioned the principal on a user's behalf (for example, `developer_portal` or `trusted_idp`).
    - `team_manager` KongTeamManager, nullable, required: The manager of a team, set through the team's `team_manager` custom identity. Always null for plain groups, and for teams without a manager.
      - `id` string, uuid, required: Contains a unique identifier used for this resource.
      - `display_name` string, required: Display name of the manager.
      - `email` string, nullable, required: Value of the manager's `email` custom identity, or null when the manager has none.
    - `membership_id` string, uuid, nullable, required: ID of the principal's direct membership in this group, for `deleteGroupMembershipEntry`. Null when the membership is inherited through a nested team. Team membership is importer-managed, so `deleteGroupMembershipEntry` rejects a direct team membership with 400.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

## Changes

- **2026-11-03** `72599e2b1b09`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v2/directories/:directoryId/principals/:principalId/groups/get.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
