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

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.