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

Unable to Update User CN Using updateAccountJson in AD

Chirag_Gupta
New Contributor III
New Contributor III

Hello everyone,

We are encountering an issue with the updateAccountJson API. When attempting to update the CN of a user, we receive the following error:

UpdErr: DSID-030F14B4, problem 6004 (CANT_ON_RDN), data 0 ] Error while Update operation for account-#### in AD - [LDAP: error code 67 - 000020B1: UpdErr: DSID-030F1087, problem 6004 (CANT_ON_RDN), data 0 ]

We need to update the CN to subsequently update the DN when CN changes. While we can successfully update the DN using a PowerShell script with the same service account, the updateAccountJson method fails.

Below is the powershell script:

Chirag_Gupta_0-1722493537717.png

Please refer to the updateaccountjson below for your reference.

{
"cn": "${user.displayname!= null ? user.displayname : ''}",
"company": "${user.companyname != null ? user.companyname : ''}",
"department": "${user.departmentname != null ? user.departmentname : ''}",
"displayName": "${user.displayname != null ? user.displayname : ''}",
"givenName": "${user.firstname != null ? user.firstname : ''}",
"info": "${user.costcenter != null ? user.costcenter : ''}",
"l": "${user.city != null ? user.city : ''}",
"mail": "${user.email != null ? user.email : ''}",
"manager": "${user.manager!=null ? managerAccount.accountID : ''}",
"name": "${user.displayname!= null ? user.displayname: ''}",
"objectClass": [
"top",
"person",
"organizationalPerson",
"user"
],
"postalCode": "${user.regioncode != null ? user.regioncode : ''}",
"sn": "${user.lastname != null ? user.lastname : ''}",
"st": "${user.state != null ? user.state : ''}",
"streetAddress": "${user.street != null ? user.street : ''}",
"title": "${user.title != null ? user.title : ''}",
"mailNickname": "${user.customproperty5 != null ? user.customproperty5 : ''}",
"c": "${user.customproperty3 != null ? user.customproperty3 : ''}",
"userPrincipalName": "${user.email != null ? user.email : ''}",
}

Thanks,

Chirag Gupta

Who Me Too'd this topic