> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a User

> Get a user by ID or fully qualified name

# Retrieve a User

Get a single user by its unique ID or fully qualified name.

## Get by ID

**id** `string` *required*

UUID of the user to retrieve.

**fields** `string`

Comma-separated list of fields to include, for example `teams,roles,personas,domains,follows,owns`.

**include** `string` (default: non-deleted)

Include `all`, `deleted`, or `non-deleted` entities.

## Get by Fully Qualified Name

Use `GET /v1/users/name/{fqn}` to retrieve by fully qualified name.

**fqn** `string` *required*

Fully qualified name of the user, for example `aaron_johnson0`.

**fields** `string`

Comma-separated list of fields to include: `teams`, `roles`, `personas`, `domains`, `follows`, `owns`.

**include** `string` (default: non-deleted)

Include `all`, `deleted`, or `non-deleted` entities.

```python GET /v1/users/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import Users

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# Get by ID
user = Users.retrieve("77655e6e-ad33-49da-bbca-db4ba4d4e2cd")
print(f"{user.fullyQualifiedName.root}: {user.email.root}")

# Get by ID with fields
user = Users.retrieve(
    "77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
    fields=["teams", "roles", "domains"]
)

# Get by fully qualified name
user = Users.retrieve_by_name("aaron_johnson0")

# Get by name with fields
user = Users.retrieve_by_name(
    "aaron_johnson0",
    fields=["teams", "roles", "domains"]
)
```

```java GET /v1/users/{id} theme={null}
// client is an initialized OpenMetadataClient.
var user = client.users().get("77655e6e-ad33-49da-bbca-db4ba4d4e2cd");

// Get by ID with fields
var userWithFields = client.users().get(
    "77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
    "teams,roles,domains");

// Get by fully qualified name
var userByName = client.users().getByName("aaron_johnson0");

// Get by name with fields
var userByNameWithFields = client.users().getByName(
    "aaron_johnson0",
    "teams,roles,domains");
```

```bash GET /v1/users/{id} theme={null}
# Get by ID
curl "{base_url}/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd" \
  -H "Authorization: Bearer {access_token}"

# Get by ID with fields
curl "{base_url}/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd?fields=teams,roles,domains" \
  -H "Authorization: Bearer {access_token}"

# Get by fully qualified name
curl "{base_url}/api/v1/users/name/aaron_johnson0" \
  -H "Authorization: Bearer {access_token}"

# Get by name with fields
curl "{base_url}/api/v1/users/name/aaron_johnson0?fields=teams,roles,domains" \
  -H "Authorization: Bearer {access_token}"
```

```json Response theme={null}
{
  "id": "77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
  "name": "aaron_johnson0",
  "fullyQualifiedName": "aaron_johnson0",
  "displayName": "Aaron Johnson",
  "version": 0.1,
  "updatedAt": 1769982624214,
  "updatedBy": "admin",
  "email": "aaron_johnson0@gmail.com",
  "href": "http://localhost:8585/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
  "isBot": false,
  "isAdmin": false,
  "allowImpersonation": false,
  "teams": [
    {
      "id": "7a2b921b-f623-4eb5-9736-649788ad842c",
      "type": "team",
      "name": "Sales",
      "fullyQualifiedName": "Sales",
      "displayName": "Sales",
      "deleted": false
    }
  ],
  "personas": [],
  "deleted": false,
  "roles": [
    {
      "id": "761c2bb2-0b77-4bc5-9af9-cf89536d6a12",
      "type": "role",
      "name": "DataSteward",
      "fullyQualifiedName": "DataSteward",
      "displayName": "Data Steward",
      "deleted": false
    }
  ],
  "domains": []
}
```

***

## Returns

Returns a user object with all requested fields populated.

## Response

**id** `string`

Unique identifier for the user (UUID format).

**name** `string`

Username.

**fullyQualifiedName** `string`

Fully qualified name (same as `name` for users).

**displayName** `string`

Human-readable display name.

**email** `string`

Email address of the user.

**isBot** `boolean`

Whether this user is a bot account.

**isAdmin** `boolean`

Whether this user has admin privileges.

**teams** `array`

Teams the user belongs to. Only included when `fields` contains `teams`.

**roles** `array`

Roles assigned to the user. Only included when `fields` contains `roles`.

**personas** `array`

Personas assigned. Only included when `fields` contains `personas`.

**domains** `array`

Domain assignments. Only included when `fields` contains `domains`.

**follows** `array`

Entities the user follows. Only included when `fields` contains `follows`.

**owns** `array`

Entities owned by the user. Only included when `fields` contains `owns`.

**version** `number`

Version number for the entity.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to view this user |
| `404` | `NOT_FOUND` | User with given ID or FQN does not exist |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.