Enable/Disable SSO Configuration¶
POST /api/v1/sso/{sso_uuid}/set_disable
Overview¶
Enable or disable the SSO provider login configuration.
Before Calling and Usage Steps¶
Only the SSO configuration status is updated: true disables and false enables, and the XML/OIDC/whitelist/role mapping are retained in both cases. No client is deleted from the IdP and no IdP account is modified. After disabling, the configuration is no longer used as an active login entry; asynchronous workspace/member cache refresh may cause existing SSO identities to fail subsequent access, so do not treat this as "only blocking new logins while old sessions remain completely unaffected".
Re-enabling does not re-validate the XML, discovery document, client secret, default roles, or whether all mappings can match. status=0 does not prove that real login has been restored; validate by running the actual flow with a test identity. The API itself does not perform that login. This page has no needNotify parameter; after each successful controller run, it attempts to notify the workspace Owner/administrators and audit. Do not directly apply the notification switches from create/modify.
The status is committed first, then the cache task is dispatched; while the asynchronous task is incomplete there may be brief inconsistency. A dispatch exception may return 500 even though the status has already changed, so read it back with get first. The email helper records failures and swallows them, and does not roll back the status because of them.
Route Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| sso_uuid | string | Y | UUID of the current provider, not an fdmp_ mapping, IdP digest, or client ID.Example: sso_exampleHow to obtain or fill in: Get a non-deleted configuration from content[].uuid in the SSO list of the current workspace. |
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 in: Obtain an OpenAPI Key with permission for this operation from API Key management in the target workspace. |
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| isDisable | boolean | Y | Required boolean; sets status=2/0; does not change isOpenSAMLMapping or its mapping rows.Allows null: False Example: trueHow to obtain or fill in: true disables the provider, false enables it. |
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/sso/sso_example/set_disable' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"isDisable":true}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.name | string | Display name of the processed provider; an empty name may be an empty string. |
| content.declaration | object or null | Workspace common 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 position of pagination is subject to the structure of this page. |
{
"code": 200,
"content": {
"name": "ExampleIdP",
"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 | Handling |
|---|---|---|---|---|
| 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 | Request JSON syntax is invalid | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | The top level of the Body is not an object | Some JSON file format error | Submit the object containing the isDisable boolean. |
| 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. |
| 500 | ft.InternalServerError | An unhandled exception occurs during database status commit, workspace/member cache task dispatch after commit, or auditing | Internal error | Read back status with get first, then investigate cache refresh and auditing. The status may already be committed; do not treat the failure as completely unchanged. This operation does not clean up member associations. |