Test an identity provider link
const url = 'https://example.com/api/v1/settings/idp/test';const options = { method: 'POST', headers: { cookie: 'bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E', 'Content-Type': 'application/json' }, body: '{"issuer":"example","internal_url":"example","client_id":"example","client_secret":"example","role_claim":"example","role_mapping":{"additionalProperty":["example"]},"offline_access":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/settings/idp/test \ --header 'Content-Type: application/json' \ --cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E \ --data '{ "issuer": "example", "internal_url": "example", "client_id": "example", "client_secret": "example", "role_claim": "example", "role_mapping": { "additionalProperty": [ "example" ] }, "offline_access": true }'Checks a link without saving it: the discovery document, that the provider calls itself by the issuer, its signing keys, and that it accepts the client id and secret (a client credentials request whose token is not used). Without a client secret the stored one is tested. ends_sessions says whether saving it would end the current sessions, the caller’s own too. What needs a browser, such as the redirect URI, is not tested.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The link with the participant’s OpenID Connect provider.
object
Issuer as seen by browsers (and as it appears in iss).
Optional base URL used for back-channel calls (discovery, token) when the IdP is reachable under a different name from the server.
Write only: never returned.
Dotted path to the roles claim, e.g. realm_access.roles or groups.
App role → IdP role names that grant it.
object
Ask for offline_access: an IdP such as Entra ID only gives a
refresh token with it. Keycloak gives one without, bound to its
session; with it, an offline token that outlives a logout.
Example generated
{ "issuer": "example", "internal_url": "example", "client_id": "example", "client_secret": "example", "role_claim": "example", "role_mapping": { "additionalProperty": [ "example" ] }, "offline_access": true}Responses
Section titled “Responses”OK.
POST /api/v1/settings/idp/test.
object
No check failed: the link may be saved.
One check of [check].
object
discovery, issuer, keys or client.
ok, warning (could not be checked fully; saving is allowed),
failed (saving is refused) or skipped (an earlier check failed).
What was found, for people.
Saving ends the sessions of the current IdP, the caller’s own too: the issuer or the client changes.
Example generated
{ "ok": true, "checks": [ { "id": "example", "status": "example", "detail": "example" } ], "ends_sessions": true}Issuer or client id missing.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}No valid session, DPoP-bound token or API key.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}The caller lacks the role this operation needs; or a change with the session cookie came from a page of another site (cross_site_request, decisions #83).
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}