List user organization role assignments
GET
/organization/users/{user_id}/rolesLists the organization roles assigned to a user within the organization.
List user organization role assignments
curl https://api.openai.com/v1/organization/users/user_abc123/roles \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
Response example
{
"object": "list",
"data": [
{
"id": "role_01J1F8ROLE01",
"name": "API Group Manager",
"permissions": [
"api.groups.read",
"api.groups.write"
],
"resource_type": "api.organization",
"predefined_role": false,
"description": "Allows managing organization groups",
"created_at": 1711471533,
"updated_at": 1711472599,
"created_by": "user_abc123",
"created_by_user_obj": {
"id": "user_abc123",
"name": "Ada Lovelace",
"email": "ada@example.com"
},
"metadata": {},
"assignment_sources": [
{
"principal_id": "user_abc123",
"principal_type": "user"
}
]
}
],
"has_more": false,
"next": null
}
Query Parameters
Returns Examples
Response example
{
"object": "list",
"data": [
{
"id": "role_01J1F8ROLE01",
"name": "API Group Manager",
"permissions": [
"api.groups.read",
"api.groups.write"
],
"resource_type": "api.organization",
"predefined_role": false,
"description": "Allows managing organization groups",
"created_at": 1711471533,
"updated_at": 1711472599,
"created_by": "user_abc123",
"created_by_user_obj": {
"id": "user_abc123",
"name": "Ada Lovelace",
"email": "ada@example.com"
},
"metadata": {},
"assignment_sources": [
{
"principal_id": "user_abc123",
"principal_type": "user"
}
]
}
],
"has_more": false,
"next": null
}