0
votes

I'm testing WSO2 5.10 user creation via SCIM Rest API using the following curl command

curl -v -k --user admin:admin --data "{"schemas":[],"name":{"familyName":"Smith","givenName":"John"},"userName":"john","password":"password","emails":[{"primary":true,"value":"[email protected]","type":"home"},{"value":"[email protected]","type":"work"},{"value":"[email protected]"}],"EnterpriseUser":{askPassword:"true"}}" --header "Content-Type:application/json" https://localhost:9443/scim2/Users 

It creates a user as expected but doesn't send an email to set up a password. However, when an admin tries to create a user through the management console for the same scenario, the user receives an email to set up a password. But not through this API request.

What am I doing wrong?

1

1 Answers

1
votes

You need to set the askPassword attribute under the urn:ietf:params:scim:schemas:extension:enterprise:2.0:User schema as true in the SCIM2 user create request. So try the request as below,

curl -v -k --user admin:admin --data '{"schemas":[],"name":{"familyName":"Smith","givenName":"John"},"userName":"john","password":"password","emails":[{"primary":true,"value":"[email protected]","type":"home"},{"value":"[email protected]","type":"work"},{"value":"[email protected]"}],"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{askPassword:"true"}}' --header "Content-Type:application/json" https://localhost:9443/scim2/Users

Please refer the official documentation for more details.