Skip to content

Delete SSO Custom Mapping Rule



POST /api/v1/login_mapping/field/{lgmp_uuid}/delete

Overview

Delete a custom login mapping rule in this workspace.

Before Calling and Usage Steps

This group maintains Deployment Plan custom login attribute mappings with isSystem=false in the current workspace. This differs from SAML mappings that bind identity providers by ssoUUID and from External/Inner system mappings. For it to take effect, the workspace must also enable isOpenCustomMappingRule; you can configure the switch in Custom Mapping and verify the login policy. Saving/deleting only changes the rule; it does not immediately change roles for existing members or revoke existing sessions; subsequent LDAP/OIDC shared login flows re-match based on the actual userinfo.

Matching uses top-level userinfo attributes: arrays are compared element by element using str(value), other values are compared as Python string representations, and fields and values use database equality semantics (case sensitivity/collation are determined by the deployment database). No regex/contains or nested path extraction is performed; use only stable strings from the identity source. When multiple rules match, their roles are unioned and then filtered to available roles. When the workspace custom switch is enabled, it takes precedence over system rules: if there is a match, roles are usually reset; if there is no match, the original association may be cleared; existing Owner roles have protection logic. Use a dedicated test identity to verify actual permissions first; do not assume that the roles on the next login will be correct based solely on this HTTP success.

Soft-deletes the mapping configuration; does not delete the target role or account, and does not immediately revoke roles/sessions already held by members. For subsequent logins, if the custom switch is enabled, lack of a match may still clear the original role relationship; deletion does not mean "future login permissions remain unchanged". Nonexistent/cross-workspace/system or inactive records return LoginMappingNoExists. Before deletion, audit and resolve the old target roles; an empty old set or no visible records may also result in a 404 and the deletion not being completed. After a timeout/error, first check the list to confirm the final record state before deciding whether to retry.

Path Parameters

Parameter Name Type Required Description
lgmp_uuid string Y Single delete only operates on active objects with status=0.
Example: lgmp_example
How to obtain or enter: Obtain the lgmp_ UUID from the current workspace's custom mapping list.

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 enter: Obtain an OpenAPI Key with permission for this operation from API Key Management in the target workspace.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/login_mapping/field/lgmp_example/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

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

Field Type Description
content boolean true on success; the number of deleted records is not returned.
{
  "code": 200,
  "content": true,
  "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
404 ft.NotFoundRole The target/existing mapping role set has no matching visible role records, including []; this may also be triggered when auditing and resolving old roles for single or batch deletion The specified role was not found or has been deleted First check the workspace's role list and mapping list. Any unknown role parts mixed in are filtered out; historical empty/no-match sets cannot be directly assumed to be deletable and must be handled after administrator repair.
500 ft.InternalServerError An uncaught exception occurred in mapping/role/database storage or data formatting Internal error First check the mapping rule list by the UUID to be deleted to see whether it still exists, and confirm any possible partial-hit deletion state before proceeding. The API does not provide per-item deletion results; retain the traceId and do not infer from a failed response that all items were not deleted.
404 ft.LoginMappingNoExists A single UUID does not belong to a mapping in this workspace with isSystem=false and status=0 The specified Login Mapping was not found Retrieve the lgmp_ UUID again from this workspace's list; system rules or inactive records cannot be operated through this single-item entry.

Feedback

Is this page helpful?