Retrieve user
client.admin.organization.users.retrieve(stringuserID, RequestOptionsoptions?): OrganizationUser { id, added_at, object, 13 more }
GET/organization/users/{user_id}
Retrieve user
import OpenAI from 'openai';
const client = new OpenAI({
adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});
const organizationUser = await client.admin.organization.users.retrieve('user_id');
console.log(organizationUser.id);{
"object": "organization.user",
"id": "user_abc",
"name": "First Last",
"email": "user@example.com",
"role": "owner",
"added_at": 1711471533
}
Returns Examples
{
"object": "organization.user",
"id": "user_abc",
"name": "First Last",
"email": "user@example.com",
"role": "owner",
"added_at": 1711471533
}