云SSO支持的SCIM_2.0接口 PATCH更新用户 功能描述 使用PATCH方法部分更新用户信息。 使用约束 {id}必传,为用户的UUID 支持的操作:add、replace、remove 支持修改的字段:userName、active、externalId、displayName、name、emails、phoneNumbers、addresses等 remove操作仅支持phoneNumbers字段 remove操作不支持userName和active字段 请求示例 示例1:替换用户电话号码 plaintext curl header 'Authorization: Bearer ' header "ContentType: application/scim+json" X PATCH d '{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "replace", "path": "phoneNumbers.value", "value": "13900139000" } ] }' 示例2:更新用户状态 plaintext curl header 'Authorization: Bearer ' header "ContentType: application/scim+json" X PATCH d '{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "replace", "path": "active", "value": false } ] }' 示例3:移除电话号码 plaintext curl header 'Authorization: Bearer ' header "ContentType: application/scim+json" X PATCH d '{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "remove", "path": "phoneNumbers.value" } ] }' 返回示例 plaintext { "id": "0241a77e06ab4214b8b86721304bde8e", "externalId": "external001", "meta": { "resourceType": "User", "created": "20251020T01:26:50Z", "lastModified": "20251020T01:49:20.241Z", "location": "/sso/api/scim/v2/Users/0241a77e06ab4214b8b86721304bde8e" }, "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName": "user01", "name": { "formatted": "张三", "givenName": "张三" }, "displayName": "张三", "active": true, "emails": [ { "value": "newemail@example.com", "type": "work", "primary": true } ], "phoneNumbers": [ { "value": "13900139000", "type": "work" } ] }