Webservice Connector - Aggregation - Context Url Variable

This is a difficult use case given there is no endpoint to know if someone has the account or not. I’d agree with the above statement for chaining, but there is two caveats I can think of: You will have equal number of accounts on the source as there are identities in the system even if the second call doesn’t get a user and needing two separate authentications.

I’d definitely recommend keeping your source base configuration set to the target source so other operations can leverage it. Keep the IdentityNow specific information manually added.

Here are some thoughts for steps I have:

  1. Configure the connector to use the legacy API baseURL and authentication.
  2. Configure a 2 step aggregation:
    2.1 Configure the first as the list identities with a single mapping response to the attribute you are searching. Ensure you complete pagination on this.
    2.1.1 Use a before operation rule to:
    2.1.1.1 Get the authentication token for IdentityNow using the restClient.executePost()
    2.1.1.2 Attach the authentication token to the header of the requestEndpoint.
    Note: You should be able to store the PAT Client ID and Secret on the “connectorAttributes” of the source schema to be accessed in the rule under the “application” object. Just be sure to add the secret to the encrypted values list on the source schema.
    Note: You may be able to avoid the before rule if you split this into multiple operation steps (ex. First get the token, Second get the list and pass the token) - I am not sure if this will work or not I’ve never done this.
    2.2 Setup second step of aggregation for /api/emp=$response.id$

You may need an after operation rule that prunes the returned objects to only the ones that were found in the second operation.

If the two step approach doesn’t work, you can use the first operation (list-identities) and the before rule, but also use an after operation rule to make the call to the target system (restClient.executeGet()) using the response objects and then prune the not found ones as you go. Then fill the response body with the collected attributes. Here is an example similar to doing this: Webservice Connector - Create Account Operation - Empty Response - #6 by bcariaga

I may be over complicating this, so others feel free to correct me or offer a better solution.

Let me know if you give this a shot and how it goes for you :slight_smile: