
# tdx sessions

Inspect sessions; interactive revocation is unavailable.

List a named person's sessions with --user-id and install-wide users.read. Own-session listing and every revocation route require an interactive dashboard session and are unavailable in this bearer-only CLI; use the dashboard. Unavailable commands refuse before requests or profile reads; write dry-runs only preview the selected route.

Every command also takes the [global flags](/cli/reference#global-flags) and reads the [environment variables](/cli/reference#environment-variables) that the command reference lists once.

## Commands

| Command | Description | Type |
|---|---|---|
| [tdx sessions list](/cli/reference/sessions#tdx-sessions-list) | List a person's sessions, or explain own-session unavailability. | Read |
| [tdx sessions revoke](/cli/reference/sessions#tdx-sessions-revoke) | Unavailable: session revocation requires an interactive session. | Not available yet |

## tdx sessions list

List a person's sessions, or explain own-session unavailability.

**Reads**

With --user-id, GET /users/:userId/sessions is bearer-reachable with install-wide users.read. Without it, GET /sessions is session-only and unavailable; no request, authentication or profile read is attempted. Reads with --dry-run still perform the same authorized GET. See [People and role commands](/cli/reference#people-and-role-commands).

```bash
# GET /control/v1/users/:userId/sessions
tdx sessions list [flags]
```

**Optional flags**

| Flag | Type | Default | Description |
|---|---|---|---|
| `--user-id` | string |  | Person id; requires install-wide users.read. |

**Output fields** (inside `data`)

| Field | Type | Description |
|---|---|---|
| `sessions` | masked-route-data | Gateway data after mandatory CLI masking; █ marks masked values. |
| `notice` | string | Present instead of data when masking withholds the entire result. |

## tdx sessions revoke

Unavailable: session revocation requires an interactive session.

**Not available yet.** Running it exits 7 with `NOT_IMPLEMENTED`.

All session revocation routes are session-only; another person's sessions also require install users.manage and step-up. This bearer-only CLI refuses without authentication, requests or profile reads. Use the dashboard. Dry-run shows the selected DELETE route only, without dispatch. See [People and role commands](/cli/reference#people-and-role-commands).

```bash
# DELETE /control/v1/sessions
# DELETE /control/v1/sessions/:sessionId
# DELETE /control/v1/users/:userId/sessions
# DELETE /control/v1/users/:userId/sessions/:sessionId
tdx sessions revoke [flags]
```

**Optional flags**

| Flag | Type | Default | Description |
|---|---|---|---|
| `--user-id` | string |  | Person whose sessions would be revoked; omitted means your own. |
| `--id` | string |  | Public session id; never a credential. |
| `--all` | boolean | `false` | All sessions of the person, or all your OTHER sessions when no user-id. |

**Constraints**

- Exactly one of `--id`, `--all`

**Output fields** (inside `data`)

| Field | Type | Description |
|---|---|---|
| `preview` | write-preview\|null | Requested method, path and body only, with no diff and unchecked by the gateway; null after execution. |
| `notice` | string | Present instead of data when masking withholds the entire result. |
