Linking Create HTTP Operation Back to Identity

Hello. Does anyone knows of a good way for getting a Create HTTP Operation for a Web Services source in ISC to link the response from the used Create API Call to properly link to the Native Identity for subsequent operations?

The tricky part is the response is just the ID not JSON formatted and not in quotation marks so it just returns something like this: 1234-AB456 and that value needs to link to the source account on the Identity that was just created without a manual aggregation.

Thanks for any assistance that can be provided!

am not sure if this work, let us try:
root path you may leave blank, in response mapping schema attribute as ID and attribute path as RESPONSE_BODY

and in subsequent call use $account.id$

Hello. Thank you for your suggestion. Unfortunately putting “RESPONSE_BODY” as the attribute path still ended up having ??? as the nativeIdentity after the initial create response.

hi Kevin, If ID is your account id and you get only the ID generated in your create account endpoint as a response then you have to use WebServiceAfterOperationRule to map the response that you received with ID and return that. So if ID is your nativeIdentity then the logic would go something like this

Map updatedMapInfo = new HashMap();
List finalList = new ArrayList();

if (rawResponseObject != null && !rawResponseObject.trim().isEmpty()) {
    if (!rawResponseObject.startsWith("{") && !rawResponseObject.startsWith("[")) {
        Map createAccountMap = new HashMap();
        createAccountMap.put("ID", rawResponseObject);
        finalList.add(createAccountMap);
    }
}

updatedMapInfo.put("data", finalList);
return updatedMapInfo;

Then your create account operation you can have rootPath as “$” and response mapping you can have it mapped with ID for both schema and attribute path.

In the other operations you can use $plan.nativeIdentity$ to refer this nativeIdentity.

1 Like

Hi @udayputta, thanks for your response. I tried implementing an after operation rule with similar logic and when trying to update the “id” field that corresponds back to the Native Identity I am getting the following error:

Exception occurred while performing ‘Create’ operation on identity ‘null’: Error: The application script threw an exception: sailpoint.connector.ConnectorException: 400

When I update ID I am not seeing the error but am also not seeing the Native Identity updated when I try to map it to our “id” attribute. And the error above comes when I try to return it with “id” set in the Map.

Updating – it looks like the original solution works. The error I was posting was coming from an After Operation Rule that got trigged in the Add Entitlement HTTP Operation that came after the Create Account. Thanks for the assistance!