Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/26/2024 11:51 PM
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
]
}
}
]
}
09/27/2024 12:00 AM
Hi @AadhithyanS use replace function to and add backslash
accountName.replaceAll('\','\\')
09/27/2024 12:33 AM
@NM no this is not working. tired with '\\','\\\\' and '\\','\\\\\\\\'. still the same error
09/27/2024 12:11 AM
@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('\\', '\\\\')}
09/27/2024 02:31 AM
@NM @Amit_Malik any solution?
09/27/2024 02:42 AM
{
"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]
}
}
]
}
09/27/2024 02:54 AM
@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)
09/27/2024 02:57 AM
Share full logs in text file
09/27/2024 03:03 AM
09/27/2024 03:05 AM
Did you enabled showlogs ?
09/27/2024 03:06 AM - edited 09/27/2024 03:06 AM
@rushikeshvartak yes i have
{
"showLogs": true
}
09/27/2024 03:10 AM
Add showResponse true in json
09/27/2024 03:20 AM
09/27/2024 05:05 AM
${accountName.replaceAll('\\', '/\')}
09/27/2024 05:55 AM
@rushikeshvartak it's giving me json error not even allowing me save in connection
09/27/2024 05:58 AM
.replace('\', '###UNESCAPEBACKSLASH###')
09/27/2024 06:09 AM
@rushikeshvartak again not allowing me to save in the connection showing issue with json
09/27/2024 06:10 AM
09/27/2024 03:03 AM
09/27/2024 04:59 AM
@AadhithyanS try this
${arsTasks.accountname.replace('\','\\')}
09/27/2024 05:54 AM
@NM still the same error message