---
title: "Discover OIDC configuration"
method: POST
path: "/identity-providers/discover-oidc"
tags: ["Identity Providers"]
---

# Discover OIDC configuration

`POST /identity-providers/discover-oidc`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/identity-providers/discover-oidc`
- Auth: API key in header `API-Key`

Fetches and parses the `/.well-known/openid-configuration` document for an OIDC issuer. Use the returned endpoints to populate `config.oidc` when creating a custom OIDC provider.

Required scope: `identity-providers:read`

## Headers

- `API-Version` '2026-06-01.beta', required

## Request body

- DiscoverOIDCRequest
  - `issuer_url` string, required: OIDC issuer URL. The `/.well-known/openid-configuration` suffix is appended automatically if absent.

## Response `200`

The request has succeeded.

- OIDCDiscoveryDocument: OIDC discovery document from the issuer's `/.well-known/openid-configuration` endpoint.
  - `issuer` string, required
  - `authorization_endpoint` string, required
  - `token_endpoint` string, required
  - `userinfo_endpoint` string
  - `jwks_uri` string
  - `scopes_supported` string[]
  - `response_types_supported` string[]
  - `token_endpoint_auth_methods_supported` string[]

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `401`: Access is unauthorized.
- `422`: Client error
- `429`: Client error
- `500`: Server error
- `501`: Server error

---

[API](https://skmtc.dev/skycloak/apis/skycloak-public-api.md) · [All operations](https://skmtc.dev/skycloak/apis/skycloak-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skycloak/apis/skycloak-public-api/revisions/33a69e2ce35f?raw)
