
# tdx sso-providers

Inspect SSO (OIDC sign-in) providers.

SSO providers are the OIDC identity providers people sign in through, configured in the file TOKEDEX_OIDC_PROVIDERS_FILE names; they are unrelated to the provider credentials that providers keys manages. list and check work with a bearer holding install-wide identity.read. test-result is dashboard-only: results belong to the dashboard session that ran the SSO test. SSO providers are configured in the SSO providers file (TOKEDEX_OIDC_PROVIDERS_FILE), not through this CLI.

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 sso-providers list](/cli/reference/sso-providers#tdx-sso-providers-list) | List SSO providers and their discovery status. | Read |
| [tdx sso-providers check](/cli/reference/sso-providers#tdx-sso-providers-check) | Make the gateway rediscover an SSO provider now. | Write |
| [tdx sso-providers test-result](/cli/reference/sso-providers#tdx-sso-providers-test-result) | Read an SSO test result (dashboard only). | Dashboard only |

## tdx sso-providers list

List SSO providers and their discovery status.

**Reads**

Requires install-wide identity.read. Read every SSO provider the SSO providers file (TOKEDEX_OIDC_PROVIDERS_FILE) configures, with its discovery status. The client secret is never sent. --dry-run still performs this read. SSO providers are the OIDC identity providers people sign in through, configured in the file TOKEDEX_OIDC_PROVIDERS_FILE names; they are unrelated to the provider credentials that providers keys manages. discovery.reason is the gateway's free error text from its last identity-provider fetch, or why discovery is disabled: untrusted, and masked like any string; a reason that is empty, longer than 4096 UTF-16 code units, contains C0/DEL/C1 controls (U+0000–001F, U+007F–009F), bidi marks (U+061C, U+200E, U+200F), embeddings/overrides (U+202A–202E), isolates (U+2066–2069) or echoes the bearer prints as █ without refusing the reply in human and JSON output. Other provider text with those controls or bidi characters is invalid: list refuses it with INVALID_RESPONSE; check reports CHANGE_APPLIED_RESPONSE_INVALID after the gateway accepted the write. Printable neighbors and ordinary multilingual text remain valid. Public configuration names such as TOKEDEX_PUBLIC_URL remain visible; registered credential prefixes still trigger masking. See [Masked read output](/cli/reference#masked-read-output), [Sign-in settings output](/cli/reference#sign-in-settings-output) and [Checked request values](/cli/reference#checked-request-values).

```bash
# GET /control/v1/sso-providers
tdx sso-providers list [flags]
```

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

| Field | Type | Description |
|---|---|---|
| `ssoProviders` | public-sso-provider[] | Each SSO provider's id, displayName, source, issuerHost, redirectUri, enabled, jit, authoritative, allowedEmailDomains, sync, trustedClaims and discovery (state, with checkedAt, retryAt and reason where the gateway sends them); never a client secret. |

## tdx sso-providers check

Make the gateway rediscover an SSO provider now.

**Writes**

Requires install-wide identity.read. The gateway fetches this SSO provider's OIDC discovery document now, ignoring its retry backoff: an outbound request from the gateway to the identity provider, so this is classified as a write and jq filters are preflighted before dispatch. A completed failing discovery is reported in discovery, not as an error; an unknown id is not found. The gateway waits up to 5 seconds for the identity provider. This command allows a bounded 6-second whole request, including reading the reply, to leave time for that fetch and response overhead; ordinary reads retain their 3-second limit. If the deadline expires before response headers are received, check fails with REQUEST_TIMEOUT (exit 7, outcome unknown): the gateway may still record the result. If success headers were received but the reply body stalls past the deadline, check fails with CHANGE_APPLIED_RESPONSE_INVALID (exit 1): the gateway accepted the change, but its reply could not be read safely. In either case, inspect it afterwards with sso-providers list before repeating the check. No automatic retry is made. Dry-run reads no profile or credential, sends no request and creates no files; the gateway has not checked its preview. SSO providers are the OIDC identity providers people sign in through, configured in the file TOKEDEX_OIDC_PROVIDERS_FILE names; they are unrelated to the provider credentials that providers keys manages. discovery.reason is the gateway's free error text from its last identity-provider fetch, or why discovery is disabled: untrusted, and masked like any string; a reason that is empty, longer than 4096 UTF-16 code units, contains C0/DEL/C1 controls (U+0000–001F, U+007F–009F), bidi marks (U+061C, U+200E, U+200F), embeddings/overrides (U+202A–202E), isolates (U+2066–2069) or echoes the bearer prints as █ without refusing the reply in human and JSON output. Other provider text with those controls or bidi characters is invalid: list refuses it with INVALID_RESPONSE; check reports CHANGE_APPLIED_RESPONSE_INVALID after the gateway accepted the write. Printable neighbors and ordinary multilingual text remain valid. Public configuration names such as TOKEDEX_PUBLIC_URL remain visible; registered credential prefixes still trigger masking. See [Checked request values](/cli/reference#checked-request-values), [Masked write output](/cli/reference#masked-write-output) and [Sign-in settings output](/cli/reference#sign-in-settings-output).

```bash
# POST /control/v1/sso-providers/:providerId/check
tdx sso-providers check --id <string> [flags]
```

**Required flags**

| Flag | Type | Default | Description |
|---|---|---|---|
| `--id` | string |  | SSO provider id from sso-providers list; never a credential. |

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

| Field | Type | Description |
|---|---|---|
| `ssoProvider` | public-sso-provider | The checked SSO provider's id, displayName, source, issuerHost, redirectUri, enabled, jit, authoritative, allowedEmailDomains, sync, trustedClaims and discovery (state, with checkedAt, retryAt and reason where the gateway sends them); never a client secret. |
| `preview` | write-preview\|null | Requested check, unchecked by the gateway; null after execution. |

## tdx sso-providers test-result

Read an SSO test result (dashboard only).

**Dashboard only.** The gateway serves this only to a signed-in dashboard session, so the CLI refuses it with `SESSION_REQUIRED`.

Unavailable to this bearer-only CLI: GET /control/v1/sso-providers/test-results/:resultId is session-bound: a test result belongs to the interactive dashboard session that ran the SSO test. The route admits bearers with install-wide identity.read, but the gateway answers not found to every other caller, so a bearer can never read a result; this command is session-only. Use the gateway dashboard. --dry-run also refuses: there is no reachable change to preview. No request is sent and no credential, profile or file is read.

```bash
# GET /control/v1/sso-providers/test-results/:resultId
tdx sso-providers test-result --id <string> [flags]
```

**Required flags**

| Flag | Type | Default | Description |
|---|---|---|---|
| `--id` | string |  | Public resource id; never a credential. |
