Skip to Content
author's profile photo Former Member
Former Member

How to escape comma in LDAP DN string

Hi

I ran into situation that I should create AD cn as Lastname, Firstname.

I am concatenating it with JavaScript..

I have tested several amounts of \ characters in front of comma but not found working solution

var addn = "CN=" + LastName + "\\, " + FirstName + "," + buUserDN + "," + buBaseDN

Error with \\ in Javascript also tried \\\, \\\\, \\\\\\ and \\\\\\\\

putNextEntry failed storingCN=Test21\, Vellu,OU=Users,OU=business,OU=DEV,OU=IdentityManagement,dc=global,dc=company,dc=net

Exception from Add operation:javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 21 - 00000057: LdapErr: DSID-0C090C3E, comment: Error in attribute conversion operation, data 0, v1db1]; remaining name 'CN=Test21\, Vellu,OU=Users,OU=business,OU=DEV,OU=IdentityManagement,dc=global,dc=company,dc=net'

Exception from Modify operation:javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 21 - 00000057: LdapErr: DSID-0C090B8A, comment: Error in attribute conversion operation, data 0, v1db1]; remaining name 'CN=Test21\, Vellu,OU=Users,OU=business,OU=DEV,OU=IdentityManagement,dc=global,dc=company,dc=net'

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 31, 2012 at 02:47 PM

    Well

    Shouldn't make many changes same time - error wasn't due to excaping the name. Error came from invalid value os country code.

    And answer to my question is

    var addn = "CN=" + LastName + "\\, " + FirstName + "," + buUserDN + "," + buBaseDN

    So there should be two escape characters in front of comma in Javascript code.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 08, 2012 at 02:21 PM

    Hi ,

    Could you please let me know how did you resolve the error. I'm working on IDM 7.2 SP5 and I receive following error when "Create AD user" task is executed.

    Exception from Add
    operation:javax.naming.directory.InvalidAttributeValueException: [LDAP: error
    code 21 - 00000057: LdapErr: DSID-0C090C3E, comment: Error in attribute
    conversion operation, data 0, v1db1]; remaining name
    'CN=anuj0240n,OU=Security,OU=User,DC=ABCD,DC=sg'


    Exception from Modify
    operation:javax.naming.directory.InvalidAttributeValueException: [LDAP: error
    code 21 - 00000057: LdapErr: DSID-0C090B8A, comment: Error in attribute
    conversion operation, data 0, v1db1]; remaining name
    'CN=anuj0240n,OU=Security,OU=User,DC=CHCS,DC=sg'

    Thanks,

    Anuj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.