Skip to content

Update SSO Configuration



POST /api/v1/sso/saml_modify/{sso_uuid}

Overview

Update an existing SAML/OIDC identity provider configuration and email allowlist.

Prerequisites and Usage Steps

This is a legacy-compatible endpoint and is still registered in the current source code; the historical "retired on 2026-05-31" comment does not mean requests are currently prohibited. For new integrations, prefer Update SSO Configuration. The legacy path uses the same controller, request fields, and response, and does not exclude OIDC because of the saml prefix.

First use get to back up the current provider and allowlist, then update the required fields as a whole according to the original type. type cannot be switched; emailDomains/idpName/role are declared required, the allowlist is replaced as a whole, and [] clears it. Omitting remark clears it, while omitting the two session durations keeps them. Omitting config or passing {} keeps the old value, while a non-empty object replaces it as a whole; OIDC must fill in all required fields again, and to retain the old secret, pass the Base64 asterisk mask returned by get. For SAML, updating a non-empty config requires also filling in valid idpData; if only the XML is changed, config can be omitted to keep the existing mapping, and {} does not mean clearing the old config.

Create/modify does not perform full SSO login acceptance. When wellKnowURL is provided, a real GET service discovery is performed synchronously (TLS verification is enabled by default during the save phase). Without that URL, you can use explicit auth/token/userinfo endpoints; other authentication, code-for-token exchange, and JWT/UserInfo protocol details are only consumed at login. Currently, even when userinfo is not get, it still sends GET with parameters in the Body, so POST endpoints are not guaranteed to work. OIDC defaults to scope openid only and user source origin; if email/profile is needed, specify it explicitly according to IdP permissions and test it in practice. Beyond declared field types, many dynamic fields are not strictly validated at save time, so a 200 does not mean the entire flow can log in.

Changing the IdP identity (such as SAML entityID/login service URL or OIDC authorization URL/clientId) may change the account namespace and trigger cleanup of member-workspace associations; the current cleanup runs based on the new identity digest and is not guaranteed to only unbind users of the old provider. Removing shared members also involves existing cleanup rules for roles/personal keys/subscriptions, etc. Check the affected members and alternative administrator access first. Updating only certificates/secrets or the mobile number mapping does not necessarily change that identity digest.

After the database commit, a workspace/member cache refresh is queued, which may cause existing SSO access to be re-authenticated; the configuration response does not mean all caches have been refreshed. needNotify defaults to true and sends a configuration reminder to the workspace Owner/administrator; false only suppresses email, while auditing/cache refresh still proceed. If email sending fails, it is recorded but the configuration is not rolled back. The modify response does not always include emails; call get again to verify the allowlist. The secret in the write response is stored ciphertext; only the detail get returns the asterisk mask that can be used for retention.

Path Parameters

Parameter Type Required Description
sso_uuid string Y The original protocol provider to modify; do not use the IdP clientId or mapped fdmp_.
Example: sso_example
How to obtain or fill: Get the target sso_ configuration UUID from this workspace's SSO list/get.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or fill: Obtain an OpenAPI Key with the required permission from API Key Management in the target workspace.

Body Request Parameters

Parameter Type Required Description
emailDomains[*] string Non-empty strings are recommended; the public array does not strictly validate email format item by item, invalid objects/nested arrays may return 500, and length is controlled at 256 by storage.
Example: example.com
How to obtain or fill: Use a single real email/domain identifier and keep it consistent with the email returned by the identity source.
config.modeType string Optional easy/expert, default easy; this field mainly preserves the editing mode and does not automatically validate arbitrary expert configurations as executable.
Example: expert
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.wellKnowURL string Optional HTTP(S) discovery URL; when provided, the save phase performs a real GET and parses JSON (not offline validation); request failures/SSL/HTTP errors are handled by the errors on this page. If omitted, the explicit auth/token/userinfo endpoints are required, and you cannot write only modeType=expert.
Example: https://idp.example.com/.well-known/openid-configuration
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.sslVerify boolean TLS verification switch for discovery requests. Defaults to true during the save phase; at runtime the SDK defaults to true for HTTPS and false for HTTP, and it is not a global switch for each endpoint's verify setting.
Example: true
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.clientId string OIDC requires a non-empty string with no leading or trailing whitespace; obtain it from the IdP client registration, not from a Studio API Key.
Example: client_example
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.clientSecret string The OIDC client secret is UTF-8 plaintext encoded to Base64 first (the example is the encoding of placeholder plaintext, not the actual secret). On create, it must be non-empty after decoding and must not be all asterisks; Base64 is not encrypted transport, so HTTPS is required. When modifying with a non-empty config, to retain the old secret, use the Base64 asterisk mask returned by get; omitting it or passing an empty string is still rejected by subsequent configuration validation and is not a retain instruction. Do not send back the stored ciphertext from the create/modify response.
Example: U0VDUkVULVBMQUNFSE9MREVS
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.grantType string Optional authorization_code/code; at runtime the default is authorization_code. This is not client_credentials or password authorization.
Example: authorization_code
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.scope array Optional string array; at runtime the SDK defaults to [openid] only, not openid/profile/email as stated in older documentation. Ensure the IdP actually provides claims such as email required by the account; an empty array generates an empty scope, so clients should explicitly configure a reasonable value.
Example: ["openid", "profile", "email"]
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.scope[*] string A single scope allowed by the IdP; not a permission point in this workspace.
Example: email
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.authSet json Authorization redirect parameter object; can be omitted, in which case the address is filled from the discovery document.
Example: {}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet json Code-for-token request object; the endpoint can be omitted and taken from the discovery document.
Example: {}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet json id_token signature verification JWK object; this does not immediately initiate token authentication in order to save the configuration.
Example: {}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet json User information source/request object; default origin, not id_token as stated in older documentation.
Example: {}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.claimMapping json Mapping from account fields to actual IdP attribute names, not role mapping rules. OIDC saving does not strictly validate each item, so test the callback in practice; for SAML, a non-empty mapping must provide non-empty username/email at the same time, and mobile is an optional string. An empty object is compatible with the old defaults.
Example: {"username": "preferred_username", "email": "email", "mobile": "phone_number"}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.authSet.url string Optional explicit HTTP(S) URL. If not provided, authorization_endpoint is taken from the discovery document; if provided, it overrides the runtime endpoint. When there is no discovery document, auth/token/userinfo are all required, and the signature verification source must separately ensure JWK availability.
Example: https://idp.example.com/authorize
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.authSet.paramMapping json Optional non-standard request parameter mapping. When non-empty, it replaces the corresponding default parameter set, and required items must be fully retained; keys are IdP parameter names, and values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
Example: {}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.authSet.paramMapping.Target parameter name string Dynamic IdP parameter value; the allowed variable range varies by stage, as shown in the table below; unknown strings are retained as constants and do not automatically take arbitrary internal context.
Example: $client_id
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet.url string Optional explicit HTTP(S) URL. If not provided, token_endpoint is taken from the discovery document; if provided, it overrides the runtime endpoint. When there is no discovery document, auth/token/userinfo are all required, and the signature verification source must separately ensure JWK availability.
Example: https://idp.example.com/token
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet.verify boolean Optional; for this endpoint, HTTPS defaults to true and HTTP defaults to false; configured separately and not uniformly replaced by sslVerify.
Example: true
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet.paramMapping json Optional non-standard request parameter mapping. When non-empty, it replaces the corresponding default parameter set, and required items must be fully retained; keys are IdP parameter names, and values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
Example: {}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet.paramMapping.Target parameter name string Dynamic IdP parameter value; the allowed variable range varies by stage, as shown in the table below; unknown strings are retained as constants and do not automatically take arbitrary internal context.
Example: $client_id
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.url string Optional explicit HTTP(S) URL. If not provided, jwks_uri is taken from the discovery document; if provided, it overrides the runtime endpoint. When there is no discovery document, auth/token/userinfo are all required, and the signature verification source must separately ensure JWK availability.
Example: https://idp.example.com/jwks
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.verify boolean Optional; for this endpoint, HTTPS defaults to true and HTTP defaults to false; configured separately and not uniformly replaced by sslVerify.
Example: true
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.url string Optional explicit HTTP(S) URL. If not provided, userinfo_endpoint is taken from the discovery document; if provided, it overrides the runtime endpoint. When there is no discovery document, auth/token/userinfo are all required, and the signature verification source must separately ensure JWK availability.
Example: https://idp.example.com/userinfo
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.verify boolean Optional; for this endpoint, HTTPS defaults to true and HTTP defaults to false; configured separately and not uniformly replaced by sslVerify.
Example: true
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.paramMapping json Optional non-standard request parameter mapping. When non-empty, it replaces the corresponding default parameter set, and required items must be fully retained; keys are IdP parameter names, and values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
Example: {}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.paramMapping.Target parameter name string Dynamic IdP parameter value; the allowed variable range varies by stage, as shown in the table below; unknown strings are retained as constants and do not automatically take arbitrary internal context.
Example: $client_id
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet.method string Optional get/post, default post; at runtime only these two are supported. Saving does not enforce this enum, and other values will cause errors during subsequent login.
Example: post
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet.authMethod string Optional basic/client_secret_basic (Basic header by default), client_secret_post (form contains ID and secret by default), none (client_id only by default, without automatically including the secret). When a custom paramMapping is present, parameters are generated according to the complete mapping, while the Basic header still follows the selected authentication method.
Example: client_secret_basic
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.method string Default get. The current SDK's non-get branch still sends GET but puts parameters in the Body, which is not a true POST; do not assume an IdP that requires POST is supported just because saving succeeds; use a verified GET endpoint instead.
Example: get
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.authMethod string Default bearer header; client_secret_basic uses the Basic header; none puts access_token in parameters by default. Do not treat the basic alias or any other value as equally effective.
Example: bearer
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.source string origin calls userinfo (default); id_token verifies and reads id_token; merge first uses id_token and then userinfo overwrites keys with the same name. Saving does not enforce the enum, and other values may ultimately result in no user information.
Example: origin
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.responseInfoPath string Optional dot path to the user object in the response, extracted only from the origin result; an empty string takes the entire response, which is different from the attribute name in claimMapping.
Example: data.user
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.keys array Optional array of IdP public JWKs; if non-empty, it is used directly for signature verification; otherwise, at runtime GET verifyTokenSet.url and take keys. These are not private keys; do not use the example placeholder material as real signature verification configuration.
Example: []
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.keys[*] json A single public JWK; retain the complete structure according to the kty/alg/kid and public key parameters published by the IdP.
Example: {}
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.keys[*].kty string Public key type, such as RSA/EC; follow the IdP JWK.
Example: RSA
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].kid string Identifier used to select the public key.
Example: KEY-ID
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].use string Key use.
Example: sig
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].alg string Signature verification algorithm identifier.
Example: RS256
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].n string RSA modulus, Base64url.
Example: PUBLIC-MODULUS
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].e string RSA public exponent, Base64url.
Example: AQAB
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].crv string EC curve, only for the corresponding type.
Example: P-256
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].x string EC public x coordinate.
Example: PUBLIC-X
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].y string EC public y coordinate.
Example: PUBLIC-Y
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].x5c array Public certificate chain, Base64 DER array, optional.
Example: ["PUBLIC-CERTIFICATE"]
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].x5c[*] string A single public certificate, without a private key.
Example: PUBLIC-CERTIFICATE
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.verifyTokenSet.keys[*].Other public fields JSON IdP JWK extensions are retained according to the library protocol; do not add private key material such as d/p/q.
Example: VALUE
How to obtain or fill: Obtain the complete public value from the official IdP JWKS; do not guess or fabricate it manually.
config.claimMapping.username string OIDC default preferred_username; SAML default username. For SAML, when claimMapping is explicitly non-empty, a non-empty string is required.
Example: preferred_username
How to obtain or fill: Ask the IdP administrator for the real attribute name; field mapping is not about writing a mobile number/email as a fixed value.
config.claimMapping.email string Default email; actual login must obtain a valid email. Required for SAML when claimMapping is explicitly non-empty; OIDC saving does not validate the value/source item by item, but the callback still requires an email.
Example: email
How to obtain or fill: Ask the IdP administrator for the real attribute name; field mapping is not about writing a mobile number/email as a fixed value.
config.claimMapping.name string Optional display name attribute for OIDC, default name; SAML currently always reads name, and this mapping key does not change its display name extraction.
Example: name
How to obtain or fill: Ask the IdP administrator for the real attribute name; field mapping is not about writing a mobile number/email as a fixed value.
config.claimMapping.mobile string OIDC default phone_number; SAML default mobile; an explicit empty string means no extraction. If there is no number, it is not added; existing mobile numbers and area codes are retained, and it is added only when the original account has no number and the IdP number is valid.
Example: phone_number
How to obtain or fill: Ask the IdP administrator for the real attribute name; field mapping is not about writing a mobile number/email as a fixed value.
config.authSet.verify boolean Kept for compatibility with existing data and can be saved, but the current OIDC SDK does not consume this key, so it cannot control requests/TLS; use the corresponding field that is actually read on this page.
Example: true
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.method string Kept for compatibility with existing data and can be saved, but the current OIDC SDK does not consume this key, so it cannot control requests/TLS; use the corresponding field that is actually read on this page.
Example: get
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.authMethod string Kept for compatibility with existing data and can be saved, but the current OIDC SDK does not consume this key, so it cannot control requests/TLS; use the corresponding field that is actually read on this page.
Example: get
How to obtain or fill: Obtain from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
idpData string Required for SAML creation and must contain entityID, SSO service URL, and key description; on modify, omit it or pass an empty string to keep the old XML. When submitting a non-empty config for SAML, you must also fill in valid XML. Do not pass it for OIDC; for OIDC, if only idpData changes and there is no config, the identity digest may be written as None and cause 500.
Allows null: False
Example: <IdP_METADATA_XML>
How to obtain or fill: Download the complete valid IdP metadata XML from the SAML identity provider administrator and submit it as the original text string.
config json Dynamic complete configuration object; required for OIDC creation. On modify, omit it or pass {} to keep the old config; a non-empty object replaces it as a whole, not a recursive merge, and OIDC must fill in clientId/clientSecret/valid URLs, etc. For SAML, you cannot submit only a non-empty config and omit idpData. Not all internal field types are strongly validated, so passing save does not prove the callback is usable.
Allows null: False
Example: {}
How to obtain or fill: For OIDC, construct it from the provider client/discovery document and protocol parameters; for SAML, it is used only for optional claimMapping.
emailDomains array Y Required array; can be []; the server deduplicates with a set. It is not a URL, regex, or wildcard with @; first-entry discovery matches by exact full email or domain, and existing SSO identities have separate namespace/workspace relationship rules, so this cannot replace general access control. On modify, the allowlist is replaced as a whole, and [] clears it.
Example: ["example.com"]
How to obtain or fill: Use the full email or email domain allowed to discover this provider, such as user@guance.com or example.com.
idpName string Y Required, ≤64 characters, declared regex [a-zA-Z_一-龥-]; it is recommended to use only letters/Chinese characters/underscores/hyphens, without digits/spaces. The current regex is not fully anchored, which does not mean arbitrary trailing characters are reliably rejected. Non-deleted provider names in the same workspace must be unique; only a non-empty value on modify overrides the old name.
Maximum length: 64
$matchRegExp: [a-zA-Z_一-龥-]

Example: ExampleIdP
How to obtain or fill: A name that distinguishes the identity provider in the current workspace in business terms.
role string Y Required; general/readOnly or an active custom role visible in this workspace; owner/wsAdmin is prohibited. When mapping is disabled, it is used to create new role relationships and is not guaranteed to forcibly overwrite all old roles of existing members; when role mapping is enabled, access is determined by mapping matches.
Allows null: False
Allows empty string: False
Example: general
How to obtain or fill: Select the default login role from the workspace Role List.
remark string Optional; empty string allowed. On create, if omitted, the constructed response may be null, and the database column has an empty string default; explicitly pass an empty string or valid text. On modify, omitting it clears it to "" rather than keeping it; the storage column is 512, and the public API does not declare a unified upper limit.
Allows null: False
Allows empty string: True
Example: 企业登录
How to obtain or fill: The business party fills in a purpose remark.
tokenHoldTime integer Optional, 60..604800 seconds. On create, omitting it uses the site default (repository baseline 604800 = 7 days); on modify, omitting it keeps the old value. This is not the cache code validity period, and this value should not be used to extend the one-time authentication code consumption window.
Allows null: False
$minValue: 60
$maxValue: 604800
Example: 604800
How to obtain or fill: Select the number of seconds according to the organization's idle session retention policy.
tokenMaxValidDuration integer Optional, 60..2592000 seconds. On create, omitting it uses the site default (repository baseline 2592000 = 30 days); on modify, omitting it keeps the old value. The old statement "30 days = 604800" is incorrect; this does not replace the idle hold duration.
Allows null: False
$minValue: 60
$maxValue: 2592000
Example: 2592000
How to obtain or fill: Select the number of seconds according to the organization's maximum login session lifetime.
needNotify boolean Optional for create/modify, default true; false only suppresses configuration reminder emails and does not prevent configuration saving, cache refresh, or auditing. It does not disable SSO or prevent users from logging in.
Allows null: False
Example: false
How to obtain or fill: Whether to notify the workspace Owner/administrator of the configuration change; batch dry runs can explicitly set false according to the process.

Additional Parameter Notes

OIDC custom parameter mappings are used by stage:

Stage Supported Variable Values
authSet $state, $client_id, $client_secret, $redirect_uri, $scope, $response_type (code), $grant_type; do not put the secret into the browser URL
getTokenSet $state, $code, $client_id, $client_secret, $redirect_uri, $scope, $grant_type; other keys can take their values if they match callback parameter names, otherwise they are treated as fixed text
getUserInfoSet $client_id, $client_secret, $redirect_uri, $scope, $access_token

A non-empty mapping object replaces the default request parameters and does not automatically fill in missing required items such as redirect_uri/code/scope. Saving only validates some URL/client fields and does not execute the complete authentication flow; verify the actual callback and final workspace access on a dedicated test identity.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/sso/saml_modify/sso_example' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"emailDomains":["example.com"],"idpName":"ExampleIdP","role":"general","remark":"企业登录","config":{"modeType":"expert","clientId":"client_example","clientSecret":"KioqKioqKioq","scope":["openid","profile","email"],"grantType":"authorization_code","authSet":{"url":"https://idp.example.com/authorize"},"getTokenSet":{"url":"https://idp.example.com/token","method":"post","authMethod":"client_secret_basic"},"verifyTokenSet":{"url":"https://idp.example.com/jwks"},"getUserInfoSet":{"url":"https://idp.example.com/userinfo","method":"get","authMethod":"bearer","source":"origin"},"claimMapping":{"username":"preferred_username","email":"email","mobile":"phone_number"}},"tokenHoldTime":604800,"tokenMaxValidDuration":2592000,"needNotify":false}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.id integer or null Current record number; the constructed result may be null before a create submission.
content.uuid string sso_ configuration UUID.
content.type string saml/oidc.
content.workspaceUUID string Owning workspace.
content.idpName string Provider display name.
content.remark string or null Remark; may be null for old/newly created historical records.
content.role string Default role identifier.
content.idpMd5 string Provider identity/account namespace digest, not the client secret or a writable ID.
content.tokenHoldTime integer Idle session hold duration in seconds.
content.tokenMaxValidDuration integer Maximum login session duration in seconds.
content.isOpenSAMLMapping integer or boolean Role mapping switch, 1/0, not the same as SSO configuration status.
content.status integer 0 enabled, 2 disabled; non-delete reads may contain other historical statuses.
content.creator string Creator identity.
content.updator string Updater identity.
content.createAt integer Creation Unix seconds.
content.updateAt integer Update Unix seconds; may be -1 if not updated.
content.deleteAt integer Deletion Unix seconds; -1 if not deleted.
content.uploadData string Complete IdP metadata XML saved for SAML; usually an empty string for OIDC.
content.config object Complete saved configuration; for OIDC, the write response still contains stored ciphertext, not the Base64 asterisk mask from get, and cannot be used directly for authentication or fill-back.
content.config.modeType string Optional easy/expert, default easy; this field mainly preserves the editing mode and does not automatically validate arbitrary expert configurations as executable.
content.config.wellKnowURL string Optional HTTP(S) discovery URL; when provided, the save phase performs a real GET and parses JSON (not offline validation); request failures/SSL/HTTP errors are handled by the errors on this page. If omitted, the explicit auth/token/userinfo endpoints are required, and you cannot write only modeType=expert.
content.config.sslVerify boolean TLS verification switch for discovery requests. Defaults to true during the save phase; at runtime the SDK defaults to true for HTTPS and false for HTTP, and it is not a global switch for each endpoint's verify setting.
content.config.clientId string OIDC requires a non-empty string with no leading or trailing whitespace; obtain it from the IdP client registration, not from a Studio API Key.
content.config.clientSecret string For OIDC, the write response is server-side stored ciphertext and cannot be sent back as Base64 plaintext/mask; to retain the secret during modification, first call get to obtain the mask.
content.config.grantType string Optional authorization_code/code; at runtime the default is authorization_code. This is not client_credentials or password authorization.
content.config.scope array Optional string array; at runtime the SDK defaults to [openid] only, not openid/profile/email as stated in older documentation. Ensure the IdP actually provides claims such as email required by the account; an empty array generates an empty scope, so clients should explicitly configure a reasonable value.
content.config.scope[] string A single scope allowed by the IdP; not a permission point in this workspace.
content.config.authSet json Authorization redirect parameter object; can be omitted, in which case the address is filled from the discovery document.
content.config.getTokenSet json Code-for-token request object; the endpoint can be omitted and taken from the discovery document.
content.config.verifyTokenSet json id_token signature verification JWK object; this does not immediately initiate token authentication in order to save the configuration.
content.config.getUserInfoSet json User information source/request object; default origin, not id_token as stated in older documentation.
content.config.claimMapping json Mapping from account fields to actual IdP attribute names, not role mapping rules. OIDC saving does not strictly validate each item, so test the callback in practice; for SAML, a non-empty mapping must provide non-empty username/email at the same time, and mobile is an optional string. An empty object is compatible with the old defaults.
content.config.authSet.url string Optional explicit HTTP(S) URL. If not provided, authorization_endpoint is taken from the discovery document; if provided, it overrides the runtime endpoint. When there is no discovery document, auth/token/userinfo are all required, and the signature verification source must separately ensure JWK availability.
content.config.authSet.paramMapping json Optional non-standard request parameter mapping. When non-empty, it replaces the corresponding default parameter set, and required items must be fully retained; keys are IdP parameter names, and values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
content.config.authSet.paramMapping.Target parameter name string Dynamic IdP parameter value; the allowed variable range varies by stage, as shown in the table below; unknown strings are retained as constants and do not automatically take arbitrary internal context.
content.config.getTokenSet.url string Optional explicit HTTP(S) URL. If not provided, token_endpoint is taken from the discovery document; if provided, it overrides the runtime endpoint. When there is no discovery document, auth/token/userinfo are all required, and the signature verification source must separately ensure JWK availability.
content.config.getTokenSet.verify boolean Optional; for this endpoint, HTTPS defaults to true and HTTP defaults to false; configured separately and not uniformly replaced by sslVerify.
content.config.getTokenSet.paramMapping json Optional non-standard request parameter mapping. When non-empty, it replaces the corresponding default parameter set, and required items must be fully retained; keys are IdP parameter names, and values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
content.config.getTokenSet.paramMapping.Target parameter name string Dynamic IdP parameter value; the allowed variable range varies by stage, as shown in the table below; unknown strings are retained as constants and do not automatically take arbitrary internal context.
content.config.verifyTokenSet.url string Optional explicit HTTP(S) URL. If not provided, jwks_uri is taken from the discovery document; if provided, it overrides the runtime endpoint. When there is no discovery document, auth/token/userinfo are all required, and the signature verification source must separately ensure JWK availability.
content.config.verifyTokenSet.verify boolean Optional; for this endpoint, HTTPS defaults to true and HTTP defaults to false; configured separately and not uniformly replaced by sslVerify.
content.config.getUserInfoSet.url string Optional explicit HTTP(S) URL. If not provided, userinfo_endpoint is taken from the discovery document; if provided, it overrides the runtime endpoint. When there is no discovery document, auth/token/userinfo are all required, and the signature verification source must separately ensure JWK availability.
content.config.getUserInfoSet.verify boolean Optional; for this endpoint, HTTPS defaults to true and HTTP defaults to false; configured separately and not uniformly replaced by sslVerify.
content.config.getUserInfoSet.paramMapping json Optional non-standard request parameter mapping. When non-empty, it replaces the corresponding default parameter set, and required items must be fully retained; keys are IdP parameter names, and values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
content.config.getUserInfoSet.paramMapping.Target parameter name string Dynamic IdP parameter value; the allowed variable range varies by stage, as shown in the table below; unknown strings are retained as constants and do not automatically take arbitrary internal context.
content.config.getTokenSet.method string Optional get/post, default post; at runtime only these two are supported. Saving does not enforce this enum, and other values will cause errors during subsequent login.
content.config.getTokenSet.authMethod string Optional basic/client_secret_basic (Basic header by default), client_secret_post (form contains ID and secret by default), none (client_id only by default, without automatically including the secret). When a custom paramMapping is present, parameters are generated according to the complete mapping, while the Basic header still follows the selected authentication method.
content.config.getUserInfoSet.method string Default get. The current SDK's non-get branch still sends GET but puts parameters in the Body, which is not a true POST; do not assume an IdP that requires POST is supported just because saving succeeds; use a verified GET endpoint instead.
content.config.getUserInfoSet.authMethod string Default bearer header; client_secret_basic uses the Basic header; none puts access_token in parameters by default. Do not treat the basic alias or any other value as equally effective.
content.config.getUserInfoSet.source string origin calls userinfo (default); id_token verifies and reads id_token; merge first uses id_token and then userinfo overwrites keys with the same name. Saving does not enforce the enum, and other values may ultimately result in no user information.
content.config.getUserInfoSet.responseInfoPath string Optional dot path to the user object in the response, extracted only from the origin result; an empty string takes the entire response, which is different from the attribute name in claimMapping.
content.config.verifyTokenSet.keys array Optional array of IdP public JWKs; if non-empty, it is used directly for signature verification; otherwise, at runtime GET verifyTokenSet.url and take keys. These are not private keys; do not use the example placeholder material as real signature verification configuration.
content.config.verifyTokenSet.keys[] json A single public JWK; retain the complete structure according to the kty/alg/kid and public key parameters published by the IdP.
content.config.verifyTokenSet.keys[].kty string Public key type, such as RSA/EC; follow the IdP JWK.
content.config.verifyTokenSet.keys[].kid string Identifier used to select the public key.
content.config.verifyTokenSet.keys[].use string Key use.
content.config.verifyTokenSet.keys[].alg string Signature verification algorithm identifier.
content.config.verifyTokenSet.keys[].n string RSA modulus, Base64url.
content.config.verifyTokenSet.keys[].e string RSA public exponent, Base64url.
content.config.verifyTokenSet.keys[].crv string EC curve, only for the corresponding type.
content.config.verifyTokenSet.keys[].x string EC public x coordinate.
content.config.verifyTokenSet.keys[].y string EC public y coordinate.
content.config.verifyTokenSet.keys[].x5c array Public certificate chain, Base64 DER array, optional.
content.config.verifyTokenSet.keys[].x5c[] string A single public certificate, without a private key.
content.config.verifyTokenSet.keys[].Other public fields JSON IdP JWK extensions are retained according to the library protocol; do not add private key material such as d/p/q.
content.config.claimMapping.username string OIDC default preferred_username; SAML default username. For SAML, when claimMapping is explicitly non-empty, a non-empty string is required.
content.config.claimMapping.email string Default email; actual login must obtain a valid email. Required for SAML when claimMapping is explicitly non-empty; OIDC saving does not validate the value/source item by item, but the callback still requires an email.
content.config.claimMapping.name string Optional display name attribute for OIDC, default name; SAML currently always reads name, and this mapping key does not change its display name extraction.
content.config.claimMapping.mobile string OIDC default phone_number; SAML default mobile; an explicit empty string means no extraction. If there is no number, it is not added; existing mobile numbers and area codes are retained, and it is added only when the original account has no number and the IdP number is valid.
content.config.authSet.verify boolean Kept for compatibility with existing data and can be saved, but the current OIDC SDK does not consume this key, so it cannot control requests/TLS; use the corresponding field that is actually read on this page.
content.config.verifyTokenSet.method string Kept for compatibility with existing data and can be saved, but the current OIDC SDK does not consume this key, so it cannot control requests/TLS; use the corresponding field that is actually read on this page.
content.config.verifyTokenSet.authMethod string Kept for compatibility with existing data and can be saved, but the current OIDC SDK does not consume this key, so it cannot control requests/TLS; use the corresponding field that is actually read on this page.
content.loginURL string Login entry for this provider, returned by the deployment site; not the current OpenAPI path accessed with DF-API-KEY.
content.callbackURL string OIDC callback URL only; register it in the IdP's allowed callback list.
content.metadataURL string SAML SP metadata address only.
content.entiryID string SAML SP entity ID only; preserve the actual protocol spelling entiryID and do not change it to entityID.
content.assertionURL string SAML ACS/assertion callback address only; register it according to the actual returned value.
content.declaration object or null Workspace common declaration attached to non-empty business objects; can be null or an empty object when not configured; empty objects are not added. The exact position in pagination is subject to the structure on this page.
{
  "code": 200,
  "content": {
    "id": 1,
    "uuid": "sso_example",
    "type": "oidc",
    "workspaceUUID": "wksp_example",
    "idpName": "ExampleIdP",
    "remark": "企业登录",
    "role": "general",
    "idpMd5": "IDP-IDENTITY-HASH",
    "tokenHoldTime": 604800,
    "tokenMaxValidDuration": 2592000,
    "isOpenSAMLMapping": 0,
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785427200,
    "updateAt": 1785427200,
    "deleteAt": -1,
    "config": {
      "modeType": "expert",
      "clientId": "client_example",
      "clientSecret": "STORED-CIPHERTEXT-PLACEHOLDER",
      "scope": [
        "openid",
        "profile",
        "email"
      ],
      "grantType": "authorization_code",
      "authSet": {
        "url": "https://idp.example.com/authorize"
      },
      "getTokenSet": {
        "url": "https://idp.example.com/token",
        "method": "post",
        "authMethod": "client_secret_basic"
      },
      "verifyTokenSet": {
        "url": "https://idp.example.com/jwks"
      },
      "getUserInfoSet": {
        "url": "https://idp.example.com/userinfo",
        "method": "get",
        "authMethod": "bearer",
        "source": "origin"
      },
      "claimMapping": {
        "username": "preferred_username",
        "email": "email",
        "mobile": "phone_number"
      }
    },
    "uploadData": "",
    "loginURL": "https://sso.example.com/oidc/login/sso_example",
    "callbackURL": "https://sso.example.com/oidc/callback/sso_example",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

SAML request example: first replace <IdP_METADATA_XML> with the complete valid XML provided by the administrator (do not save directly with this placeholder text). The modification target must originally be SAML.

curl --request POST '<Endpoint>/api/v1/sso/saml_modify/sso_example' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"emailDomains":["example.com"],"idpName":"ExampleSAML","role":"general","remark":"SAML登录","idpData":"<IdP_METADATA_XML>","config":{"claimMapping":{"username":"uid","email":"mail","mobile":"telephone"}},"needNotify":false}'

Example OIDC successful configuration response (the secret is a stored ciphertext placeholder and cannot be filled back):

{
  "code": 200,
  "content": {
    "id": 1,
    "uuid": "sso_example",
    "type": "oidc",
    "workspaceUUID": "wksp_example",
    "idpName": "ExampleIdP",
    "remark": "企业登录",
    "role": "general",
    "idpMd5": "IDP-IDENTITY-HASH",
    "tokenHoldTime": 604800,
    "tokenMaxValidDuration": 2592000,
    "isOpenSAMLMapping": 0,
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785427200,
    "updateAt": 1785427200,
    "deleteAt": -1,
    "config": {
      "modeType": "expert",
      "clientId": "client_example",
      "clientSecret": "STORED-CIPHERTEXT-PLACEHOLDER",
      "scope": [
        "openid",
        "profile",
        "email"
      ],
      "grantType": "authorization_code",
      "authSet": {
        "url": "https://idp.example.com/authorize"
      },
      "getTokenSet": {
        "url": "https://idp.example.com/token",
        "method": "post",
        "authMethod": "client_secret_basic"
      },
      "verifyTokenSet": {
        "url": "https://idp.example.com/jwks"
      },
      "getUserInfoSet": {
        "url": "https://idp.example.com/userinfo",
        "method": "get",
        "authMethod": "bearer",
        "source": "origin"
      },
      "claimMapping": {
        "username": "preferred_username",
        "email": "email",
        "mobile": "phone_number"
      }
    },
    "uploadData": "",
    "loginURL": "https://sso.example.com/oidc/login/sso_example",
    "callbackURL": "https://sso.example.com/oidc/callback/sso_example",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Invalid request JSON format Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The Body top level is not a JSON object Some JSON file format error Submit a complete object containing the fields on this page.
406 ft.ParameterValidationFailed The SAML claimMapping structure is invalid, or a declared field type/enum/range does not match Parameter parsing failed For a non-empty SAML mapping, provide non-empty username/email at the same time; mobile must be a string; correct according to the public parameter table.
400 ft.InvalidSsoRoleCfg The default role is owner/wsAdmin Administrator and owner role configurations are not supported Use general/readOnly or an active custom role in this workspace.
400 ft.InvalidCustomRole The default custom role does not exist, is disabled/deleted, or is not visible in the current workspace Invalid custom role Take a valid role from the current workspace role list, not the display name.
406 ft.InvalidSAML SAML is missing valid XML, metadata is missing entity/service/key description, or a non-empty config is modified without filling in valid idpData Invalid SAML configuration Download the real complete metadata XML from the IdP; when updating field mappings, fill in the original valid XML at the same time.
400 ft.SsoModeTypeInvalid OIDC modeType is not easy/expert Invalid modeType parameter Select according to the enum on this page.
400 ft.SsoClientIdInvalid clientId is empty/not a string/has leading or trailing whitespace Invalid clientId parameter Use the original client ID assigned by the IdP.
400 ft.SsoClientSecretInvalid clientSecret is not valid Base64 UTF-8, is empty/all asterisks after decoding on create, or a non-empty config lacks a valid clientSecret string Invalid clientSecret parameter On create, encode the real secret; to retain the old value on modify, use the Base64 asterisk mask returned by get and do not fill back stored ciphertext.
400 ft.SsoSSLVerifyInvalid SSL verification fails for the discovery document request during saving SSL verification exception: {} Check the certificate chain/domain and trust, and configure sslVerify according to organizational policy.
400 ft.SsoWellKnowURLInvalid wellKnowURL is not a valid HTTP(S) address or the discovery request returns HTTP >= 400 Invalid identity provider URL (wellKnowURL) parameter Check the official discovery address and service response; do not use the login page URL instead.
400 ft.SsoVerifyWellKnowURLInvalid The discovery request connection/JSON parsing, etc. fails Failed to verify identity provider URL (wellKnowURL) parameter, err:{} Check the address, network, and JSON response, retain the traceId, and do not repeatedly submit the same incorrect configuration.
400 ft.SsoAuthSetInvalid The explicit authSet.url is not a valid HTTP(S) address {} parameter is invalid Use the official authorization_endpoint.
400 ft.SsoTokenEndPointInvalid The explicit getTokenSet.url is invalid {} parameter is invalid Use the official token_endpoint.
400 ft.SsoVerifyTokenSetInvalid The explicit verifyTokenSet.url is invalid {} parameter is invalid Use the official JWKS address.
400 ft.SsoUserInfoEndPointInvalid The explicit getUserInfoSet.url is invalid {} parameter is invalid Use the official userinfo_endpoint.
400 ft.SsoOIDCUrlsInvalid There is no wellKnowURL and the auth/token/userinfo endpoints are incomplete url parameter is invalid Fill in all three official addresses; saving does not mean the entire protocol has been accepted.
400 ft.SsoGrantTypeInvalid grantType is not authorization_code/code grantType is invalid; currently only code and authorization_code are supported Change to a supported authorization method.
400 ft.SSOEsistsSameSupplier A non-deleted provider name is duplicated in the same workspace, excluding itself on modify A provider with the same name already exists Modify using the existing UUID or choose a unique name.
400 ft.SSOEsistsSameIdp A non-deleted configuration in the same workspace has the same IdP identity digest, excluding itself on modify A configuration with the same metadata file already exists Check the existing provider and do not create the same identity again by changing the display name.
500 ft.InternalServerError An uncaught exception occurs in dynamic config/email element shapes, storage or decryption/encryption, member association cleanup, or post-commit cache tasks Internal error First use get/list to check the configuration/allowlist/member relationships, as the change may already be committed; retain the traceId and handle it according to the failure stage; do not blindly recreate.
406 ft.NotFoundSAML The UUID does not belong to a non-deleted SSO configuration in the current workspace SSO configuration not found Retrieve the sso_ UUID again from the SSO List; do not use the fdmp_ mapping or idpMd5.
400 ft.InvalidActionForbiddenRemovalOwner Member cleanup triggered by an identity change includes the current workspace Owner Invalid operation, cannot remove owner Check the associated accounts and backup administrator access first; do not assume that both the configuration and members are unchanged just because the operation failed.
400 ft.AgentMemberCanNotDelete Identity change triggers shared member cleanup and hits a non-deletable agent member Members from agent source cannot be deleted Check the namespace target and contact the administrator to handle historical associations; do not blindly retry cleanup.

Feedback

Is this page helpful?