List users
admin.organization.users.list(UserListParams**kwargs) -> SyncConversationCursorPage[OrganizationUser]
GET/organization/users
Lists all of the users in the organization.
List users
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
)
page = client.admin.organization.users.list()
page = page.data[0]
print(page.id){
"object": "list",
"data": [
{
"object": "organization.user",
"id": "user_abc",
"name": "First Last",
"email": "user@example.com",
"role": "owner",
"added_at": 1711471533
}
],
"first_id": "user-abc",
"last_id": "user-xyz",
"has_more": false
}
Returns Examples
{
"object": "list",
"data": [
{
"object": "organization.user",
"id": "user_abc",
"name": "First Last",
"email": "user@example.com",
"role": "owner",
"added_at": 1711471533
}
],
"first_id": "user-abc",
"last_id": "user-xyz",
"has_more": false
}