Web Service how to store json response from create account http operation

Hi All, Could you please review my use case and suggest solution. I have one web service configured in IDN. I am able to do test connection, account and entitlement aggregation. I am creating account using Create Account http operation where I am using rest api call. Account is getting created successfully at target level as well reflecting in Sailpoint user profile.

As a next step, I have to use update user permission rest api from target application rest api, but this api takes one id value which is there in json response during create account api. I am not getting how to fetch that id value from the response and use it for my next http operation.

For example, lets say we are in create account http operation, here I am using one rest api URL - https://targetapplication.com/external/api/rest/v2/users/ it takes input as firstname, lastname, email and user emp id. once account creation happens, it creates one response along with 200 OK status code and that response is something like:

“message”:“Parsing values for JSON paths [givenName, sn, WORKFORCEID, email, email] from JSON: {"floorWarden":false,"lastName":"User11","color":"#F3A69D","employeeId":"9000050","userName":"[email protected]","passwordResetAttemptsRemaining":3,"specialNeeds":false,"dateUpdated":1712917252058,"firstName":"Test11","dateCreated":1712917252044,"name":"Test11 User11","id":65026,"userType":{"dateCreated":14309255*****737,"name":"Employee","id":1,"dateUpdated":1636133257153},"email":"[email protected]"}”

here from the response, I have to refer the id value i.e. 65026 and use it in my next http operation add entitlement where rest api url is https://targetapplication.com/external/api/rest/v2/users/**65026**/permissions

could you please suggest me solution for this.

Hello Himanshu,

Do I understand correctly that the end-system is generating a unique ID on account creation that you then want to fetch and send in a 2nd request?

If this is the case, try to add another “Account Aggregation” operation to your webservice connector and add the “Create Account” operation as a “Parent Endpoint” to the new aggregation operation. This should result in an aggregation event whenever the “Create Account” operation runs.

1 Like

@Swegmann thanks a lot for your response! yes right you got the point. I will try your suggestion and will update you soon!

1 Like

@Swegmann I tried adding another Account Aggregation2 using Create Account as Parent Endpoint. Account creation is working fine, in ccg.log I see that json response is there and just immediately flow is going to Account Aggregation2, but looks like I am still missing some config in my second Account Aggregation2 section, could you please review below configuration and let me know changes required to achieve the required goal (i.e. fetching the id value from json response)

"message":"Parsing values for JSON paths [givenName, sn, WORKFORCEID, email, email] from JSON: {\"floorWarden\":false,\"lastName\":\"User03\",\"color\":\"#E59089\",\"accountType\":\"EPTURA_BASIC_AUTH\",\"employeeId\":\"9001003\",\"userName\":\"[email protected]\",\"passwordResetAttemptsRemaining\":3,\"specialNeeds\":false,\"dateUpdated\":1713534573474,\"firstName\":\"T01\",\"dateCreated\":1713534573463,\"name\":\"T01 User03\",**\"id\":65039,**\"userType\":{\"dateCreated\":14309255*****737,\"name\":\"Employee\",\"id\":1,\"dateUpdated\":1636133257153},\"email\":\"[email protected]\"}","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.270Z","NativeIdentity":"9001003",

"message":"After parsing values for JSON paths: {[email protected]}","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.270Z","NativeIdentity":"9001003",

"message":"Resource objects parsed: [{firstName=null, lastName=null, employeeId=null, [email protected], [email protected]}]"


"message":"processEndpoint: Parsed 1 resource objects from response of endpoint: Create Account","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.271Z","NativeIdentity":"9001003",


"message":"procesEndpoint: Attempting to process 1 child endpoints for: Create Account","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.272Z","NativeIdentity":"9001003",

"message":"procesEndpoint: Child endpoint processor type: class sailpoint.connector.webservices.*****.RequestOrchestratorV2$CustomChildEndpointProcessor","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.272Z","NativeIdentity":"9001003",

"message":"processEndpoint: Authentication provider of type 'class sailpoint.connector.webservices.*****.WebServiceFacadeV2$2' encountered for endpoint: Account Aggregation2","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.272Z","NativeIdentity":"9001003"


"message":"processEndpoint: Attempting to build request for endpoint: Account Aggregation2","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.272Z","NativeIdentity":"9001003",


"message":"URL after replacing place holders :https:\/\/myorgtest.appnameconnect.com\/external\/api\/rest\/*****\/users?limit=50000","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.272Z","NativeIdentity":"9001003"


"message":"Request without updating V1 endpoint related paging information: HttpRequestWrapper [url=https:\/\/myorgtest.appnameconnect.com\/external\/api\/rest\/*****\/users?limit=50000, headers={Authorization=Basic *****, Content-Type=application\/json}, payload=null, type=GET, allowedSuccessCodes=[2**], possibleHttpErrorCodes=[], possibleHttpErrorMessages=[]]","pipeline":"1.6.2","@timestamp":"2024-04-19T13:49:30.272Z","NativeIdentity":"9001003"

Here I need to capture id value i.e. \"id\":65039 and use it in my next http operation as per below screenshot:

I did some trial on different approach like in Account Aggregation2 where parent endpoint is set as Create Account, I have given Content URL as -

"message":"Parsing values for JSON paths [givenName, sn, WORKFORCEID, email, email] from JSON: {\"floorWarden\":false,\"lastName\":\"User05\",\"color\":\"#92C3F3\",\"employeeId\":\"9001005\",\"userName\":\"[email protected]\",\"passwordResetAttemptsRemaining\":3,\"specialNeeds\":false,\"dateUpdated\":1713713169395,\"firstName\":\"T05\",\"dateCreated\":1713713169378,\"name\":\"T05 User05\",\"id\":65041,\"userType\":{\"dateCreated\":14309255*****737,\"name\":\"Employee\",\"id\":1,\"dateUpdated\":1636133257153},\"email\":\"[email protected]\"}","pipeline":"1.6.2","@timestamp":"2024-04-21T15:26:03.965Z","NativeIdentity":"9001005","



"message":"URL after replacing place holders :https:\/\/myorgtest.appnameconnect.com\/external\/api\/rest\/*****\/users\/$response.id\/permissions","pipeline":"1.6.2","@timestamp":"2024-04-21T15:26:03.974Z","NativeIdentity":"9001005"


"message":"Request without updating V1 endpoint related paging information: HttpRequestWrapper [url=https:\/\/myorgtest.appnameconnect.com\/external\/api\/rest\/*****\/users\/$response.id\/permissions, headers={Authorization=Basic *****, Content-Type=application\/json},

here I see that URL is still not getting populated with response id i.e.

https://myorgtest.appnameconnect.com/external/api/rest/*****/users/$response.id/permissions

It should appear as:

https://myorgtest.appnameconnect.com/external/api/rest/*****/users/65041/permissions

if this will happen, my use case will fulfill. Could you please help me on this.

Hey Himanshu,

Try: $response.id$

Also, can you send screenshot of your response mapping in Account Aggregation2? Is the account getting populated with the newly generated ID value?

@Swegmann Thank you so much for your inputs, I am successfully able to store the response id value and use it in my next http operation. It was a very good learning for me. I will update you if any other query I will have!

No problem! Sure thing.