Skip to content
Primary navigation

Retrieve group

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

Retrieves a group.

ParametersExpand Collapse
group_id: str
ReturnsExpand Collapse
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.

One of the following:
"group"
"tenant_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)
{
    "id": "group_01J1F8ABCDXYZ",
    "name": "Support Team",
    "created_at": 1711471533,
    "is_scim_managed": false,
    "group_type": "group"
}
Returns Examples
{
    "id": "group_01J1F8ABCDXYZ",
    "name": "Support Team",
    "created_at": 1711471533,
    "is_scim_managed": false,
    "group_type": "group"
}