Change an identity provider, keeping its sign-in URLs
const url = 'https://example.com/v1/auth/providers/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"providerId":"example","kind":"oidc","displayName":"example","domains":["example"],"join":"invite","joinRole":"viewer","metadata":{},"issuer":"https://example.com","clientId":"example","clientSecretRef":"example","scopes":["example"],"authorizationEndpoint":"https://example.com","tokenEndpoint":"https://example.com","userinfoEndpoint":"https://example.com","jwksEndpoint":"https://example.com","claimMapping":{"userId":"example","email":"example","displayName":"example","scopes":{"claim":"example","delimiter":"example"},"metadata":["example"]},"idpMetadataXml":"example","idpEntityId":"example","idpSsoUrl":"https://example.com","idpCertificates":["example"],"spSigningKeyRef":"example","spDecryptionKeyRef":"example","spSigningCertificates":["example"],"spDecryptionCertificates":["example"],"wantAssertionsSigned":true,"attributeMapping":{"userId":"example","email":"example","displayName":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/auth/providers/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "providerId": "example", "kind": "oidc", "displayName": "example", "domains": [ "example" ], "join": "invite", "joinRole": "viewer", "metadata": {}, "issuer": "https://example.com", "clientId": "example", "clientSecretRef": "example", "scopes": [ "example" ], "authorizationEndpoint": "https://example.com", "tokenEndpoint": "https://example.com", "userinfoEndpoint": "https://example.com", "jwksEndpoint": "https://example.com", "claimMapping": { "userId": "example", "email": "example", "displayName": "example", "scopes": { "claim": "example", "delimiter": "example" }, "metadata": [ "example" ] }, "idpMetadataXml": "example", "idpEntityId": "example", "idpSsoUrl": "https://example.com", "idpCertificates": [ "example" ], "spSigningKeyRef": "example", "spDecryptionKeyRef": "example", "spSigningCertificates": [ "example" ], "spDecryptionCertificates": [ "example" ], "wantAssertionsSigned": true, "attributeMapping": { "userId": "example", "email": "example", "displayName": "example" } }'Merges the changes into the stored provider and checks the result as a registration is (400 invalid-provider-config, provider-key-refused, connection-key-refused or reserved-name-prefix, or 409 identity-provider-key-in-use, so a provider that already names such a secret is refused until it names one of its own; 422 identity-provider-invalid when the deployment can’t use it). The provider keeps its signIn, so nothing changes on the identity provider’s side. Not mounted when the deployment can’t update providers.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Changes to a registered identity provider: a field given replaces the stored one, null removes an optional one, and anything not given stays. The result must still be a whole provider of its kind (the fields IdentityProviderConfig requires for it), checked as a registration is. providerId and kind can’t change; signIn is the deployment’s and is ignored. A new issuer drops the endpoints discovered from the old one.
object
Responses
Section titled “Responses”Updated.
object
Example
{ "provider": { "join": "invite", "joinRole": "viewer", "kind": "oidc" }}Malformed request body, or a configuration that isn’t a provider’s (invalid-provider-config). Or provider-key-refused: a secret reference names a model provider’s key (details.secret, details.providerId); store the identity provider’s own secret under its own name and name that. Or connection-key-refused: it names the account key of a texts connection app registration (details.secret, details.appId), which only that registration names. Or reserved-name-prefix: it names a secret under the reserved kindgi. prefix (details.secret).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Not a tenant admin (permission-denied). Without an authorization store, a tenant admin is the deployment’s API token, an admin key, or a console signed in with either. Or this deployment’s operator manages sign-in (identity-providers-operator-managed, KINDGI_AUTH_TENANT_PROVIDERS=off): only the deployment’s own token can change its providers.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No identity provider registered with that id under this workspace.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Idempotency-Key was reused with a different body, or resource-state conflict. Or identity-provider-key-in-use: a secret reference names a secret that a tool (its current version), an MCP endpoint, a webhook endpoint, a webhook trigger, a destination or a connection app registration uses; details.secret names it and details.usedBy lists each (kind, id, a tool’s version). An identity provider’s secret is sign-in’s only: store its own secret under its own name. Nothing is stored. Or this deployment has no secrets store (identity-providers-need-secrets-store, KINDGI_SECRETS_BACKEND): a provider’s client secret and keys are references into one, so no provider is added or changed until it has one. Or the change sets join: domain or joinRole where the deployment has no authorization store (domain-join-needs-authorization, KINDGI_OPENFGA_API_URL): without one, roles aren’t checked, so no one joins by domain. A value sent back as stored isn’t a change. Or idempotency-key-in-flight (with Retry-After): a request with the same Idempotency-Key still runs, so this one wasn’t run; send it again after Retry-After to get that request’s answer.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”The request body is over the API’s limit (request-too-large; details.maxBytes says how much).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The deployment could not use the configuration (identity-provider-invalid).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Server error (unmapped domain code or framework crash).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The Idempotency-Key store (idempotency-store-unavailable) or the authorization store (authz-backend-unavailable) couldn’t be reached before the request ran, or the database was too busy for its authorization check (database-busy), so nothing was changed; Retry-After (whole seconds) says when to try again with the same key. Or tenant-state-unavailable (with Retry-After), on a runtime serving many workspaces: the workspace’s state couldn’t be read, so nothing was changed.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
GET /v1/auth/providers/{providerId}: Get one identity providerGET /v1/auth/providers: List identity providers configured for the workspacePOST /v1/auth/providers: Register an identity provider (OIDC or SAML)GET /v1/auth/providers/{providerId}/sign-in: What to give the identity provider, before or after registering- Error code
authz-backend-unavailable - Error code
connection-key-refused - Error code
database-busy - Error code
domain-join-needs-authorization - Error code
idempotency-key-in-flight - Error code
idempotency-store-unavailable - Error code
identity-provider-invalid - Error code
identity-provider-key-in-use - Error code
identity-providers-need-secrets-store - Error code
identity-providers-operator-managed - Error code
invalid-provider-config - Error code
permission-denied - Error code
provider-key-refused - Error code
rate-limit-exceeded - Error code
request-too-large - Error code
reserved-name-prefix - Error code
tenant-state-unavailable - Every error code