This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Consuming SCIM Rest Endpoints

This sample demonstrates how to consume SCIM Rest Endpoints in WSO2 Identity Server from a JAVA client application based on HttpClient.

Step 1: Steps to run the sample:

  1. Start the Identity Server, using the startup script found in the [IS_Home]/bin folder.

    Use wso2server.sh for Linux and wso2server.bat for Windows.

  2. Make sure you have installed Apache Ant.
  3. Refer to the client.properties file for SCIM user endpoint, group endpoint URLs, username and password.
  4. Modify it if the default configuration to run the sample is different.

Step 2: Sample for creating a user:

  1. Run the command: 'ant create-user' 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.
  2. The new user is created in Identity Server.
  3. If you wish, you can modify the org.wso2.scim.sample.user.CreateUser class to add more attributes to the created user and observe the output in the command line.

Step 3: Sample for creating a group:

  1. Run the command: 'ant create-group' 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.
  2. The new group is created in the Identity Server and the user created in Step 2 is added to the group.

Step 4: Sample for updating user identity information:

  1. Run the command: 'ant update-user' at this directory level in 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.
  2. The user created in the Step 2 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 command line.

Step 5: Sample for updating group:

  1. Run the command: 'ant update-group' at this directory level in 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.
  2. You will notice that the group created in the step 5 above, is updated with new attribute values for: display name.

Step 6: Sample for deleting user:

  1. Run the command: 'ant delete-user' at this directory level in command line and observe the response status and the SCIM response printed in the command line output.
  2. The user created in Step 2 is now deleted in Identity Server.

Step 7: Sample for deleting group:

  1. Run the command: 'ant delete-group' at this directory level in command line and observe the response status and the SCIM response printed in the command line output. If the
  2. The group created in Step 3 is now deleted in Identity Server.
  3. Provisioning SCIM operations to other SCIM providers.

You can also observe the provisioning of above SCIM operations to other SCIM providers - such as other Identity Server nodes by configuring SCIM providers in the current Identity Server node, as described in the documentation which can be found here.