List Oauth Providers
const url = 'https://example.com/api/settings/oauth-providers/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/settings/oauth-providers/ \ --header 'Authorization: Bearer <token>'List all OAuth providers (admin only).
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Successful Response
Response schema for OAuth/SAML provider.
Write-only credentials are never exposed:
client_secret_encrypted(OAuth client secret) — excluded.idp_certificate(SAML IdP signing cert, Fernet-encrypted at rest) — excluded.
The 3 non-secret SAML fields (idp_entity_id, idp_sso_url,
sp_entity_id) ARE exposed so the admin UI can display them.
Pitfall 11 interaction: those 3 fields are declared with deferred=True
on the OAuth ORM model so community DBs (which lack the columns) do not
crash on SELECT. Pydantic’s from_attributes=True would normally trigger
an implicit deferred load on attribute access, which fails under FastAPI’s
async context with MissingGreenlet. The model_validator(mode="before")
below reads the SAML fields directly from obj.__dict__ so unloaded
attributes default to None instead of triggering IO. SAML admin endpoints
that need the values must use undefer_group("saml") at query time.
object
Unique provider identifier.
URL-safe identifier used in the callback URL.
Label shown on the login page button.
Provider type: ‘google’, ‘microsoft’, ‘oidc’, or ‘saml’.
Space-separated OAuth scopes.
Default role assigned to new users.
Whether the provider button appears on the login page.
Timestamp the provider was created.
Timestamp the provider was last updated.
Example generated
[ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "slug": "example", "display_name": "example", "provider_type": "example", "client_id": "example", "discovery_url": "example", "authorize_url": "example", "token_url": "example", "userinfo_url": "example", "idp_entity_id": "example", "idp_sso_url": "example", "sp_entity_id": "example", "scopes": "example", "default_role": "example", "group_claim": "example", "group_role_mapping": {}, "enabled": true, "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z" }]Bad request — invalid query parameters or payload
object
Example
{ "type": "about:blank"}Unauthorized — missing or invalid credentials
object
Example
{ "type": "about:blank"}Forbidden — caller lacks access to this resource
object
Example
{ "type": "about:blank"}Not found
object
Example
{ "type": "about:blank"}Validation error
object
Example
{ "type": "about:blank"}Internal server error
object
Example
{ "type": "about:blank"}