List identities in Account
/portal/v1/accounts/{accountSlug}/identitiesPaginated listing of the Account's end-user identity directory, spanning every Environment in the Account rather than one App/Environment. Supports a free-text q search and filters for status, has_any_assignment, environment_id, and not_in_env (used by the add-from-directory picker to exclude identities already in a given Environment); sort accepts name, email, or created, defaulting to first_name ASC. Includes SSO/SCIM-provisioned, invited-but-unaccepted, and orphaned (zero-membership) identities.
Authentication
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
identities.viewIdentitiesView end-user identities across the account. Granted through an administrator role in the Admin Workspace; a valid token without it is refused with 403.
Query Parameters
pagenumber Optional Page number (1-based)
takenumber Optional Items per page (1-100, default 20)
qstring Optional Search term
sort_bystring Optional Column to sort by. Allowed values depend on the endpoint.
orderenum Optional Sort direction
statusenum Optional Filter by the Account-wide `is_active` flag. Omit to show all.
has_any_assignmentboolean Optional When true, only identities with at least one role assignment somewhere in the Account. When false, only identities with zero assignments (the orphan filter — surfaces identities that exist in the directory but haven't been given access anywhere). Omit to show all.
not_in_envstring Optional Exclude identities that already have an active EnvironmentMembership for the given Environment id. Drives the 'Add from directory' picker — the candidate list should only contain identities NOT already in the target Environment.
environment_idstring Optional Filter the directory by Environment. Pass an Environment id to show only identities with an active membership there, or the literal `none` to show directory-only identities (no membership anywhere). Omit to show all.
Responses
application/json
items *AccountIdentityRowDto[]pagination *PageMetaDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Errors
When the request can't be completed, the response body includes a stable error code you can branch on.
account.capability_requiredForbiddenThe signed-in user's administrator roles do not grant the capability this endpoint requires.
Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.
Pagination
This endpoint returns a paginated collection. Use the query parameters below to page through results.
pagenumberPage number (1-indexed). Defaults to 1.
takenumberItems per page (1–100). Defaults to 20.
Each response includes an items array alongside a pagination object with item_count, page_count, has_previous_page, and has_next_page fields.
Returned object
curl -X GET "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/identities?page=0&take=0&q=value&sort_by=value&order=asc&status=active&has_any_assignment=false¬_in_env=value&environment_id=value" \ -H "Authorization: Bearer $CANOPY_TOKEN"
{ "items": [ { "id": "string", "email": "string", "first_name": "string", "last_name": "string", "avatar_url": "string", "external_id": "string", "is_active": false, "email_verified": false, "environment_membership_count": 0, "total_assignments": 0, "created_at": "2026-04-20T12:00:00.000Z" } ], "pagination": { "page": 0, "take": 0, "item_count": 0, "page_count": 0, "has_previous_page": false, "has_next_page": false } }
Tell us how we can improve this guide.