User and task variables are not resolving in REST connector

parthaghosh
New Contributor III
New Contributor III

Hello team,

We are trying to integrate Saviynt with CyberArk via PVWA REST services for safe and account creation.

We are using the Saviynt REST connection and populating the CreateAccountJSON for creating the Safe and Account.

below is the example JSON: 

{

  "accountIdPath": "call2.message.userName",

  "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",

  "responseColsToPropsMap": {

    "displayName": "call2.message.userName~#~char",

              "name": "call2.message.userName~#~char"

  },

  "call": [

    {

      "name": "call1",

      "connection": "acctAuth",

      "url": https://<HOST>/passwordvault/api/safes ,

      "httpMethod": "POST",

      "httpParams": "{\"SafeName\": \"ABC_${user.firstname}_${user.lastname}\", \"OLACEnabled\": \"false\", \"ManagingCPM\":\"PasswordManager\", \"NumberOfVersionsRetention\":null, \"NumberOfDaysRetention\":7, \"AutoPurgeEnabled\": \"false\"}",

      "httpHeaders": {

        "Authorization": "${access_token}",

        "Accept": "application/json"

      },

      "httpContentType": "application/json",

      "successResponses": {

        "statusCode": [

          200,

          201

        ]

      }

    },

    {

      "name": "call2",

      "connection": "acctAuth",

      "url": https://<HOST>/passwordvault/api/accounts ,

      "httpMethod": "POST",

      "httpParams": "{\"SafeName\": \"ABC_${user.firstname}_${user.lastname}\", \"name\": \"${user.username}\", \"address\": \"abc.com\", \"userName\":\"${task.accountName}\", \"platformId\": \"WinServerLocal\", \"secretType\": \"password\"}",

      "httpHeaders": {

        "Authorization": "${access_token}",

        "Accept": "application/json"

      },

      "httpContentType": "application/json",

 "callCondition": "${user.customproperty60 != null}",

      "successResponses": {

        "statusCode": [

          200,

          201

        ]

      }

    }

  ]

}

the variables in the call1 (like  ${user.firstname}_${user.lastname}) are getting resolved and call is successful, safe creating is happening.

But in the Call2, no variables are getting resolved. the values are passing with the exact syntax in the JSON.

${user.firstname}, ${user.lastname}, ${user.username}, ${task.accountName}

none of teh above variables is resolving. 

cannot find any clue. any advice will be appreciated.

 

thanks in advance.

 

Partha

[This message has been edited by moderator to remove hyperlink to urls]

2 REPLIES 2

adriencosson
Regular Contributor III
Regular Contributor III

Hi @parthaghosh ,

It happens that when at least one of the variables is not working, none of the variables will be resolved.

Have you tried to replace ${task.accountName} with ${accountName} and see if this works ? 

Regards,
Adrien COSSON

Thanks Adrien,

It helped. It worked with ${accountName}