> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Get a user by user ID

Use this example to retrieve a user's details by user ID with a raw Administration API request.

Before you begin, [authenticate the Admin API application](/api/admin-api/rest-examples/authentication/authenticate-admin-application.md) and obtain an auth token.

The Admin API application requires the `USERS:VIEW` permission. Submit a request to retrieve a user by user ID or user alias.

- **Method:** `POST`
- **Path:** `/api/web/v3/users/userid`
- **Content type:** `application/json`

## Example request header

```text
Authorization: Bearer <auth-token>
```

## Example request body

The body must contain `userId`:

```json
{
  "userId": "john"
}
```

## Example response body

HTTP `200` returns the user's details. Fields that are not relevant to the example are omitted:

```json
{
  "id": "2c422a2f-e8ae-4af8-8b03-e1ce0ddde0b0",
  "userId": "john",
  "firstName": "John",
  "lastName": "Smith",
  "email": "johnsmith@organization.com",
  "mobile": "+16138561234",
  "state": "ACTIVE",
  "locked": false,
  "grids": [],
  "tokens": [],
  "groups": []
}
```

The returned collections depend on the resources assigned to the user. For all response fields and error responses, including a user that is not found, see [Get a user by user ID or alias](/api/openapi/admin-api/user-by-userid-using-post.md).
