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

Issues when trying to update CN/DN in AD

jralexander137
Regular Contributor
Regular Contributor

Hi I am trying to get the updateAccountJson configured to update the CN portion of the DN. Based on what I am reading on the forums we need to update the DN in order to update the CN but I am unable to get that to work.

{
"sn": "${user?.lastname}",
"givenName": "${user?.firstname}",
"displayname": "${user?.displayname}",
"physicalDeliveryOfficeName": "${user?.location}",
"title": "${user?.title}",
"department": "${user?.departmentname}",
"streetAddress": "${user?.street}",
"l": "${user?.city}",
"st": "${user?.state}",
"employeeNumber": "${user?.employeeid}",
"telephoneNumber": "${user?.phonenumber}",
"postalCode": "${user?.customproperty2}",
"company": "First Mid Bank & Trust",
"manager": "${if(managerAccount!=null && managerAccount.customproperty10!= null) {managerAccount.customproperty10} else {''}}",
"accountExpires": "${if(user.customproperty7!=null && user.customproperty7.equalsIgnoreCase('Suspend')){'126227375990000000'} else '0'}",
"userAccountControl": "${user.customproperty7 != null && user.customproperty7.equalsIgnoreCase('Suspend') ? '514' : '512'}",
"moveUsertoOU": "${user.customproperty7 != null && user.customproperty7.equalsIgnoreCase('Suspend') ? 'OU=Disabled Users,DC=blah,DC=com' : user?.customproperty57}",
"description": "${user.customproperty7 != null && user.customproperty7.equalsIgnoreCase('Suspend') ? 'SUSPENDED ON ' + (new java.text.SimpleDateFormat('yyyy-MM-dd HH:mm:ss').format(new Date())) + ' UTC':user?.title}",
"distinguishedName": "CN=testMason Rogers,OU=Alton,DC=blah,DC=com",
"wWWHomePage": "www.url.com "
}

For now, I attempted to hardcode a new DN as shown in the config above but get the following errors:

"2024-08-06T13:18:43.933+00:00","ecm-worker","ldap.SaviyntGroovyLdapService","quartzScheduler_Worker-6-jwrh9","ERROR","Error Updating the Account from AD - [LDAP: error code 19 - 000020B1: AtrErr: DSID-030F066E, #1:"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," 0: 000020B1: DSID-030F066E, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 31 (distinguishedName)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," ]"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9","","javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 19 - 000020B1: AtrErr: DSID-030F066E, #1:"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," 0: 000020B1: DSID-030F066E, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 31 (distinguishedName)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," ]; remaining name 'CN=testMason Rogers,OU=Altamont,DC=blah,DC=com'"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3274)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3207)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2998)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1503)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:277)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:192)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:181)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.java:167)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.saviynt.ldap.SaviyntGroovyLdapService.updateLDAPAccount(SaviyntGroovyLdapService.groovy:7250)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.saviynt.ldap.SaviyntGroovyLdapService$_updateAccountGLDAP_closure7.doCall(SaviyntGroovyLdapService.groovy:2670)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.saviynt.ldap.SaviyntGroovyLdapService.updateAccountGLDAP(SaviyntGroovyLdapService.groovy:2239)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.saviynt.ecm.services.ArsTaskService.updateAccountTarget(ArsTaskService.groovy:11459)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.saviynt.ecm.services.ArsTaskHelperService$_whenTaskTypeIsTwelveUpdateAccount_closure46.doCall(ArsTaskHelperService.groovy:2889)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.saviynt.ecm.services.ArsTaskHelperService.whenTaskTypeIsTwelveUpdateAccount(ArsTaskHelperService.groovy:2879)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.saviynt.ecm.services.ArsTaskHelperService$_completeAutoProvTasksUpgraded_closure1.doCall(ArsTaskHelperService.groovy:200)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at com.saviynt.ecm.services.ArsTaskHelperService.completeAutoProvTasksUpgraded(ArsTaskHelperService.groovy:160)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at MultipleProvisioningJob.execute(MultipleProvisioningJob.groovy:222)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at org.quartz.core.JobRunShell.run(JobRunShell.java:199)"
"2024-08-06T13:18:44.251+00:00","ecm-worker","","null-jwrh9",""," at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)"
"2024-08-06T13:18:43.937+00:00","ecm-worker","ldap.SaviyntGroovyLdapService","quartzScheduler_Worker-6-jwrh9","DEBUG","Exit updateAccountGLDAP"

 

The sav doc seems to imply you can also set CN directly but that also doesn't work. Any thoughts on what I am missing here?

[This message has been edited by moderator to mask sensitive information]

2 REPLIES 2

ag420
Regular Contributor
Regular Contributor

distinguishedName is set by the accountNamerule defined in the connector. What is the rule set in the same?

Raghu
All-Star
All-Star

@jralexander137  try belw

{
"sn": "${user?.lastname}",
"givenName": "${user?.firstname}",
"displayname": "${user?.displayname}",
"physicalDeliveryOfficeName": "${user?.location}",
"title": "${user?.title}",
"department": "${user?.departmentname}",
"streetAddress": "${user?.street}",
"l": "${user?.city}",
"st": "${user?.state}",
"employeeNumber": "${user?.employeeid}",
"telephoneNumber": "${user?.phonenumber}",
"postalCode": "${user?.customproperty2}",
"company": "First Mid Bank & Trust",
"manager": "${managerAccount != null && managerAccount.customproperty10 != null ? managerAccount.customproperty10 : ''}",
"accountExpires": "${user.customproperty7 != null && user.customproperty7.equalsIgnoreCase('Suspend') ? '126227375990000000' : '0'}",
"userAccountControl": "${user.customproperty7 != null && user.customproperty7.equalsIgnoreCase('Suspend') ? '514' : '512'}",
"moveUsertoOU": "${user.customproperty7 != null && user.customproperty7.equalsIgnoreCase('Suspend') ? 'OU=Disabled Users,DC=blah,DC=com' : user?.customproperty57}",
"description": "${user.customproperty7 != null && user.customproperty7.equalsIgnoreCase('Suspend') ? 'SUSPENDED ON ' + (new java.text.SimpleDateFormat('yyyy-MM-dd HH:mm:ss').format(new Date())) + ' UTC' : user?.title}",
"distinguishedName": "CN=testMason Rogers,OU=Alton,DC=blah,DC=com",
"wWWHomePage": "www.url.com "
}


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.