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

Error Unrecognized character escape ',' when trying to update account in ADSI

Kriti
New Contributor
New Contributor

When trying to updateAccount with account ID containing comma and a space getting error Unrecognized character escape ',' in logs.

UpdateAccountJSon 

{
"objects": [
{
"objectClasses": [
"user"
],
"distinguishedName":"${account.accountID?.replace('\\', '\\\\')?.replace('/','\\/')}",
"moveObjectToOU": "${user.customproperty21}",
"attributes": {
"middleName": "${user.middlename}"
}
}
]
}

 

Sample accountID : CN=Test1nonstarter\, NSSav1,OU=Users,DC=saviynt,DC=com

4 REPLIES 4

rushikeshvartak
All-Star
All-Star
{
  "objects": [
    {
      "objectClasses": [
        "user"
      ],
      "distinguishedName": "${account.accountID?.replace('\\', '\\\\')?.replace('/', '\\/')?.replace(',', '\\,')}",
      "moveObjectToOU": "${user.customproperty21}",
      "attributes": {
        "middleName": "${user.middlename}"
      }
    }
  ]
}

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

Kriti
New Contributor
New Contributor

Still did not worked and throwing same exception.

Exception in inizializeProvisioningConnectioncom.fasterxml.jackson.core.JsonParseException: Unrecognized character escape ',' (code 44)

It replaced all the comma with \, in whole of the OU like "distinguishedName": "CN=Test1nonstarter\\\, NSSav1\,OU=Users\,DC=saviynt\,DC=com"

{ "objects": [ { "objectClasses": [ "user" ], "distinguishedName": "${account.accountID?.replace('CN=', 'CN=' + (account.accountID?.substring(account.accountID?.indexOf('CN=') + 3)?.replace(',', '\\,')))}", "moveObjectToOU": "${user.customproperty21}", "attributes": { "middleName": "${user.middlename}" } } ] }


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

NM
Honored Contributor II
Honored Contributor II

Hi @Kriti , is it even possible to update DN value in AD.. as far as I am aware no as it a RDN