I'am try to create user with external claims via scim2 api. First i create claim http://wso2.org/claims/inn
Then i add claim to schema: urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
Finaly i sending request to create user:
{
"schemas": ["urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"],
"name": {
"familyName": "TryAddClaims",
"givenName": "rest11@test.com"
},
"userName": "rest11@test.com",
"password": "admin",
"emails": [{
"primary": true,
"value": "rest11@test.com",
"type": "home"
}
],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{
"organization": "rest_organization",
"inn": "inn"
}
}
response:
{
"emails": [
{
"type": "home",
"value": "rest11@test.com"
},
"rest11@test.com"
],
"meta": {
"created": "2022-09-12T07:43:20.474255Z",
"location": "my-host/scim2/Users/1d64942c-ce24-48cf-ad47-665f4f9c37f8",
"lastModified": "2022-09-12T07:43:20.474255Z",
"resourceType": "User"
},
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"roles": [
{
"type": "default",
"value": "Internal/everyone"
},
{
"display": "everyone"
}
],
"name": {
"givenName": "rest11@test.com",
"familyName": "TryAddClaims"
},
"id": "1d64942c-ce24-48cf-ad47-665f4f9c37f8",
"userName": "rest11@test.com",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
"organization": "rest_organization"
}
}
why inn not present in the response, but organization with same config is present? In wso2 admin panel inn also empty for this user.
Seems you have missed adding attribute definition to the scim2-schema-extension.config file located in the <IS_HOME>/repository/conf/ folder.
Check Add an Attribute Definition section in https://medium.com/p/71621f62c5d3 or Refer to the official documentation: https://is.docs.wso2.com/en/5.9.0/develop/extending-scim2-user-schemas/#extending-the-scim-20-api
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.