Brex: List users
Brex team.teamListUsers: arguments, response, policy and SDK examples.
← Team operations · Get started
Operation brex.team_listusers
Provider route: GET /v2/users. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/brex with npm, or alter-sdk-brex with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { BrexIntegration } from "@alter-ai/brex";
async function execute(input: Parameters<BrexIntegration["team"]["teamListUsers"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new BrexIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.team.teamListUsers(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_brex import BrexIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = BrexIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.team.team_list_users(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.cursor | JSON | Optional | |
query.cursor (anyOf 1) | string | Alternative | |
query.cursor (anyOf 2) | null | Alternative | |
query.limit | JSON | Optional | |
query.limit (anyOf 1) | integer | Alternative | Format: int32 |
query.limit (anyOf 2) | null | Alternative | |
query.email | JSON | Optional | |
query.email (anyOf 1) | string | Alternative | Currently only support filtering by a single email or a single remote_display_id. |
query.email (anyOf 2) | null | Alternative | |
query.remote_display_id | JSON | Optional | |
query.remote_display_id (anyOf 1) | string | Alternative | Currently only support filtering by a single email or a single remote_display_id. |
query.remote_display_id (anyOf 2) | null | Alternative | |
query.name | JSON | Optional | |
query.name (anyOf 1) | string | Alternative | |
query.name (anyOf 2) | null | Alternative | |
query.email[] | JSON | Optional | |
query.email[] (anyOf 1) | array | Alternative | |
query.email[] (anyOf 1)[] | string | Each item | |
query.email[] (anyOf 2) | null | Alternative | |
query.status[] | JSON | Optional | |
query.status[] (anyOf 1) | array | Alternative | |
query.status[] (anyOf 1)[] | string | Each item | One of: INVITED, ACTIVE, DISABLED, PENDING_ACTIVATION, INACTIVE, ARCHIVED |
query.status[] (anyOf 2) | null | Alternative | |
query.manager_id[] | JSON | Optional | |
query.manager_id[] (anyOf 1) | array | Alternative | |
query.manager_id[] (anyOf 1)[] | string | Each item | |
query.manager_id[] (anyOf 2) | null | Alternative | |
query.department_id[] | JSON | Optional | |
query.department_id[] (anyOf 1) | array | Alternative | |
query.department_id[] (anyOf 1)[] | string | Each item | |
query.department_id[] (anyOf 2) | null | Alternative | |
query.location_id[] | JSON | Optional | |
query.location_id[] (anyOf 1) | array | Alternative | |
query.location_id[] (anyOf 1)[] | string | Each item | |
query.location_id[] (anyOf 2) | null | Alternative | |
query.title_id[] | JSON | Optional | |
query.title_id[] (anyOf 1) | array | Alternative | |
query.title_id[] (anyOf 1)[] | string | Each item | |
query.title_id[] (anyOf 2) | null | Alternative | |
query.cost_center_id[] | JSON | Optional | |
query.cost_center_id[] (anyOf 1) | array | Alternative | |
query.cost_center_id[] (anyOf 1)[] | string | Each item | |
query.cost_center_id[] (anyOf 2) | null | Alternative | |
query.legal_entity_id[] | JSON | Optional | |
query.legal_entity_id[] (anyOf 1) | array | Alternative | |
query.legal_entity_id[] (anyOf 1)[] | string | Each item | |
query.legal_entity_id[] (anyOf 2) | null | Alternative | |
query.load_custom_fields | JSON | Optional | |
query.load_custom_fields (anyOf 1) | boolean | Alternative | |
query.load_custom_fields (anyOf 2) | null | Alternative | |
query.custom_field[] | JSON | Optional | |
query.custom_field[] (anyOf 1) | array | Alternative | |
query.custom_field[] (anyOf 1)[] | string | Each item | |
query.custom_field[] (anyOf 2) | null | Alternative |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand List users — response body |
Referenced models: List users — response body
Schemas
Section titled “Schemas”21 more schemas are linked from the tables above, on the schema pages.
List users — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
items | array | Required within parent | |
items[] | Model | Each item | Expand Get user — response body |
next_cursor | JSON | Optional | |
next_cursor (anyOf 1) | string | Alternative | |
next_cursor (anyOf 2) | null | Alternative |
Referenced models: Get user — response body
Get user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
cost_center_id | JSON | Optional | |
cost_center_id (anyOf 1) | string | Alternative | |
cost_center_id (anyOf 2) | null | Alternative | |
custom_fields | JSON | Optional | |
custom_fields (anyOf 1) | array | Alternative | A list of custom field values associated with the user. |
custom_fields (anyOf 1)[] | Model | Each item | Expand Get user — response body — custom fields array item |
custom_fields (anyOf 2) | null | Alternative | |
department_id | JSON | Optional | |
department_id (anyOf 1) | string | Alternative | |
department_id (anyOf 2) | null | Alternative | |
email | string | Required within parent | Email address of the user |
first_name | string | Required within parent | First name of the user |
id | string | Required within parent | |
last_name | string | Required within parent | Last name of the user |
legal_entity_id | JSON | Optional | |
legal_entity_id (anyOf 1) | string | Alternative | |
legal_entity_id (anyOf 2) | null | Alternative | |
location_id | JSON | Optional | |
location_id (anyOf 1) | string | Alternative | |
location_id (anyOf 2) | null | Alternative | |
manager_id | JSON | Optional | |
manager_id (anyOf 1) | string | Alternative | The user id of the manager of this user |
manager_id (anyOf 2) | null | Alternative | |
metadata | JSON | Optional | |
metadata (anyOf 1) | object | Alternative | The metadata or customized attributes of the user. Maximum number of entries: 100 Additional keys: see wildcard field |
metadata (anyOf 1).* | string | Additional keys | |
metadata (anyOf 2) | null | Alternative | |
remote_display_id | JSON | Optional | |
remote_display_id (anyOf 1) | string | Alternative | Identifier that is displayed on the IDP or HR system, eg, if OKTA identifies you as user xyz |
remote_display_id (anyOf 2) | null | Alternative | |
role_name | JSON | Optional | |
role_name (anyOf 1) | string | Alternative | The user's role, as shown in the Brex dashboard. |
role_name (anyOf 2) | null | Alternative | |
status | JSON | Optional | |
status (anyOf 1) | JSON | Alternative | |
status (anyOf 1) (allOf 1) | string | All variants apply | Status of the user Known values: INVITED, ACTIVE, DISABLED, PENDING_ACTIVATION, INACTIVE, ARCHIVED |
status (anyOf 2) | null | Alternative | |
title_id | JSON | Optional | |
title_id (anyOf 1) | string | Alternative | |
title_id (anyOf 2) | null | Alternative |
Referenced models: Get user — response body — custom fields array item
Get user — response body — custom fields array item
Referenced models: Get user — response body — custom fields array item value The value of the custom field Boolean list value, Get user — response body — custom fields array item value The value of the custom field Boolean value, Get user — response body — custom fields array item value Base class for custom field values, Get user — response body — custom fields array item value The value of the custom field Date list value, Get user — response body — custom fields array item value The value of the custom field Date value, Get user — response body — custom fields array item value The value of the custom field Decimal list value, Get user — response body — custom fields array item value The value of the custom field Decimal value, Get user — response body — custom fields array item value The value of the custom field Enum list value, Get user — response body — custom fields array item value The value of the custom field Enum value, Get user — response body — custom fields array item value The value of the custom field Money list value, Get user — response body — custom fields array item value The value of the custom field Money value, Get user — response body — custom fields array item value The value of the custom field Option string list value, Get user — response body — custom fields array item value The value of the custom field Option string value, Get user — response body — custom fields array item value The value of the custom field String list value, Get user — response body — custom fields array item value The value of the custom field String value, Get user — response body — custom fields array item value The value of the custom field Timestamp list value, Get user — response body — custom fields array item value The value of the custom field Timestamp value
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: brex.team_listusers. Catalog operation: team:listUsers. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["users", "users.readonly"]