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

Saviynt throwing error for account creation in AD due to multiple lines in description field

Ajit
New Contributor III
New Contributor III

Hi Team,

We have a use case to create account in AD endpoint through request originated from ServiceNow.

While placing a request on Snow side, if the requestor is mentioning multiple lines/blank lines in the description field, then Saviynt is unable to process the create account task, as we are passing this description in the create account JSON with help of a dynamic attribute.

In the logs we can see the error : Error parsing JSON /JSONException: Unterminated string

Can you please help us on how to handle this?

Thanks

7 REPLIES 7

CR
Regular Contributor III
Regular Contributor III

share json


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star

${org.apache.commons.lang.StringEscapeUtils.escapeJava(reqAttrs.customproperty10)}

https://forums.saviynt.com/t5/saviynt-knowledge-base/json-handling-escape-characters-in-r est-connec...


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

Ajit
New Contributor III
New Contributor III

@rushikeshvartak Thank you for the response. In the reference link above it is mentioned as in REST connections.

will it also work for connection type AD? as we are getting same error in logs with this as well.

Ajit_0-1711110710149.png

Thanks

You can try and let us know if error changes.


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

Ajit
New Contributor III
New Contributor III

@rushikeshvartak  We tried as below, after that only I have shared above error from logs which is same.

Ajit_0-1711336165024.png

Please let us know, if something we are missing.

Thanks

 

description.replaceAll("[^\\x00-\\x7F]", "").replaceAll("[\n\r]", "").trim()


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

Ajit
New Contributor III
New Contributor III

@rushikeshvartak Thanks a lot! this is working.