Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Unable to resolve response variables

Murmur
Regular Contributor III
Regular Contributor III

Hi everyone, 

I have the issue, that I'm not able to use teh response of a previous call in another call. I send an email to a user, but the email body looks like this: 

Murmur_0-1722266305744.png

Issue being, the cariables do not get resolved in call5. 

Both calls are part of the EnableAccountJSON routine. 

{ "name": "call4",
"connection": "AzureADProvisioning",
"url": "https://graph.microsoft.com/v1.0/users/${account.accountID}/authentication/temporaryAccessPassMethods",
"httpMethod": "POST",
"httpParams": "{\"lifetimeInMinutes\": 480,\"isUsableOnce\": false}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
},
"inputParams": {
"dependentCall": true
}
},
{
"name": "call5",
"connection": "AzureADProvisioning",
"url": "https://graph.microsoft.com/v1.0/Users/ba0f556c-11cc-4d4a-9d19-a7b27fc84acb/sendMail",
"httpMethod": "POST",
"httpParams": "{ \"message\": { \"subject\": \"Your TAP\", \"body\": { \"contentType\": \"Text\", \"content\": \"TAP: ${response.call4.message.temporaryAccessPass} Email: ${users.email}\" }, \"toRecipients\": [ { \"emailAddress\": { \"address\": \"mq@mylab.com\" } } ] }}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
},
"inputParams": {
"dependentCall": true
}
}

 

The reply of call4 looks like this:  

{"headers":"...","message":{"@odata.context":"url","id":"abcdef-id","isUsable":true,"methodUsabilityReason":"EnabledByPolicy","temporaryAccessPass":"T)H(b6pmd9heng7","createdDateTime":"2024-07-29T14:50:03.5377607Z","startDateTime":"2024-07-29T14:50:03.1067629Z","lifetimeInMinutes":480,"isUsableOnce":false},"statusCode":201,"description":null,"status":"Success"}

Any idea, why this is not resolving? 

Cheers 🙂

9 REPLIES 9

rushikeshvartak
All-Star
All-Star
  • Does hardcoded value working ?
  • Is it working from postman ?

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Murmur
Regular Contributor III
Regular Contributor III

Hi @rushikeshvartak 

1.) Yes
2.) The calls itself are working fine (also in saviynt). The issue is, that ${response.call4.message.temporaryAccessPass} should be resolved to the content returned by the previous call, but it is just sent as uninterpreted plain text to the API. 

Add StagenUmber and callorder 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Murmur
Regular Contributor III
Regular Contributor III

Hi @rushikeshvartak,

I tried it now with different stage numers and like this, but with no success. Any other idea?

{
"processingType": "SequentialAndIterative",
"call": [
{
"name": "call4",
"callOrder": 0,
"stageNumber": 0,
"connection": "AzureADProvisioning",
"url": "https://graph.microsoft.com/v1.0/users/${account.accountID}/authentication/temporaryAccessPassMethods",
"httpMethod": "POST",
"httpParams": "{\"lifetimeInMinutes\": 480,\"isUsableOnce\": false}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
},
"inputParams": {
"dependentCall": true
}
},
{
"name": "call5",
"callOrder": 1,
"stageNumber": 0,
"connection": "AzureADProvisioning",
"url": "https://graph.microsoft.com/v1.0/Users/<accountID>/sendMail",
"httpMethod": "POST",
"httpParams": "{ \"message\": { \"subject\": \"Your TAP\", \"body\": { \"contentType\": \"Text\", \"content\": \"The new cafeteria is open. TAP: ${response.call4.message.temporaryAccessPass} Email: ${users.email}\" }, \"toRecipients\": [ { \"emailAddress\": { \"address\": \"me@mylab.de\" } } ] }}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
},
"inputParams": {
"dependentCall": true
}
}
]

Please share logs in text format


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Murmur
Regular Contributor III
Regular Contributor III

Hi @rushikeshvartak 

Looks like everything is going well in the logs:

 

"2024-07-30T07:37:12.111+00:00","ecm-worker","rest.RestUtilService","quartzScheduler_Worker-7-hxxwd","DEBUG","pullObjectsByRest - responseStatusCode ::201"
"2024-07-30T07:37:12.112+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","Entered getResponseHeaders method"
"2024-07-30T07:37:12.112+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","responseError : null"
"2024-07-30T07:37:12.112+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","isAuthError: false"
"2024-07-30T07:37:12.112+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","pullObjectsByRest - responseMap.size : 9"
"2024-07-30T07:37:12.112+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","pullObjectsByRest - objectList.size : 1"
"2024-07-30T07:37:12.112+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","ERROR","Call response: {"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users('REDACTED_USER_ID')/authentication/temporaryAccessPassMethods/$entity","id":"REDACTED_USER_ID_2","isUsable":true,"methodUsabilityReason":"EnabledByPolicy","temporaryAccessPass":"<REDACTED_PASS>","createdDateTime":"2024-07-30T07:37:11.9614587Z","startDateTime":"2024-07-30T07:37:11.4964562Z","lifetimeInMinutes":480,"isUsableOnce":false}"
"2024-07-30T07:37:12.113+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","ERROR","callResponseMap: [@odata.context:https://graph.microsoft.com/v1.0/$metadata#users('REDACTED_USER_ID')/authentication/temporaryAccessPassMethods/$entity, id:REDACTED_USER_ID_2, isUsable:true, methodUsabilityReason:EnabledByPolicy, temporaryAccessPass:<REDACTED_PASS>, createdDateTime:2024-07-30T07:37:11.9614587Z, startDateTime:2024-07-30T07:37:11.4964562Z, lifetimeInMinutes:480, isUsableOnce:false]"
"2024-07-30T07:37:12.113+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","showResponse: null"
"2024-07-30T07:37:12.113+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","processWebservice - temp.status - Success"
"2024-07-30T07:37:12.113+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","doBreak: false"
"2024-07-30T07:37:12.131+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","connection: AzureADProvisioning"
"2024-07-30T07:37:12.191+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","Inside pullObjectsByRest"
"2024-07-30T07:37:12.192+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG",""
"2024-07-30T07:37:12.192+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","calling executeRequestWithTimeoutConfig for api..."
"2024-07-30T07:37:12.192+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","calling api..."
"2024-07-30T07:37:12.192+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","before calling executeRequestWithHeaders for api..."
"2024-07-30T07:37:12.192+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","isFipsEnabled = false"
"2024-07-30T07:37:12.192+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","getHttpClient - proxyParams : null"
"2024-07-30T07:37:12.192+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","getHttpClient - sslSocketFactory : null"
"2024-07-30T07:37:12.193+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","setting connection timeout to 10 seconds and request timeout to 60 seconds"
"2024-07-30T07:37:12.193+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","getHttpClient - HttpClientBuilder.create().build() called."
"2024-07-30T07:37:12.421+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","called executePostRequestWithHeaders for api..."
"2024-07-30T07:37:12.422+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","after calling executeRequestWithHeaders for api..."
"2024-07-30T07:37:12.422+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","called api..."
"2024-07-30T07:37:12.422+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","timeout validated for api..."
"2024-07-30T07:37:12.422+00:00","ecm-worker","services.HttpClientUtilityService","quartzScheduler_Worker-7-hxxwd","DEBUG","got response for api..."
"2024-07-30T07:37:12.422+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG",""
"2024-07-30T07:37:12.422+00:00","ecm-worker","rest.RestUtilService","quartzScheduler_Worker-7-hxxwd","DEBUG","pullObjectsByRest - responseStatusCode ::202"
"2024-07-30T07:37:12.422+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","Entered getResponseHeaders method"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","responseError : null"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","isAuthError: false"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","pullObjectsByRest - responseMap.size : 0"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","pullObjectsByRest - objectList.size : 1"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","ERROR","Call response: "
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","ERROR","callResponseMap: [:]"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","showResponse: null"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","processWebservice - temp.status - Success"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","doBreak: false"
"2024-07-30T07:37:12.423+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","Enter encryptHeaders"
"2024-07-30T07:37:12.424+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","Exit encryptHeaders"
"2024-07-30T07:37:12.424+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","Task Response: {"call4":{"headers":"REDACTED_HEADER","message":{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users('REDACTED_USER_ID')/authentication/temporaryAccessPassMethods/$entity","id":"REDACTED_USER_ID_2","isUsable":true,"methodUsabilityReason":"EnabledByPolicy","temporaryAccessPass":"<REDACTED_PASS>","createdDateTime":"2024-07-30T07:37:11.9614587Z","startDateTime":"2024-07-30T07:37:11.4964562Z","lifetimeInMinutes":480,"isUsableOnce":false},"statusCode":201,"description":null,"status":"Success"},"call5":{"headers":"REDACTED_HEADER","message":"","statusCode":202,"description":null,"status":"Success"}}"
"2024-07-30T07:37:12.424+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-hxxwd","DEBUG","Task Result: true"
"2024-07-30T07:37:12.424+00:00","ecm-worker","services.ArsTaskService","quartzScheduler_Worker-7-hxxwd","DEBUG","Inside updateProvisioningTries.."
"2024-07-30T07:37:12.436+00:00","ecm-worker","services.ArsTaskService","quartzScheduler_Worker-7-hxxwd","DEBUG","Entering provisionAccesstoAccountSaviynt"
"2024-07-30T07:37:12.436+00:00","ecm-worker","services.ArsTaskService","quartzScheduler_Worker-7-hxxwd","DEBUG","{03_TestTAPADMIN@mylab.de=[com.saviynt.ecm.task.ArsTasks : 855757]}"

Any clue? 

NM
Esteemed Contributor
Esteemed Contributor

Hi @Murmur , you don't have to define inputparam as dependent

 

"processingType": "SequentialAndIterative",

"call": [

{

"name": "call4",

"callOrder": 0,

"stageNumber": 0,

"connection": "AzureADProvisioning",

"url": "https://graph.microsoft.com/v1.0/users/${account.accountID}/authentication/temporaryAccessPassMethod...",

"httpMethod": "POST",

"httpParams": "{\"lifetimeInMinutes\": 480,\"isUsableOnce\": false}",

"httpHeaders": {

"Authorization": "${access_token}"

},

"httpContentType": "application/json",

"successResponses": {

"statusCode": [

200,

201,

204,

205

]

}

},

{

"name": "call5",

"callOrder": 1,

"stageNumber": 0,

"connection": "AzureADProvisioning",

"url": "https://graph.microsoft.com/v1.0/Users/${accountID}/sendMail",

"httpMethod": "POST",

"httpParams": "{ \"message\": { \"subject\": \"Your TAP\", \"body\": { \"contentType\": \"Text\", \"content\": \"The new cafeteria is open. TAP: ${response.call4.message.temporaryAccessPass} Email: ${user.email}\" }, \"toRecipients\": [ { \"emailAddress\": { \"address\": \"me@mylab.de\" } } ] }}",

"httpHeaders": {

"Authorization": "${access_token}"

},

"httpContentType": "application/json",

"successResponses": {

"statusCode": [

200,

201,

204,

205

]

}

}

]

 


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

Murmur
Regular Contributor III
Regular Contributor III

Hi @NM 

Unfortunately, that didn't change anything.

Any other idea? 

Murmur
Regular Contributor III
Regular Contributor III

It turns out, that when one variable is not working, the rest is not evaluated at all. 

Similar issue has been described here: Solved: CreateAccountJSON Variable vs Literal - unexpected... - Saviynt Forums - 49748

When I removed the ${user.email} it suddenly started working.