---
type: api
title: Fetch all users
description: Fetches all available users.
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/cloud-enterprise/v3/operation/operation-get-users
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/cloud-enterprise/v3/operation/operation-get-users
products:
  - Elastic Cloud Enterprise
---

# Fetch all users

Authentication: required

## Paths

- `GET` `/users`

## Description

Fetches all available users.

## Query string parameters

- `include_disabled` (boolean · default: false) — optional
  True if disabled users should be included in the response

## Response

Users successfully fetched

`application/json`

- `users` (object[])
  A list of users
  - `user_name` (string)
    The user's identifier
  - `security` (object)
    A user's security information
    - `roles` (string[])
      The set of roles assigned to a user
    - `permissions` (string[])
      The distinct set of permissions allowed by the user's roles. These correspond to operationId values in the OpenAPI definition.
    - `elevated_permissions` (object)
      A user's elevated permissions status
      - `enabled` (boolean)
        True if the user has elevated permissions
      - `expires_at` (string · format: date-time)
        The time at which the user's elevated permissions expire
    - `password` (string)
      The user's password. Only used when modifying a user.
    - `enabled` (boolean)
      True if the user is enabled
    - `security_realm` (object)
      The security realm the user belongs to
      - `type` (enum)
        The type of the security realm
        Values: `native`, `ldap`, `saml`, `active_directory`
      - `id` (string)
        The identifier for the security realm
  - `metadata` (object)
    Metadata for a user
    - `created_by` (string)
      The Id of the user that created this user
    - `created_at` (string · format: date-time)
      The date and time when the user was created
    - `updated_by` (string)
      The Id of the user that last updated this user
    - `updated_at` (string · format: date-time)
      The date and time when the user was last updated
    - `first_login_at` (string · format: date-time)
      The date and time when the user first logged in
    - `last_login_at` (string · format: date-time)
      The date and time when the user last logged in
  - `full_name` (string)
    The user's optional full name
  - `email` (string)
    The user's optional email address
  - `builtin` (boolean)
    True if the user is a built-in read-only user
## Code examples

#### curl

```curl
curl -X GET "${API_URL}/users" \
  -u "${USERNAME}:${PASSWORD}"
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "users": [
    {
      "user_name": "string",
      "security": {
        "roles": [
          "string"
        ],
        "permissions": [
          "string"
        ],
        "elevated_permissions": {
          "enabled": false,
          "expires_at": "string"
        },
        "password": "string",
        "enabled": false,
        "security_realm": {
          "type": "native",
          "id": "string"
        }
      },
      "metadata": {
        "created_by": "string",
        "created_at": "string",
        "updated_by": "string",
        "updated_at": "string",
        "first_login_at": "string",
        "last_login_at": "string"
      },
      "full_name": "string",
      "email": "string",
      "builtin": false
    }
  ]
}
```

