Running the sample
- Start the Identity Server, using the startup script found in the
[IS_Home]/bin
directory.wso2server.sh
for Linuxwso2server.bat
for Windows
- Download and Install Apache Ant, if you have not already done so.
- Refer the
client.properties
file for SCIM user endpoint, group endpoint URLs, username and password. Modify it if the default configuration to run the sample are different. - Copy the
scim-provisioning
folder to the Identity Server's samples directory[IS_Home/samples/].
- Using the command line, navigate inside the
scim-provisioning
directory[IS_Home/samples/scim-provisioning]
and run theant
command.
Users
Creating a user
- Run the
ant create-user
command at this directory level in the command line and observe the JSON message sent to the SCIM endpoint, the response status and the SCIM response printed in the command line output. - Log in to the Identity Server and go to Users and Roles>List in the Main menu in the management console.
- Click Users and you can now view a new user created in the list using the sample.
To add more attributes to the create user method, you can modify the org.wso2.scim.sample.user.CreateUser
class accordingly and observe the output in the command line.
Updating a user
Run the
ant update-user
command at this directory level in the command line and observe the JSON message sent to the SCIM endpoint, the response status and the SCIM response are printed in the command line output.You will notice that the user created in the step 4 above, is updated with new attribute values for: display name and work email. If you wish, you can modify the org.wso2.scim.sample.user.UpdateUser class to add more attributes to user and observe the output in the commandline.
- Go to Users and Roles>List in the Main menu in the management console of IS.
Click Users and select the user created in the first step. You will notice that the user is updated with new attribute values for display name and work email.
To add more attributes to the create user method, you can modify the
org.wso2.scim.sample.user.UpdateUser
class accordingly and observe the output in the command line.
Groups
Creating a group
- Run the
ant create-group
command at this directory level in the command line and observe the JSON message sent to the SCIM endpoint, the response status and the SCIM response printed in the command line output. - Go to Users and Roles>List in the Main menu in the management console of IS.
- Click Roles and you can now view a new group created in the list, and the new user that was assigned to that role using the sample.