Error when provisioning a user object
I'm trying to provision user objects from a SQL Server database to an AD LDS instance. I'm getting an error everytime I run the export.
"A value for the attribute was not in the acceptable range of values"
Based on this error, I see what the issue is. For some reason, the provisioning code I use is taking the distinguished name and adding the "\" character to it in random places. In my SQL database, I have a field that contains the distinguished
name (CN=Michael Johnson, OU=Test, O=Test_ORG, C=US) and I want to use this to create the user objects in the AD LDS instance. So, in my code I am using the following function to create the user object:
ADLDSCSEntry.DN = ADLDS.CreateDN(mventry("UserDN").Value).Concat("DC=TEST,DC=com")
When I run the export job, I notice that it's trying to create a user object with the following distinguished name, which has the "\" character in it:
CN=Michael Johnson\, OU\=Test\, O\=Test_ORG\, C\=US,DC=TEST,DC=com
I'm not sure why it keeps on adding the "\" character to the string. Can someone tell me what I need to do in order to fix this?
Thanks in advance.
April 13th, 2011 3:41pm
The function you're using treats the whole string "userDN" as the RDN component and escapes the special LDAP characters like "," and "=" so that the RDN compoennt it would be acceptable as a CN attribute value.
You need to adjust the code so only the RDN component (CN=Micheal Johnson) is being put in the create DN and the remainder is added as the "CONCAT" function ("OU=Test,O=Test_ORG,C=US,DC=Test,DC=com")
Thanks
B
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2011 5:30pm
The function you're using treats the whole string "userDN" as the RDN component and escapes the special LDAP characters like "," and "=" so that the RDN compoennt it would be acceptable as a CN attribute value.
You need to adjust the code so only the RDN component (CN=Micheal Johnson) is being put in the create DN and the remainder is added as the "CONCAT" function ("OU=Test,O=Test_ORG,C=US,DC=Test,DC=com")
Thanks
B
April 14th, 2011 12:26am