# Retrieves all administrative users configured in the system

`GET /api/users`

- **Success:** `200 OK`
- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Retrieves all administrative users configured in the system](https://support.gladstonesoftware.cloud/reference/users/retrieves-all-administrative-users-configured-in-the-system)

## Overview

Returns every staff (back-office) user for your tenant — the people who operate the leisure centre, not members or customers. Use it to build a staff picker, to reconcile your own directory against Gladstone's, or to find the `username` you need for the single-user endpoints in this group.

Deleted accounts are filtered out, so this list is the set of usable accounts rather than a full audit trail. There is no paging, filtering or sorting: the whole set comes back in one array, in no guaranteed order.

Each entry uses the same shape as [Retrieves detailed information for a specific administrative user](retrieves-detailed-information-for-a-specific-administrative-user.md), and the same caveat applies — each tenant uses one of two authentication configurations, and several fields are available under only one of them. You can tell which your tenant uses from `roleId`: on **ObjectId-role tenants** it is a 24-character hexadecimal string, and on **numeric-role tenants** it is a number rendered as a string. Where a field is not available for your tenant, it comes back `null` rather than being omitted. The per-field notes below say which.

## Endpoint

`GET {base_url}/api/users`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Sample request

```bash title="cURL"
curl -X GET '{base_url}/api/users' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `[].username` | string | The sign-in name, and the value to put in the path of every single-user endpoint in this group. Unique within the tenant and never reassigned, including after deletion. |
| `[].firstName` | string | The user's given name, as supplied on create or update. |
| `[].lastName` | string | The user's family name, as supplied on create or update. |
| `[].displayName` | string | The name shown to other staff in the back office. Defaults to `"{firstName} {lastName}"` when the account was created or updated without one, so it is rarely null in practice. |
| `[].email` | string | The account's contact address. `null` when the account was created without one. |
| `[].cardId` | string | The identifier on the physical staff card this user presents at a reader or till. `null` when the user has no card. |
| `[].siteGroupId` | string | The site group the user belongs to — a named collection of sites, matching `id` from [Retrieves all site groups with their configuration details](../configuration/retrieves-all-site-groups-with-their-configuration-details.md). On numeric-role tenants, some accounts return the numeric site group identifier rendered as a string instead, which will not match any `id` from that endpoint. |
| `[].preferredSiteId` | string | The site the user works at by default, held as the user preference named `PreferredSiteId` rather than as a field of the account. `null` when that preference has not been set for the user. |
| `[].roleId` | string | The permission role granted to the user, but in one of two different formats depending on how your tenant authenticates: on numeric-role tenants it is the numeric identifier of the user's first assigned role rendered as a string, and on ObjectId-role tenants it is a 24-character hexadecimal ObjectId string. `null` when the user has no role. Do not assume a format — read one back before writing one to [Updates the details and settings for a specific administrative user](updates-the-details-and-settings-for-a-specific-administrative-user.md). |
| `[].avatarId` | string | The profile image shown for the user. Always `null` on numeric-role tenants, which do not save it. |
| `[].dateCreated` | string (date-time) | When the account was created. Accounts with no recorded creation date come back as `0001-01-01T00:00:00`, not `null`, so treat that value as "unknown" rather than a real date. |
| `[].isActive` | boolean | Whether the account may be used. Set to `false` automatically when the account is deleted, and settable directly through [Updates the details and settings for a specific administrative user](updates-the-details-and-settings-for-a-specific-administrative-user.md). |
| `[].isDeleted` | boolean | Whether the account has been deleted. Always `false` in this response — deleted accounts are excluded from the list. Retrieve a single user by username to see a deleted account. |
| `[].isLocked` | boolean | Whether the account is locked out of signing in. Clearing it through the update endpoint also resets `failedLoginAttemptsCount` to `0`. |
| `[].isPasswordResetFlagSet` | boolean | Whether the user is being forced to set a new password at their next sign-in. Set through [Updates a user's password reset flag for account security management](updates-a-users-password-reset-flag-for-account-security-management.md), and cleared automatically when their password is changed on ObjectId-role tenants. |
| `[].lastLoginAttemptDate` | string (date-time) | When a sign-in was last attempted for this account, successful or not. `null` when no attempt has been recorded. |
| `[].failedLoginAttemptsCount` | integer (int32) | Consecutive failed sign-in attempts since the last success. It cannot exceed 255. Reset to `0` when the account is unlocked through the update endpoint. |

## Sample response

```json title="200 OK"
[
  {
    "username": "string",
    "firstName": "string",
    "lastName": "string",
    "displayName": "string",
    "email": "member@example.com",
    "cardId": "string",
    "siteGroupId": "string",
    "preferredSiteId": "string",
    "roleId": "string",
    "avatarId": "string",
    "dateCreated": "2026-08-14T19:00:00Z",
    "isActive": true,
    "isDeleted": true,
    "isLocked": true,
    "isPasswordResetFlagSet": true,
    "lastLoginAttemptDate": "2026-08-14T19:00:00Z",
    "failedLoginAttemptsCount": 1
  }
]
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | Not returned by this endpoint. |
| `500` | Internal server error | Any unexpected server-side failure while reading the user list — for example the tenant's authentication configuration being missing or invalid, or a user whose site group no longer exists. The response has no body. |
