Testing with Postman

Testing Overview

This page uses Postman in order to manage users accessing your application. Postman is a HTTP testing API application that helps you monitor requests and responses. In this explanation, we will use Postman to test SCIM methods and manage users and roles in the Idaptive Directory. Other methods are available (such as cURL), but are not shown step-by-step in this explanation.

📘

For other information regarding other management methods, visit https://curl.haxx.se/.

Make sure that you have set up your SCIM Client User and created the SCIM Client Application (mentioned in the previous pages), as well as read the explanations for the RESTful API requests.

Importing the SCIM 2.0 Collection

The SCIM 2.0 Collection is available to be used through Postman:

SCIM 2.0Run in PostmanRun in Postman

RESTful API Request Testing

The first step is to create an environment in Postman. An environment is a location to store environment variables which pertain only to certain boundaries. In this case, we create a SCIM environment that stores variables that are only used for the SCIM 2.0 Collection.

  1. Click the Settings icon in the top right and select the orange Add button. Enter a convenient name for your environment (e.g. SCIM 2.0), and select Add again.
10721072
  1. Select your created environment in the No Environment dropdown menu in the top right. Your environment is now available to edit, and the testing process can begin.
462462

📘

The following commands are available in the Users and Groups folders when expanding the SCIM 2.0 Collection.

GET all users

https://{{tenant_id}}.my.idaptive.app/scim/Users?

  1. Initially, GET all users will not work since you do not have the correct authorization. You are missing your bearer token and tenant ID. However, sending the request once creates three variables in your environment. You can access these variables by selecting Environment Quick Look next to the settings icon.
10801080
  1. Copy the Bearer Token (located in Actions in your SCIM App Settings) and save the information to the environment variable bearer_token.
25222522
  1. Take the tenant ID used to access the Idaptive Admin Portal (e.g. abc1234) and save it as the environment variable tenant_id.
15001500
  1. If you send the request through the endpoint, you see that the response lists all users' information. This means that the GET all users method worked successfully.
19841984

GET one user

https://{{tenant_id}}.my.idaptive.app/scim/Users/{{user_id}}?

  1. The username environment variable isolates user information. Enter the SCIM username you created in the Admin Portal (e.g. [email protected]) in the username section.
10781078
  1. Running GET all users once more creates the variable user_id, and finds the user ID that matches your username.
10791079
  1. In turn, this allows you to send the GET one user request. The response includes only your SCIM user's information.
19891989

POST one user

https://{{tenant_id}}.my.idaptive.app/scim/Users?

  1. POST one user will create a new SCIM user. By going to the Body section, you can customize information regarding the created user. The default created user will have the username test with the password testTEST1234.
19871987
  1. Sending the POST one user request creates an environment variable called created_user_id. This is the user ID of the created user.
10801080
  1. In order to verify the POST one user command, Postman will send you a response list of the created user's information. You can also go to the Users submenu in the Admin Portal to see your created user.
19871987

PUT one user

https://{{tenant_id}}.my.idaptive.app/scim/Users/{{scim_created_id}}?

When sent, the PUT one user request updates the display name of your newly created user to putSuccessful.

  1. You can check your SCIM user in the Admin Portal to validate the test, or you can run the GET all users method to return the user information.
19631963

PATCH one user

https://{{tenant_id}}.my.idaptive.app/scim/Users/{{scim_created_id}}?

Running the PATCH command updates the display name of the created user to patchSuccessful.

  1. You can validate this by checking the SCIM user in the admin portal or by running the GET all users method and seeing the changed display name.
19891989

DELETE one user

https://{{tenant_id}}.my.idaptive.app/scim/Users/{{scim_created_id}}

When sent, the DELETE one user request will delete the created user.

  1. Running the code will not return anything, since the user's information is deleted. In order to test this method, you can check the Admin Portal users or use the GET all users method.
19831983

📘

If you run the DELETE method more than once, you will receive an error. This does not mean that the DELETE method stopped working; rather, since there is no test user information, the global variable scim_created_id is invalid.

GET all groups

https://{{tenant_id}}.my.idaptive.app/scim/Groups

  1. No prior configuration is needed. A successful test will return all the roles of the application and their corresponding users.
19851985

GET one group

https://{{tenant_id}}.my.idaptive.app/scim/Groups/{{role_id}}

  1. The method GET all groups creates a new environment variable rolename. Enter the name of the SCIM role created that gives the SCIM user access to the OAuth 2.0 Client Application.
10761076
  1. Sending the GET all groups request once more creates the role_id variable, which finds the corresponding ID of rolename.
10731073
  1. The GET one group request now isolates a single role's information according to the role ID.
19611961

POST one group

https://{{tenant_id}}.my.idaptive.app/scim/Groups

  1. POST one group will create a new SCIM role. By going to the Body section, you can customize information regarding the created role, such as editing members of the role, changing the role name, and assigning administrative rights. The default created role will have the name SCIM Created Role.
10001000
  1. Sending the POST one group request creates an environment variable called created_role_id. This is the role ID of the created role.
10761076
  1. In order to verify the POST one group command, Postman will send you a response list of the created role's information. You can also go to the Roles submenu in the Admin Portal.
19601960

PUT one group

https://{{tenant_id}}.my.idaptive.app/scim/Groups/{{scim_created_role_id}}

When run, the method changes the name display of the created role to putSuccessful.

  1. In order to verify this test, you can either check the Roles submenu in the Admin Portal or perform a GET all roles command to locate the name display of the SCIM Client role.
19611961

PATCH one group

https://{{tenant_id}}.my.idaptive.app/scim/Groups/{{scim_created_role_id}}

Running the PATCH command updates the display name of the created role to patchSuccessful.

  1. You can validate this by checking the SCIM roles in the admin portal or by running the GET all groups method.
19651965

DELETE one group

https://{{tenant_id}}.my.idaptive.app/scim/Groups/{{scim_created_role_id}}

DELETE one group deletes the role, but not the users associated with the role. The method will not return information, since the request carries out a function and does not edit or create a role.

  1. In order to verify the request, you can check the Roles submenu or run the GET all groups method to return all roles. The created role will not appear in any of these tests.
19611961