如何使用 scim2 api 在 wso2 中添加用户时添加 roles/group 是 5.9.0?
How to add roles/group while adding a user in wso2 is 5.9.0 using scim2 apis?
我正在尝试使用此 api-https://localhost:9443/scim2/Users
创建用户
如何将此用户添加到已创建的组中?能否请您提供有效载荷
我的负载-
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"name": {
"familyName": "jackson",
"givenName": "kim"
},
"userName": "test2",
"password": "abc123",
"postalcode":"56789",
"profileUrl":"gmail.com",
"emails": [
{
"type":"default",
"value":"a@gmail.com"
},
{
"value": "kim.jackson@gmail.com",
"type": "home"
},
{
"value": "kim_j@wso2.com",
"type": "work"
}
]
}
以下将使用 "Patch" 操作将 SCIM id 为“81cbba1b-c259-485d-8ba4-79afb03e5bd1”的用户 "Kris" 添加到组中。
{
"schemas":[
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations":[
{
"op":"add",
"value":{
"members":[
{
"display":"Kris",
"$ref":"https://localhost:9443/scim2/Users/81cbba1b-c259-485d-8ba4-79afb03e5bd1",
"value":"81cbba1b-c259-485d-8ba4-79afb03e5bd1"
}
]
}
}
]
}
下面是完整的 CURL 命令。您可以随时参考 [1] 获取 API 信息。
curl -v -k --user admin:admin -X PATCH -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"add","value":{"members":[{"display": "Kris","$ref":"https://localhost:9443/scim2/Users/81cbba1b-c259-485d-8ba4-79afb03e5bd1","value": "81cbba1b-c259-485d-8ba4-79afb03e5bd1"}]}}]}' --header "Content-Type:application/json" https://localhost:9443/scim2/Groups/a43fe003-d90d-43ca-ae38-d2332ecc0f36
[1] https://docs.wso2.com/display/IS570/apidocs/SCIM2-endpoints/#!/operations#GroupsEndpoint#patchGroup
我正在尝试使用此 api-https://localhost:9443/scim2/Users
创建用户如何将此用户添加到已创建的组中?能否请您提供有效载荷
我的负载-
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"name": {
"familyName": "jackson",
"givenName": "kim"
},
"userName": "test2",
"password": "abc123",
"postalcode":"56789",
"profileUrl":"gmail.com",
"emails": [
{
"type":"default",
"value":"a@gmail.com"
},
{
"value": "kim.jackson@gmail.com",
"type": "home"
},
{
"value": "kim_j@wso2.com",
"type": "work"
}
]
}
以下将使用 "Patch" 操作将 SCIM id 为“81cbba1b-c259-485d-8ba4-79afb03e5bd1”的用户 "Kris" 添加到组中。
{
"schemas":[
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations":[
{
"op":"add",
"value":{
"members":[
{
"display":"Kris",
"$ref":"https://localhost:9443/scim2/Users/81cbba1b-c259-485d-8ba4-79afb03e5bd1",
"value":"81cbba1b-c259-485d-8ba4-79afb03e5bd1"
}
]
}
}
]
}
下面是完整的 CURL 命令。您可以随时参考 [1] 获取 API 信息。
curl -v -k --user admin:admin -X PATCH -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"add","value":{"members":[{"display": "Kris","$ref":"https://localhost:9443/scim2/Users/81cbba1b-c259-485d-8ba4-79afb03e5bd1","value": "81cbba1b-c259-485d-8ba4-79afb03e5bd1"}]}}]}' --header "Content-Type:application/json" https://localhost:9443/scim2/Groups/a43fe003-d90d-43ca-ae38-d2332ecc0f36
[1] https://docs.wso2.com/display/IS570/apidocs/SCIM2-endpoints/#!/operations#GroupsEndpoint#patchGroup