Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Retrieve group

admin.organization.groups.retrieve(group_id) -> Group
GET
/organization/groups/{group_id}

Retrieves a group.

Parameters
group_id: str
Returns
class Group: …

Details about an organization group.

id: str

Identifier for the group.

created_at: int

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

formatunixtime
group_type: Literal["group", "tenant_group"]

The type of the group.

is_scim_managed: bool

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

name: str

Display name of the group.

Retrieve group

import os
from openai import OpenAI

client = OpenAI(
    admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"),  # This is the default and can be omitted
)
group = client.admin.organization.groups.retrieve(
    "group_id",
)
print(group.id)
Response example
{
    "id": "group_01J1F8ABCDXYZ",
    "name": "Support Team",
    "created_at": 1711471533,
    "is_scim_managed": false,
    "group_type": "group"
}
Returns Examples
Response example
{
    "id": "group_01J1F8ABCDXYZ",
    "name": "Support Team",
    "created_at": 1711471533,
    "is_scim_managed": false,
    "group_type": "group"
}