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 is adding an extra '\' to the DN of a user while updating user for ADSI connector

PRATYUSH1
New Contributor III
New Contributor III
Saviynt is adding an extra "\" in the DN of the users where CN contains a single '\' while updating the account for ADSI connector. This is resulting in the tasks not getting completed and the changes not getting reflected in AD.
For example: For the below DN:
CN=Last Name\, First Name,OU=Standard Users,..........................
 
Saviynt is passing:
 
CN=Last Name\\, First name,OU=Standard Users,..............................
 
As per solution provided by Saviynt,
we used: 
"manager": "${if(user.customproperty6 == null && user.customproperty36 == null){''} else if(user.customproperty36==null){user.customproperty6.replace('\\', '\')}else{user.customproperty36.replace('\\', '\')}}"
 
but now the error is :  
Error while update account in AD : Cannot get property 'url' on null object
 
 

When we keep the JSON as:

"manager": "${if(user.customproperty6 == null && user.customproperty36 == null){''} else if(user.customproperty36==null){user.customproperty6}else{user.customproperty36}}",

and just pass the value of the DN as:

CN=Last Name\\, First Name,OU=Standard Users,.......................... (Extra backslash manually added to the field), it passes the value correctly.
 
But when we change the JSON to use the replace function and make it:
"manager": "${if(user.customproperty6 == null && user.customproperty36 == null){''} else if(user.customproperty36==null){user.customproperty6}else{user.customproperty36.replace('\','\\')}}",
 
and do not add the extra backslash manually to the value in user details, then we get the error:
Error while update account in AD : Cannot get property 'url' on null object
 
Can someone please tell what is going wrong here in the JSON as manually replacing it is working correctly?
 
3 REPLIES 3

rushikeshvartak
All-Star
All-Star

"manager": "${if(user.customproperty6 == null && user.customproperty36 == null){''} else if(user.customproperty36==null){user.customproperty6}else{user.customproperty36.replace('\\\\', '\\')}}"


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

Hi @rushikeshvartak ,

Thanks for your reply.

I tried your code but it is giving the same error in Provisioning comments. In the logs, I found the error:

Unrecognized character escape ',' (code 44) at [Source:

 

Can you please suggest some alternative code I could try?

 

Thanks,

Pratyush Pranjal

8 \ to 4\ 


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