[英]Getting following error while creating a user in WSO2 IS 5.9.0 using scim API?
[英]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"
}
]
}
以下将使用“补丁”操作将具有 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"
}
]
}
}
]
}
Bellow 是完整的 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.