Skip to content

List all users (auditor-only)

GET
/api/admin/users
curl --request GET \
--url 'https://example.com/api/admin/users?limit=25&q=alice&status=active' \
--header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'

Returns a paginated list of users, searchable by name, username, email, or subject, and filterable by account state. Useful for user directory and audit. Ordered by name ignoring case (users with no name last, by username), then username, then id. Uses cursor-based pagination (not offset): pass the previous page’s next_cursor as after.

after
string

User ID to start after (cursor): the previous page’s next_cursor

limit
integer

Page size (default 25, max 100)

Example

25
q
string

Search term matched against name, username, email, and subject

Example

alice
status
string
Allowed values: active disabled

Account state filter: active or disabled; omitted returns both

User list

Media typeapplication/json
object
next_cursor

NextCursor is the after for the following page: the id of this page’s last user, absent on the last page.

string
total
required

Total is how many users match the search and state filter, across all pages.

integer
users
required
Array<object>
object
created_at
required

CreatedAt is when the user first authenticated.

string
disabled_at

DisabledAt is when an admin disabled this user. Omitted (null) if not disabled.

string
disabled_by_username

DisabledByUsername is the username of the admin that disabled this user. Only populated when DisabledAt is non-null.

string
email
required

Email is the user’s email from OIDC, possibly empty or changed at login.

string
id
required

ID is the stable user identifier.

string
name
required

Name is the person’s human-readable name, so a list of usernames can be scanned by someone who thinks in names. Display only, and empty when nothing supplied one.

string
subject
required

Subject is the unique account identifier (authentication.fields.subject, “sub” by default) — the one field here that is stable across logins.

string
updated_at
required

UpdatedAt is when the user’s identity was last refreshed at login.

string
username
required

Username is the OIDC claim username, possibly changed at each login.

string

Example generated

{
"next_cursor": "example",
"total": 1,
"users": [
{
"created_at": "example",
"disabled_at": "example",
"disabled_by_username": "example",
"email": "example",
"id": "example",
"name": "example",
"subject": "example",
"updated_at": "example",
"username": "example"
}
]
}

Invalid paging/search parameters, an after that names no user, or offset

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Not authenticated

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Not authorized as auditor

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}