Skip to content

Update SSO Configuration



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

Overview

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

Before You Call and Usage Steps

First call 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 preserves them. Omitting config or passing {} preserves the old value; a non-empty object replaces it as a whole. For OIDC, you must backfill all required fields; to retain the old secret, pass the Base64 asterisk value returned by get. For SAML, updating with a non-empty config requires also backfilling valid idpData; if only changing the XML, you can omit config to preserve existing mappings; {} does not mean clearing the old config.

Create/Modify does not perform full SSO login acceptance validation. When wellKnowURL is provided, a real GET service discovery is performed synchronously (TLS verification is enabled by default in the save phase). If this address is not provided, you can use the explicit auth/token/userinfo endpoints. Other authentication details, code-to-token exchange, and JWT/UserInfo protocol details are consumed only during login. Currently, when userinfo is not get, the SDK still sends GET + Body, so POST endpoints are not guaranteed to work. For OIDC, the default scope is only openid, and the user source is origin; if email/profile is needed, explicitly provide it according to IdP permissions and test it in practice. Beyond declared field types, many dynamic fields are not strictly validated during saving; a 200 response does not mean the entire flow can log in.

Changing the IdP identity (such as SAML entityID/login service address or OIDC authorization address/clientId) may change the account namespace and trigger member workspace association cleanup. The current cleanup is performed 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, so first check the relevant members and alternative administrator access. Updating only the certificate/secret or mobile number mapping does not necessarily change this identity digest.

After the database commit, workspace/member cache refresh tasks are dispatched, 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/administrators; false only suppresses the email, while auditing/cache refresh still occur. Email delivery failures are logged but do not roll back the configuration. 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 get details returns the asterisk mask that can be used for retention.

Route Parameters

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

Request Headers

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

Body Request Parameters

Parameter Name 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 cause a 500, and length is controlled at 256 by storage.
Example: example.com
How to obtain or fill in: Use a single real email/domain identifier, 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 in: Obtain it 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 use the errors on this page. If omitted, you must explicitly provide the auth/token/userinfo endpoints; you cannot only set modeType=expert.
Example: https://idp.example.com/.well-known/openid-configuration
How to obtain or fill in: Obtain it 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 in the save phase; at runtime, the SDK defaults to true for HTTPS and false for HTTP. It is not a global switch for each endpoint's verify setting.
Example: true
How to obtain or fill in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.clientId string Required non-empty string for OIDC, must not have leading/trailing whitespace; obtained from IdP client registration, not a Studio API Key.
Example: client_example
How to obtain or fill in: Obtain it 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 Base64-encoded from UTF-8 plaintext first (the example is the encoding of placeholder plaintext, not an actual secret). For creation, after decoding it must be non-empty and must not be all asterisks; Base64 does not equal encrypted transmission, and HTTPS must be used. When modifying a non-empty config to retain the old secret, use the Base64 asterisk mask returned by get; omission/an empty string will still be rejected by subsequent configuration validation and is not a retention instruction. Do not send back the stored ciphertext from the create/modify response.
Example: U0VDUkVULVBMQUNFSE9MREVS
How to obtain or fill in: Obtain it 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; omitted at runtime defaults to authorization_code. This is not client_credentials or password authorization.
Example: authorization_code
How to obtain or fill in: Obtain it 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 only [openid], not the openid/profile/email in older documentation. Ensure the IdP actually provides the claims required by the account, such as email; an empty array generates an empty scope, so clients should explicitly configure a reasonable value.
Example: ["openid", "profile", "email"]
How to obtain or fill in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.scope[*] string Scope allowed by a single IdP; not a permission point in this workspace.
Example: email
How to obtain or fill in: Obtain it 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 so the address is backfilled from the discovery document.
Example: {}
How to obtain or fill in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet json Code-to-token request object; the endpoint can be omitted and taken from the discovery document.
Example: {}
How to obtain or fill in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet json JWK object for id_token signature verification; this does not immediately initiate token authentication to save the configuration.
Example: {}
How to obtain or fill in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet json User info source/request object; default origin, not id_token as in older documentation.
Example: {}
How to obtain or fill in: Obtain it 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 save does not strictly validate each item, so the callback must be tested in practice; a non-empty SAML mapping must also provide non-empty username/email, 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 in: Obtain it 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, the authorization_endpoint from the discovery document is used; 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 in: Obtain it 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; required items must be fully retained. Keys are IdP parameter names; 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 in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.authSet.paramMapping.目标参数名 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 are not automatically taken from arbitrary internal context.
Example: $client_id
How to obtain or fill in: Obtain it 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, the token_endpoint from the discovery document is used; 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 in: Obtain it 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. Configure them separately; sslVerify does not replace them uniformly.
Example: true
How to obtain or fill in: Obtain it 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; required items must be fully retained. Keys are IdP parameter names; 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 in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getTokenSet.paramMapping.目标参数名 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 are not automatically taken from arbitrary internal context.
Example: $client_id
How to obtain or fill in: Obtain it 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, the jwks_uri from the discovery document is used; 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 in: Obtain it 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. Configure them separately; sslVerify does not replace them uniformly.
Example: true
How to obtain or fill in: Obtain it 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, the userinfo_endpoint from the discovery document is used; 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 in: Obtain it 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. Configure them separately; sslVerify does not replace them uniformly.
Example: true
How to obtain or fill in: Obtain it 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; required items must be fully retained. Keys are IdP parameter names; 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 in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.getUserInfoSet.paramMapping.目标参数名 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 are not automatically taken from arbitrary internal context.
Example: $client_id
How to obtain or fill in: Obtain it 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; runtime supports only these two. Saving does not enforce this enumeration; other values will cause errors during subsequent logins.
Example: post
How to obtain or fill in: Obtain it 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 containing ID and secret by default), none (only client_id by default, without automatically including the secret). When custom paramMapping is present, parameters are generated according to the complete mapping; the Basic header still follows the selected authentication method.
Example: client_secret_basic
How to obtain or fill in: Obtain it 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. In the current SDK, the non-get branch still sends GET but places parameters in the Body; this is not a true POST. An IdP that requires POST cannot be considered supported merely because saving succeeded; use a verified GET endpoint.
Example: get
How to obtain or fill in: Obtain it 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 places access_token in parameters by default. Do not treat the basic alias or any other arbitrary value as equally effective.
Example: bearer
How to obtain or fill in: Obtain it 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 uses id_token first and then userinfo overrides keys with the same name. Saving does not enforce the enumeration; other values may ultimately produce no user information.
Example: origin
How to obtain or fill in: Obtain it 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, unlike the attribute names in claimMapping.
Example: data.user
How to obtain or fill in: Obtain it 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 retrieve keys. These are not private keys; do not use the example placeholder material as actual signature verification configuration.
Example: []
How to obtain or fill in: Obtain it 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 in: Obtain it 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 in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].kid string Identifier used to select the public key.
Example: KEY-ID
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].use string Key use.
Example: sig
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].alg string Signature verification algorithm identifier.
Example: RS256
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].n string RSA modulus in Base64url.
Example: PUBLIC-MODULUS
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].e string RSA public exponent in Base64url.
Example: AQAB
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].crv string EC curve, only for the corresponding type.
Example: P-256
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].x string EC public x coordinate.
Example: PUBLIC-X
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].y string EC public y coordinate.
Example: PUBLIC-Y
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].x5c array Public certificate chain as a Base64 DER array, optional.
Example: ["PUBLIC-CERTIFICATE"]
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].x5c[*] string A single public certificate; does not contain a private key.
Example: PUBLIC-CERTIFICATE
How to obtain or fill in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.verifyTokenSet.keys[*].其他公开字段 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 in: Obtain the complete public value from the official IdP JWKS; do not guess or construct it manually.
config.claimMapping.username string Defaults to preferred_username for OIDC and username for SAML. When SAML explicitly has a non-empty claimMapping, this is required as a non-empty string.
Example: preferred_username
How to obtain or fill in: Ask the IdP administrator for the actual attribute name; field mapping is not about writing a mobile number/email as a fixed value.
config.claimMapping.email string Defaults to email; actual login must obtain a valid email. Required when SAML explicitly has a non-empty claimMapping; OIDC save does not validate the value/source, but the callback still requires an email.
Example: email
How to obtain or fill in: Ask the IdP administrator for the actual 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 in: Ask the IdP administrator for the actual attribute name; field mapping is not about writing a mobile number/email as a fixed value.
config.claimMapping.mobile string Defaults to phone_number for OIDC and mobile for SAML; an explicit empty string means no extraction. If there is no number, it is not added; an existing mobile number and area code 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 in: Ask the IdP administrator for the actual attribute name; field mapping is not about writing a mobile number/email as a fixed value.
config.authSet.verify boolean Retained for compatibility and can be saved, but the current OIDC SDK does not consume this key, so it cannot be used to control requests/TLS; use the corresponding field actually read on this page.
Example: true
How to obtain or fill in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.method string Retained for compatibility and can be saved, but the current OIDC SDK does not consume this key, so it cannot be used to control requests/TLS; use the corresponding field actually read on this page.
Example: get
How to obtain or fill in: Obtain it from the official OIDC configuration assigned by the identity provider for the current client and the actual protocol documentation.
config.verifyTokenSet.authMethod string Retained for compatibility and can be saved, but the current OIDC SDK does not consume this key, so it cannot be used to control requests/TLS; use the corresponding field actually read on this page.
Example: get
How to obtain or fill in: Obtain it 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; must contain entityID, SSO service address, and key description. For modification, omission/an empty string preserves the old XML. When SAML submits a non-empty config, valid XML must also be backfilled. Do not pass it for OIDC; if only idpData changes for OIDC and there is no config, the identity digest may be written as None and cause a 500.
Allows null: False
Example: <IdP_METADATA_XML>
How to obtain or fill in: Download the complete valid IdP metadata XML from the SAML identity provider administrator and submit it as the original string.
config json Dynamic complete configuration object; required for OIDC creation. For modification, omission or {} preserves the old config; a non-empty object replaces it as a whole, not a recursive merge. For OIDC, you must backfill clientId/clientSecret/valid URLs, etc. SAML cannot submit only a non-empty config and omit idpData. Not all internal field types are strongly validated; successful saving does not prove the callback is usable.
Allows null: False
Example: {}
How to obtain or fill in: OIDC is constructed from the provider client/discovery document and protocol parameters; SAML is used only for optional claimMapping.
emailDomains array Y Required array; can be []; the server deduplicates it as a set. It is not a URL, regular expression, or wildcard with @; first-entry discovery matches by exact full email or domain, and existing SSO identities have separate namespace/workspace relationship rules. It cannot replace general access control. Modification replaces the allowlist as a whole; [] clears it.
Example: ["example.com"]
How to obtain or fill in: Use the complete email or email domain that is 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. Provider names that are not deleted in the same workspace must be unique; on modification, only a non-empty value overwrites the old name.
Maximum length: 64
$matchRegExp: [a-zA-Z_一-龥-]*
Example: ExampleIdP
How to obtain or fill in: A name that distinguishes the identity provider in the current workspace for business purposes.
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 role relationships and does not guarantee that all old roles of existing members are forcibly overwritten; 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 in: Select the default login role from the workspace Role List.
remark string Optional, allows an empty string; when omitted on creation, the constructed response may be null, and the database column has an empty string default; it is recommended to use an explicit empty string or valid text. Omitting it on modification clears it to "", not preserves it; the storage column is 512, and a unified upper limit is not publicly declared.
Allows null: False
Allows empty string: True
Example: 企业登录
How to obtain or fill in: The business party fills in a purpose remark.
tokenHoldTime integer Optional, 60..604800 seconds; when omitted on creation, the site default is used (repository baseline 604800 = 7 days); when omitted on modification, the old value is preserved. This is not the cache code validity period; do not use this value to expand the one-time authentication code consumption window.
Allows null: False
$minValue: 60
$maxValue: 604800
Example: 604800
How to obtain or fill in: Choose seconds according to the organization's idle session retention policy.
tokenMaxValidDuration integer Optional, 60..2592000 seconds; when omitted on creation, the site default is used (repository baseline 2592000 = 30 days); when omitted on modification, it is preserved. The statement “30 days = 604800” in older documentation is incorrect; this does not replace the idle retention duration.
Allows null: False
$minValue: 60
$maxValue: 2592000
Example: 2592000
How to obtain or fill in: Choose 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 in: Whether to notify the workspace Owner/administrators of configuration changes; for batch rehearsals, you 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 in the browser URL
getTokenSet $state, $code, $client_id, $client_secret, $redirect_uri, $scope, $grant_type; for other keys, if they match a callback parameter name, their value can be used; otherwise, treat them 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; you need to 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/sso_example/modify' \
  -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 before a new submission can be null.
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; old/new history may be null.
content.role string Default role identifier.
content.idpMd5 string Provider identity/account namespace digest, not a client secret or writable ID.
content.tokenHoldTime integer Idle session retention in seconds.
content.tokenMaxValidDuration integer Maximum login session in seconds.
content.isOpenSAMLMapping integer or boolean Role mapping switch 1/0; not equivalent to SSO configuration status.
content.status integer 0 enabled, 2 disabled; non-deleted reads may contain other historical states.
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 configuration after saving; the OIDC write response still contains stored ciphertext, not the Base64 asterisk mask from get, and it cannot be used directly for authentication or backfilling.
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 use the errors on this page. If omitted, you must explicitly provide the auth/token/userinfo endpoints; you cannot only set modeType=expert.
content.config.sslVerify boolean TLS verification switch for discovery requests. Defaults to true in the save phase; at runtime, the SDK defaults to true for HTTPS and false for HTTP. It is not a global switch for each endpoint's verify setting.
content.config.clientId string Required non-empty string for OIDC, must not have leading/trailing whitespace; obtained from IdP client registration, not a Studio API Key.
content.config.clientSecret string For OIDC, the write response contains server-side stored ciphertext and cannot be sent back as Base64 plaintext/mask; to retain the secret on modification, first call get to obtain the mask.
content.config.grantType string Optional authorization_code/code; omitted at runtime defaults to authorization_code. This is not client_credentials or password authorization.
content.config.scope array Optional string array; at runtime the SDK defaults to only [openid], not the openid/profile/email in older documentation. Ensure the IdP actually provides the claims required by the account, such as email; an empty array generates an empty scope, so clients should explicitly configure a reasonable value.
content.config.scope[] string Scope allowed by a single IdP; not a permission point in this workspace.
content.config.authSet json Authorization redirect parameter object; can be omitted so the address is backfilled from the discovery document.
content.config.getTokenSet json Code-to-token request object; the endpoint can be omitted and taken from the discovery document.
content.config.verifyTokenSet json JWK object for id_token signature verification; this does not immediately initiate token authentication to save the configuration.
content.config.getUserInfoSet json User info source/request object; default origin, not id_token as in older documentation.
content.config.claimMapping json Mapping from account fields to actual IdP attribute names, not role mapping rules. OIDC save does not strictly validate each item, so the callback must be tested in practice; a non-empty SAML mapping must also provide non-empty username/email, 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, the authorization_endpoint from the discovery document is used; 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; required items must be fully retained. Keys are IdP parameter names; values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
content.config.authSet.paramMapping.目标参数名 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 are not automatically taken from arbitrary internal context.
content.config.getTokenSet.url string Optional explicit HTTP(S) URL. If not provided, the token_endpoint from the discovery document is used; 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. Configure them separately; sslVerify does not replace them uniformly.
content.config.getTokenSet.paramMapping json Optional non-standard request parameter mapping. When non-empty, it replaces the corresponding default parameter set; required items must be fully retained. Keys are IdP parameter names; values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
content.config.getTokenSet.paramMapping.目标参数名 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 are not automatically taken from arbitrary internal context.
content.config.verifyTokenSet.url string Optional explicit HTTP(S) URL. If not provided, the jwks_uri from the discovery document is used; 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. Configure them separately; sslVerify does not replace them uniformly.
content.config.getUserInfoSet.url string Optional explicit HTTP(S) URL. If not provided, the userinfo_endpoint from the discovery document is used; 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. Configure them separately; sslVerify does not replace them uniformly.
content.config.getUserInfoSet.paramMapping json Optional non-standard request parameter mapping. When non-empty, it replaces the corresponding default parameter set; required items must be fully retained. Keys are IdP parameter names; values can be $ variables allowed on this page or fixed strings. Do not map clientSecret into the authorization redirect URL.
content.config.getUserInfoSet.paramMapping.目标参数名 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 are not automatically taken from arbitrary internal context.
content.config.getTokenSet.method string Optional get/post, default post; runtime supports only these two. Saving does not enforce this enumeration; other values will cause errors during subsequent logins.
content.config.getTokenSet.authMethod string Optional basic/client_secret_basic (Basic header by default), client_secret_post (form containing ID and secret by default), none (only client_id by default, without automatically including the secret). When custom paramMapping is present, parameters are generated according to the complete mapping; the Basic header still follows the selected authentication method.
content.config.getUserInfoSet.method string Default get. In the current SDK, the non-get branch still sends GET but places parameters in the Body; this is not a true POST. An IdP that requires POST cannot be considered supported merely because saving succeeded; use a verified GET endpoint.
content.config.getUserInfoSet.authMethod string Default bearer header; client_secret_basic uses the Basic header; none places access_token in parameters by default. Do not treat the basic alias or any other arbitrary value as equally effective.
content.config.getUserInfoSet.source string origin calls userinfo (default); id_token verifies and reads id_token; merge uses id_token first and then userinfo overrides keys with the same name. Saving does not enforce the enumeration; other values may ultimately produce 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, unlike the attribute names 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 retrieve keys. These are not private keys; do not use the example placeholder material as actual 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 in Base64url.
content.config.verifyTokenSet.keys[].e string RSA public exponent in 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 as a Base64 DER array, optional.
content.config.verifyTokenSet.keys[].x5c[] string A single public certificate; does not contain a private key.
content.config.verifyTokenSet.keys[].其他公开字段 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 Defaults to preferred_username for OIDC and username for SAML. When SAML explicitly has a non-empty claimMapping, this is required as a non-empty string.
content.config.claimMapping.email string Defaults to email; actual login must obtain a valid email. Required when SAML explicitly has a non-empty claimMapping; OIDC save does not validate the value/source, 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 Defaults to phone_number for OIDC and mobile for SAML; an explicit empty string means no extraction. If there is no number, it is not added; an existing mobile number and area code 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 Retained for compatibility and can be saved, but the current OIDC SDK does not consume this key, so it cannot be used to control requests/TLS; use the corresponding field actually read on this page.
content.config.verifyTokenSet.method string Retained for compatibility and can be saved, but the current OIDC SDK does not consume this key, so it cannot be used to control requests/TLS; use the corresponding field actually read on this page.
content.config.verifyTokenSet.authMethod string Retained for compatibility and can be saved, but the current OIDC SDK does not consume this key, so it cannot be used to control requests/TLS; use the corresponding field 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; must be registered in the IdP's allowed callback list.
content.metadataURL string SAML SP metadata address only.
content.entiryID string SAML SP entity ID only; retain the actual protocol spelling entiryID and do not change it to entityID.
content.assertionURL string SAML ACS/assertion callback address only; register according to the actual return.
content.declaration object or null Workspace public declaration attached to a non-empty business object; may be null or an empty object when not configured; an empty object is not added. The exact pagination position 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 using this placeholder text). The modification target must originally be SAML.

curl --request POST '<Endpoint>/api/v1/sso/sso_example/modify' \
  -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 (secret is a stored ciphertext placeholder and cannot be backfilled):

{
  "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 the field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The top level of Body is not a JSON object Some json file format error Submit a complete object containing the fields on this page.
406 ft.ParameterValidationFailed Invalid SAML claimMapping structure, or declared field type/enum/range mismatch 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 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 Get a valid role from the current workspace role list; do not use the display name.
406 ft.InvalidSAML SAML lacks valid XML, metadata lacks entity/service/key descriptions, or a non-empty config is modified without backfilling valid idpData Invalid SAML configuration Download the actual complete metadata XML from the IdP; when updating field mappings, backfill the original valid XML together.
400 ft.SsoModeTypeInvalid OIDC modeType is not easy/expert modeType parameter is invalid Choose according to the enumeration on this page.
400 ft.SsoClientIdInvalid clientId is empty/not a string, or has leading/trailing whitespace clientId parameter is invalid Use the original client ID assigned by the IdP.
400 ft.SsoClientSecretInvalid clientSecret is invalid Base64 UTF-8, decodes to empty/all asterisks on creation, or a non-empty config lacks a valid clientSecret string clientSecret parameter is invalid For creation, encode the actual secret; to retain the old value on modification, use the Base64 asterisk mask returned by get and do not backfill the stored ciphertext.
400 ft.SsoSSLVerifyInvalid SSL verification for the discovery document request fails 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 URL and service response; do not use the login page URL instead.
400 ft.SsoVerifyWellKnowURLInvalid 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 Explicit authSet.url is not a valid HTTP(S) address {} parameter is invalid Use the official authorization_endpoint.
400 ft.SsoTokenEndPointInvalid Explicit getTokenSet.url is invalid {} parameter is invalid Use the official token_endpoint.
400 ft.SsoVerifyTokenSetInvalid Explicit verifyTokenSet.url is invalid {} parameter is invalid Use the official JWKS URL.
400 ft.SsoUserInfoEndPointInvalid Explicit getUserInfoSet.url is invalid {} parameter is invalid Use the official userinfo_endpoint.
400 ft.SsoOIDCUrlsInvalid No wellKnowURL and the auth/token/userinfo endpoints are incomplete url parameter is invalid Provide all three official addresses; saving does not mean the entire protocol has been accepted.
400 ft.SsoGrantTypeInvalid grantType is not authorization_code/code Invalid grantType; currently only code and authorization_code are supported Change to a supported authorization method.
400 ft.SSOEsistsSameSupplier Duplicate non-deleted provider name in the same workspace; on modification, exclude itself 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; on modification, exclude itself A configuration with the same metadata already exists Check the existing provider; do not create the same identity again by changing the display name.
500 ft.InternalServerError An uncaught exception occurs in dynamic config/email element shape, 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; 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 The member cleanup target triggered by an identity change includes the workspace Owner Invalid operation; the owner cannot be removed First check the associated account and alternative administrator access; do not assume that neither the configuration nor members changed because of the failure.
400 ft.AgentMemberCanNotDelete Identity changes trigger shared member cleanup and hit an agent member that cannot be deleted Members from agent sources 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?