Skip to content
Primary navigation

List groups

$ openai admin:organization:groups list
GET/organization/groups

Lists all groups in the organization.

ParametersExpand Collapse
--after: optional string

A cursor for use in pagination. after is a group ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with group_abc, your subsequent call can include after=group_abc in order to fetch the next page of the list.

--limit: optional number

A limit on the number of groups to be returned. Limit can range between 0 and 1000, and the default is 100.

--order: optional "asc" or "desc"

Specifies the sort order of the returned groups.

ReturnsExpand Collapse
GroupListResource: object { data, has_more, next, object }

Paginated list of organization groups.

data: array of Group { id, created_at, group_type, 2 more }

Groups returned in the current page.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

group_type: "group" or "tenant_group"

The type of the group.

"group"
"tenant_group"
is_scim_managed: boolean

Whether the group is managed through SCIM and controlled by your identity provider.

name: string

Display name of the group.

has_more: boolean

Whether additional groups are available when paginating.

object: "list"

Always list.

List groups

openai admin:organization:groups list \
  --admin-api-key 'My Admin API Key'
{
    "object": "list",
    "data": [
        {
            "object": "group",
            "id": "group_01J1F8ABCDXYZ",
            "name": "Support Team",
            "created_at": 1711471533,
            "is_scim_managed": false
        }
    ],
    "has_more": false,
    "next": null
}
Returns Examples
{
    "object": "list",
    "data": [
        {
            "object": "group",
            "id": "group_01J1F8ABCDXYZ",
            "name": "Support Team",
            "created_at": 1711471533,
            "is_scim_managed": false
        }
    ],
    "has_more": false,
    "next": null
}