---
title: Get a user
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Zero Trust](https://developers.cloudflare.com/api/typescript/resources/zero_trust)

[Access](https://developers.cloudflare.com/api/typescript/resources/zero_trust/subresources/access)

[Users](https://developers.cloudflare.com/api/typescript/resources/zero_trust/subresources/access/subresources/users)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get a user

client.zeroTrust.access.users.get(stringuserID, UserGetParams {account\_id } params, RequestOptionsoptions?): [UserGetResponse](<https://developers.cloudflare.com/api/typescript/resources/zero_trust#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)>) {id, access\_seat, active\_device\_count, 8 more }

GET/accounts/{account\_id}/access/users/{user\_id}

Gets a specific user for an account.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Access: Audit Logs Read`

##### ParametersExpand Collapse

userID: string

UUID.

maxLength36

[Link to this property](<#(resource)%20zero_trust.access.users%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20user_id%20%3E%20(schema)>)

<details>

<summary>

params: UserGetParams {account\_id }

</summary>

account\_id: string

Identifier.

maxLength32

<a href="#(resource)%20zero_trust.access.users%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.access.users%20%3E%20(method)%20get%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

UserGetResponse {id, access\_seat, active\_device\_count, 8 more }

</summary>

id?: string

UUID.

maxLength36

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

access\_seat?: boolean

True if the user has authenticated with Cloudflare Access.

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20access_seat">Link to this property</a>

active\_device\_count?: number

The number of active devices registered to the user.

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20active_device_count">Link to this property</a>

created\_at?: string

formatdate-time

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

email?: string

The email of the user.

formatemail

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20email">Link to this property</a>

gateway\_seat?: boolean

True if the user has logged into the WARP client.

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20gateway_seat">Link to this property</a>

last\_successful\_login?: string

The time at which the user last successfully logged in.

formatdate-time

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20last_successful_login">Link to this property</a>

name?: string

The name of the user.

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

seat\_uid?: string

The unique API identifier for the Zero Trust seat.

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20seat_uid">Link to this property</a>

uid?: string

The unique API identifier for the user.

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20uid">Link to this property</a>

updated\_at?: string

formatdate-time

<a href="#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.access.users%20%3E%20(model)%20user_get_response%20%3E%20(schema)>)

### Get a user

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const user = await client.zeroTrust.access.users.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', {
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(user.id);
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "access_seat": false,
    "active_device_count": 2,
    "created_at": "2014-01-01T05:20:00.12345Z",
    "email": "jdoe@example.com",
    "gateway_seat": false,
    "last_successful_login": "2020-07-01T05:20:00Z",
    "name": "Jane Doe",
    "seat_uid": "seat_uid",
    "uid": "uid",
    "updated_at": "2014-01-01T05:20:00.12345Z"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "access_seat": false,
    "active_device_count": 2,
    "created_at": "2014-01-01T05:20:00.12345Z",
    "email": "jdoe@example.com",
    "gateway_seat": false,
    "last_successful_login": "2020-07-01T05:20:00Z",
    "name": "Jane Doe",
    "seat_uid": "seat_uid",
    "uid": "uid",
    "updated_at": "2014-01-01T05:20:00.12345Z"
  }
}
```