Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Error in logs while parsing disable account json from REST connector

vinitamulchanda
New Contributor
New Contributor

Hi Team,

Below Error is observed while SIGA parses disableAccount JSON from Rest Connector:

 

2024-02-22/14:13:33.119 [{}] [quartzScheduler_Worker-3] ERROR rest.RestProvisioningService - Error in processWebservicecom.fasterxml.jackson.core.JsonParseException: Unexpected character ('y' (code 121)): was expecting comma to separate Object entries
at [Source: {"mainIMDLAccount":"${user.customproperty4}","azureCorporateADAccountName":"${user.customproperty49}","azureIQOSAccountName":"${user.customproperty50}","azureIQOSAccountId":"${user.customproperty52}","domainAccount":"${user.customproperty60}","employeeId":"${user.employeeid}","endDate":"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")} else {null}}","firstName":"${user.firstname}","lastName":"${user.lastname}","status":"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}","initials":"${user.customproperty7}","isActive":"${user.enabled}","groupId":"${entitlementValue.id}","groupName":"${entitlementValue.entitlement_value}"}; line: 1, column: 407]
2024-02-22/14:13:33.120 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: | Error com.fasterxml.jackson.core.JsonParseException: Unexpected character ('y' (code 121)): was expecting comma to separate Object entries
at [Source: {"mainIMDLAccount":"${user.customproperty4}","azureCorporateADAccountName":"${user.customproperty49}","azureIQOSAccountName":"${user.customproperty50}","azureIQOSAccountId":"${user.customproperty52}","domainAccount":"${user.customproperty60}","employeeId":"${user.employeeid}","endDate":"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")} else {null}}","firstName":"${user.firstname}","lastName":"${user.lastname}","status":"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}","initials":"${user.customproperty7}","isActive":"${user.enabled}","groupId":"${entitlementValue.id}","groupName":"${entitlementValue.entitlement_value}"}; line: 1, column: 407]
2024-02-22/14:13:33.120 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1702)
2024-02-22/14:13:33.120 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:558)
2024-02-22/14:13:33.120 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: | E

 

Given below is my DisableAccountJSON:

 

{
"accountIdPath": "accountName",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "*****/${arsTasks?.endpoint}/accounts/${account?.name}/status?username=${user?.customproperty61+'@pmintl.dev'}&email=${user?.customproperty61+'@pmintl.dev'}&employeeId=${user?.employeeid}&mainIMDLAccount=${user?.customproperty4}&azureCorporateADAccountName=${user?.customproperty49}&azureIQOSAccountId=${user?.customproperty52}&azureIQOSAccountName=${user?.customproperty50}",
"httpMethod": "PATCH",
"httpParams": "{\"mainIMDLAccount\":\"${user.customproperty4}\",\"azureCorporateADAccountName\":\"${user.customproperty49}\",\"azureIQOSAccountName\":\"${user.customproperty50}\",\"azureIQOSAccountId\":\"${user.customproperty52}\",\"domainAccount\":\"${user.customproperty60}\",\"employeeId\":\"${user.employeeid}\",\"endDate\":\"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\")} else {null}}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"status\":\"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}\",\"initials\":\"${user.customproperty7}\",\"isActive\":\"${user.enabled}\",\"groupId\":\"${entitlementValue.id}\",\"groupName\":\"${entitlementValue.entitlement_value}\"}",
"httpHeaders":
{
"client_id": "*******",
"client_secret": "*******",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
204,
201,
202,
203,
205
]
},
"unsuccessResponses":
{
"statusCode":
[
400,
404
]
}
}

]
}

 

 

could you please help me identifying the error.

8 REPLIES 8

naveenss
All-Star
All-Star

@vinitamulchanda  can you try the below JSON?

{
  "accountIdPath": "accountName",
  "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "showResponse": true,
      "url": "*****/${arsTasks?.endpoint}/accounts/${account?.name}/status?username=${user?.customproperty61+'@pmintl.dev'}&email=${user?.customproperty61+'@pmintl.dev'}&employeeId=${user?.employeeid}&mainIMDLAccount=${user?.customproperty4}&azureCorporateADAccountName=${user?.customproperty49}&azureIQOSAccountId=${user?.customproperty52}&azureIQOSAccountName=${user?.customproperty50}",
      "httpMethod": "PATCH",
      "httpParams": "{\"mainIMDLAccount\":\"${user.customproperty4}\",\"azureCorporateADAccountName\":\"${user.customproperty49}\",\"azureIQOSAccountName\":\"${user.customproperty50}\",\"azureIQOSAccountId\":\"${user.customproperty52}\",\"domainAccount\":\"${user.customproperty60}\",\"employeeId\":\"${user.employeeid}\",\"endDate\":\"${if(user.enddate!=null){user.enddate.format(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\")}else{null}}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"status\":\"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}\",\"initials\":\"${user.customproperty7}\",\"isActive\":\"${user.enabled}\",\"groupId\":\"${entitlementValue.id}\",\"groupName\":\"${entitlementValue.entitlement_value}\"}",
      "httpHeaders": {
        "client_id": "*******",
        "client_secret": "*******",
        "Content-Type": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          200,
          204,
          201,
          202,
          203,
          205
        ]
      },
      "unsuccessResponses": {
        "statusCode": [
          400,
          404
        ]
      }
    }
  ]
}

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Hi Naveen,

No luck, am still facing the same error.

In the "httpParams" section, notice that I've escaped the double quotes " within the format() method as \\\". This ensures that the JSON string remains valid when it's parsed.

 

 

{
  "accountIdPath": "accountName",
  "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "showResponse": true,
      "url": "*****/${arsTasks?.endpoint}/accounts/${account?.name}/status?username=${user?.customproperty61+'@pmintl.dev'}&email=${user?.customproperty61+'@pmintl.dev'}&employeeId=${user?.employeeid}&mainIMDLAccount=${user?.customproperty4}&azureCorporateADAccountName=${user?.customproperty49}&azureIQOSAccountId=${user?.customproperty52}&azureIQOSAccountName=${user?.customproperty50}",
      "httpMethod": "PATCH",
      "httpParams": "{\"mainIMDLAccount\":\"${user.customproperty4}\",\"azureCorporateADAccountName\":\"${user.customproperty49}\",\"azureIQOSAccountName\":\"${user.customproperty50}\",\"azureIQOSAccountId\":\"${user.customproperty52}\",\"domainAccount\":\"${user.customproperty60}\",\"employeeId\":\"${user.employeeid}\",\"endDate\":\"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format(\\\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\\\")} else {null}}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"status\":\"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}\",\"initials\":\"${user.customproperty7}\",\"isActive\":\"${user.enabled}\",\"groupId\":\"${entitlementValue.id}\",\"groupName\":\"${entitlementValue.entitlement_value}\"}",
      "httpHeaders": {
        "client_id": "*******",
        "client_secret": "*******",
        "Content-Type": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          200,
          204,
          201,
          202,
          203,
          205
        ]
      },
      "unsuccessResponses": {
        "statusCode": [
          400,
          404
        ]
      }
    }
  ]
}

 

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

Thanks for your response, I could see the error I was seeing in logs did got resolved. But the other values that are part of httpparams are not getting evaluated, as you can see the API call logs pasted below:

 

DEBUG rest.RestProvisioningService - Calling Webservice Url - *****/sprinklrtest31@pmintl.dev/status?username=test31@pmintl.dev&email=test31@abc.dev&employeeId=50... with httpParams - [mainIMDLAccount:${user.customproperty4}, azureCorporateADAccountName:${user.customproperty49}, azureIQOSAccountName:${user.customproperty50}, azureIQOSAccountId:${user.customproperty52}, domainAccount:${user.customproperty60}, employeeId:${user.employeeid}, endDate:${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")} else {null}}, firstName:${user.firstname}, lastName:${user.lastname}, status:inactive}, initials:${user.customproperty7}, isActive:false, groupId:${entitlementValue.id}, groupName:${entitlementValue.entitlement_value}]

Like - employeeid : <here user's employee ID value should be evaluated > correct but we see ${user.employeeid}

could you please help why this could be occuring

As per above logs its getting populated 

rushikeshvartak_0-1708916677147.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

No, that is query params, I could not see httpParams being resolved .

 

Below the URL and http param config from my JSON:

"url": ********/accounts/${account?.name}/status?username=${user?.customproperty61+'@pmintl.dev'}&email=${user?.customproperty61+'@pmintl.dev'}&employeeId=${user?.employeeid}&mainIMDLAccount=${user?.customproperty4}&azureCorporateADAccountName=${user?.customproperty49}&azureIQOSAccountId=${user?.customproperty52}&azureIQOSAccountName=${user?.customproperty50}",
"httpMethod": "PATCH",
"httpParams": "{\"mainIMDLAccount\":\"${user.customproperty4}\",\"azureCorporateADAccountName\":\"${user.customproperty49}\",\"azureIQOSAccountName\":\"${user.customproperty50}\",\"azureIQOSAccountId\":\"${user.customproperty52}\",\"domainAccount\":\"${user.customproperty60}\",\"employeeId\":\"${user.employeeid}\",\"endDate\":\"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format(\\\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\\\")} else {null}}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"status\":\"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}\",\"initials\":\"${user.customproperty7}\",\"isActive\":\"${user.enabled}\",\"groupId\":\"${entitlementValue.id}\",\"groupName\":\"${entitlementValue.entitlement_value}\"}",


change ${entitlementValue.id} to ${entitlementValue.entitlementID}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

No luck, this did not helped.

024-02-26/06:09:17.617 [{}] [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Calling Webservice Url - ********/accounts/test31@pmintl.dev/status?username=test31@pmintl.dev&email=test31@pmintl.dev&employeeId=50400448&mainIMDLAccount=0000000000&azureCorporateADAccountName=null&azureIQOSAccountId=null&azureIQOSAccountName=null with httpParams - [mainIMDLAccount:${user.customproperty4}, azureCorporateADAccountName:${user.customproperty49}, azureIQOSAccountName:${user.customproperty50}, azureIQOSAccountId:${user.customproperty52}, domainAccount:${user.customproperty60}, employeeId:${user.employeeid}, endDate:${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")} else {null}}, firstName:${user.firstname}, lastName:${user.lastname}, status:${user.statuskey=******?'':user.statuskey=******?'active':user.statuskey=******?'inactive':''}, initials:${user.customproperty7}, isActive:false, groupId:${entitlementValue.entitlementID}, groupName:${entitlementValue.entitlement_value}]