---
title: "POST /admin/oidc/providers"
method: POST
path: "/admin/oidc/providers"
tags: ["Authentication"]
---

# POST /admin/oidc/providers

`POST /admin/oidc/providers`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/admin/oidc/providers`
- Auth: HTTP bearer

## Request body

- CreateOidcProviderRequest
  - `client_id` string, required
  - `client_secret` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
  - `default_role` string
  - `enabled` boolean
  - `group_claim` string
  - `issuer_url` string, required
  - `jit_provisioning` boolean
  - `name` string, required
  - `role_claim` string
  - `scopes` string
  - `template` string
  - `trust_idp_email` boolean: Defaults false. Set to true only for IdPs where an admin controls user provisioning (corporate Okta, Azure AD) and self-signup of arbitrary emails is not possible — see the `trust_idp_email` field on `oidc_providers::Model` for the security tradeoff this enables.

## Response `201`

OIDC provider created

- OidcProviderResponse
  - `client_id` string, required
  - `client_secret` string, required: Always masked — the secret is never returned after creation.
  - `default_role` string, required
  - `enabled` boolean, required
  - `group_claim` string, required
  - `id` integer, required
  - `issuer_url` string, required
  - `jit_provisioning` boolean, required
  - `managed_by_cloud` boolean, required: ADR-045 §4: true only for the provider Temps Cloud provisions for console access. The admin UI should disable edit/delete controls for such a row — the API itself refuses those requests regardless (`OidcError::ManagedByCloudEdit`/`ManagedByCloudDelete`).
  - `name` string, required
  - `role_claim` string, required
  - `scopes` string, required
  - `template` string, required
  - `trust_idp_email` boolean, required: When true, the resolver skips the `email_verified` claim gate during SSO login. Only safe for IdPs where an admin controls user provisioning — see `oidc_providers::Model::trust_idp_email`.

## Other responses

- `409`: Another OIDC provider already uses that name

## Changes

- **2026-10-23** `7d41b820a372`: 1 breaking
  - the `client_secret` request property format changed from no format to `password`
- **2026-10-23** `24af93ff5379`: 1 info
  - the `client_secret` request property format was generalized from `password` to no format
- **2026-10-22** `842d42ed4659`: 1 breaking
  - the `client_secret` request property format changed from no format to `password`
- **2026-10-22** `1a12a50b75ee`: 1 info
  - the `client_secret` request property format was generalized from `password` to no format
- **2026-10-21** `79089e9f49ee`: 1 breaking
  - the `client_secret` request property format changed from no format to `password`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/admin/oidc/providers/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
