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

Disable account tasking erroring with Unrecognized character escape

AadhithyanS
New Contributor
New Contributor

Hi Team,

We have an application where the account name in that is domain\user.systemusername. Now i am trying to do a disable account but getting the error message as below.

{"auditDetails":{"call1":[{"message":"Unrecognized character escape 'I' (code 73)\n at [Source: {\"id\":\"123\",\"username\":\"XXXX\\PP1234\",\"isEnabled\":false}. 

Below is my json

{ "call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://{Baseurl}/EnableOrDisableUser?id=${account.accountID}&isEnabled=false&userName=${accountName}}",
"httpMethod": "PUT",
"httpParams": {},
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}

20 REPLIES 20

NM
Honored Contributor II
Honored Contributor II

Hi @AadhithyanS use replace function to and add backslash

accountName.replaceAll('\','\\')

AadhithyanS
New Contributor
New Contributor

@NM no this is not working. tired with '\\','\\\\' and '\\','\\\\\\\\'. still the same error

Amit_Malik
Valued Contributor II
Valued Contributor II

@AadhithyanS , the error showing that you are using body in API call. But thr json you have shared doesn't have a body and all parameters are in URL.

Try using .replace('\\', '\\\\') for accountname

 ${accountName.replace('\\', '\\\\')}

 

 

 

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

AadhithyanS
New Contributor
New Contributor

@NM @Amit_Malik any solution?

rushikeshvartak
All-Star
All-Star
{
  "call": [
    {
      "name": "call1",
      "connection": "userAuth",
      "url": "https://{Baseurl}/EnableOrDisableUser?id=${account.accountID}&isEnabled=false&userName=${accountName.replaceAll('\\\\', '\\\\\\\\')}",
      "httpMethod": "PUT",
      "httpParams": {},
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Accept": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [200, 201]
      }
    }
  ]
}

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

@rushikeshvartak getting this error now

{"auditDetails":{"call1":[{"message":"No signature of method: com.saviynt.provisoning.rest.RestUtilService.getDynamicBindString() is applicable for argument types: (java.util.LinkedHashMap, java.util.HashMap)

Share full logs in text file


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

AadhithyanS
New Contributor
New Contributor

here is the log file

Did you enabled showlogs ?


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

@rushikeshvartak  yes i have

{
"showLogs": true
}

Add showResponse true in json


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

@rushikeshvartak it's the same.

Attaching the file here again

${accountName.replaceAll('\\', '/\')}


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

@rushikeshvartak it's giving me json error not even allowing me save in connection

.replace('\', '###UNESCAPEBACKSLASH###')


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

@rushikeshvartak  again not allowing me to save in the connection showing issue with json

 

  • What is error in logs ( one liner will not help to resolve issue)
  • screenshot
  • json

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

AadhithyanS
New Contributor
New Contributor

NM
Honored Contributor II
Honored Contributor II

@AadhithyanS  try this 

${arsTasks.accountname.replace('\','\\')}

AadhithyanS
New Contributor
New Contributor

@NM still the same error message