Jaan
Jaan

Reputation: 298

Add complex attirubtes as the sub attribute of another complex attribute of wso2Extension via SCIM endpoints

I want to add a complex attribute as a sub attribute of another complex attribute of wso2Extension via SCIM endpoints. I have successfully added a complex attribute as a sub attribute of wso2Extension to the user profile via SCIM rest endpoints.

Given below the working curl command to add a complex attribute named patient as sub attribute of wso2Extension to the user profile.

curl -v -k --user admin:admin --data "{"schemas":[],"userName":"SureshAtt","password":"Wso2@123","wso2Extension":{"employeeNumber":"000111","costCenter":"111111","organization":"WSO2Org","division":"Engineering","department":"Intigration","patient":{"firstName":"Test Patient","displayName":"Test Patient"}}}" --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users

Now i want to add a complex attribute named professional as a sub attribute of another complex attribute of wso2Extension, I tried with the following curl command.

curl -v -k --user admin:admin --data "{"schemas":[],"userName":"SureshAtt","password":"Wso2@123","wso2Extension":{"employeeNumber":"000111","fax":"1233","costCenter":"111111","organization":"WSO2Org","division":"Engineering","department":"Intigration","patient":{"professional":{"firstName":"Test Patient","displayName":"Test Patient"}}}}" --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users

User created successfully, But no custom attributes are in the profile.

Please help

Upvotes: 0

Views: 212

Answers (1)

Pushpalanka
Pushpalanka

Reputation: 877

What is shown is UI, under user profile are taken from the Claim Dialect 'claims.wso2.org'. When we add claims via SCIM, it's the SCIM core schema that is used. If you want to see the above attributes in the profile you should do the following.

  1. Map both the claim from WSO2 claim dialect and SCIM core dialect to same user store attribute.
  2. In WSO2 claim dialect, configure those claims to be 'supported by default'.

Then you should be able to see the attributes in user profile. I assume you have configured the file 'scim-schema-extension.config' properly according to your custom properties and the property 'true' is set in 'provisioning-config.xml'.

Upvotes: 0

Related Questions