/v1/mgmt/oauth/providerAuthorization
Descope Project ID and Management Key Project ID:Management Key as bearer token.
In: header
Request Body
application/json
1 <= length <= 254Whether logins use the caller's own OAuth app credentials rather than Descope's shared app; always true for custom providers
length <= 254Write-only. Read returns PLACEHOLDER_VALUE when set. PLACEHOLDER_VALUE=keep, ""=clear (rejected when required), value=set
length <= 4096length <= 254Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
Has no effect on the authorization code flow. Set strictOIDCValidation to send and verify a nonce.
Configuration fields for custom providers; Descope-managed and rejected on system provider writes
length <= 254length <= 2097152Note that this is used both in SSO settings and in OAuth settings import/export, make sure not to change any fields which might break backwards compatibility with existing exported project data
Native (mobile) client credentials
length <= 254Write-only. Read returns PLACEHOLDER_VALUE when set. PLACEHOLDER_VALUE=keep, ""=clear (rejected when required), value=set
length <= 4096Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
Algorithm signing the private_key_jwt client assertion when useClientAssertion is set. RS256 (default when empty) or RS512; the IdP must be registered with the same algorithm
Sends a nonce on the authorization code flow and requires it in the ID token, and rejects an ID token whose audience is not the client ID. Requires jwksUrl and issuer so the ID token is verified. Native and One Tap logins are not affected
Algorithm the provider signs its ID tokens with, verified against the keys at jwksUrl. Required when jwksUrl is set, so strictOIDCValidation needs it too. Descope-managed and rejected on system provider writes
Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
Create or update a single OAuth provider, using a valid management key.
curl -X POST "https://api.descope.com/v1/mgmt/oauth/provider" \ -H "Content-Type: application/json" \ -d '{ "id": "string" }'{ "id": "string", "enabled": true, "useSelfAccount": true, "clientId": "string", "clientSecret": "string", "callbackDomain": "string", "redirectUrl": "string", "scopes": null, "prompts": null, "allowedGrantTypes": null, "manageProviderTokens": true, "trustProvidedEmails": true, "jitUpdatesDisabled": true, "useNonce": true, "useClientAssertion": true, "description": "string", "logo": "string", "issuer": "string", "authUrl": "string", "tokenUrl": "string", "userDataUrl": "string", "jwksUrl": "string", "userDataClaimsMapping": { "loginId": "string", "username": "string", "name": "string", "email": "string", "verifiedEmail": "string", "verifiedPhone": "string", "picture": "string", "givenName": "string", "middleName": "string", "familyName": "string", "customAttributes": { "property1": "string", "property2": "string" }, "group": "string" }, "nativeClientId": "string", "nativeClientSecret": "string", "appleKeyGenerator": null, "nativeAppleKeyGenerator": null, "clientAssertionSigningAlg": "string", "strictOIDCValidation": true, "signAlgorithm": "string", "authUrlAdditionalParams": null}/** * Single OAuth provider (Terraform: descope_oauth_provider). The id is the provider identity: the lowercase * name of a system provider ("google"), or the caller-chosen key of a custom provider. Patch semantics: * omitted fields are left untouched; present fields are written. The Get response uses the same message with * all fields populated, except that Descope-managed fields of system providers (description, logo, issuer, * the connection endpoints and the claims mapping) are rejected on write and omitted on read. */export interface Response {id: stringenabled?: boolean/** * Whether logins use the caller's own OAuth app credentials rather than Descope's shared app; always true for custom providers */useSelfAccount?: booleanclientId?: string/** * Write-only. Read returns PLACEHOLDER_VALUE when set. PLACEHOLDER_VALUE=keep, ""=clear (rejected when required), value=set */clientSecret?: stringcallbackDomain?: stringredirectUrl?: string/** * JSON arrays of strings; Value makes empty and absent distinct: null/absent = keep, [] = clear, values = set. Validated in the service */scopes?: {[k: string]: unknown}/** * Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. */prompts?: {[k: string]: unknown}/** * Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. */allowedGrantTypes?: {[k: string]: unknown}manageProviderTokens?: booleantrustProvidedEmails?: booleanjitUpdatesDisabled?: boolean/** * Has no effect on the authorization code flow. Set strictOIDCValidation to send and verify a nonce. */useNonce?: booleanuseClientAssertion?: boolean/** * Configuration fields for custom providers; Descope-managed and rejected on system provider writes */description?: stringlogo?: stringissuer?: stringauthUrl?: stringtokenUrl?: stringuserDataUrl?: stringjwksUrl?: string/** * Replaced wholesale when present, left untouched when absent */userDataClaimsMapping?: {loginId?: stringusername?: stringname?: stringemail?: stringverifiedEmail?: stringverifiedPhone?: stringpicture?: stringgivenName?: stringmiddleName?: stringfamilyName?: stringcustomAttributes?: {[k: string]: string}group?: string}/** * Native (mobile) client credentials */nativeClientId?: string/** * Write-only. Read returns PLACEHOLDER_VALUE when set. PLACEHOLDER_VALUE=keep, ""=clear (rejected when required), value=set */nativeClientSecret?: string/** * JSON objects with the AppleKeyGenerator fields (keyId, teamId, privateKey); Value makes empty and absent * distinct: null/absent = keep, {} = clear, object = set. Only valid for the apple system provider. Validated in the service */appleKeyGenerator?: {[k: string]: unknown}/** * Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. */nativeAppleKeyGenerator?: {[k: string]: unknown}/** * Algorithm signing the private_key_jwt client assertion when useClientAssertion is set. RS256 (default when empty) or RS512; the IdP must be registered with the same algorithm */clientAssertionSigningAlg?: string/** * Sends a nonce on the authorization code flow and requires it in the ID token, and rejects an ID token whose audience is not the client ID. Requires jwksUrl and issuer so the ID token is verified. Native and One Tap logins are not affected */strictOIDCValidation?: boolean/** * Algorithm the provider signs its ID tokens with, verified against the keys at jwksUrl. Required when jwksUrl is set, so strictOIDCValidation needs it too. Descope-managed and rejected on system provider writes */signAlgorithm?: string/** * JSON object of static string parameters added to the authorization request, such as {"acr_values": "AAL3_ANY"} for NHS CIS2 or {"vtr": "[\"P9.Cp.Cd\"]"} for NHS login. Value makes empty and absent distinct: null/absent = keep, {} = clear, object = replace. Validated in the service */authUrlAdditionalParams?: {[k: string]: unknown}}Get well-known settings GET
Get the project's customization of its OIDC discovery documents (the project document and the shared inbound apps document), using a valid management key. Returns the defaults when nothing was saved.
Set OAuth settings POST
Set the project's general OAuth settings, using a valid management key.