Use the RenameUser procedure of the Managed Active Directory namespace to rename a user.
This procedure expects to be called with impersonate="1". The procedure impersonates the caller.
<request>
<procedure>
<execute namespace="Managed Active Directory" procedure="RenameUser">
<executeData>
<user>LDAP://CN=upnMyUser1,OU=Reseller1,OU=Hosting,DC=contoso,
DC =com</user>
<newName>myUser1NewName</newName>
<preferredDomainController>myPrimaryDC.contoso.com</preferredDomainController>
</executeData>
<after source="executeData" sourcePath="path" destination="data"
mode="insert" />
</execute>
</procedure>
</request>
The following input is valid for this request:
Use the <user> element to specify the Lightweight Directory Access Protocol (LDAP) path of the user.
<user>LDAP://LDAP path of the user</user>
Use the <newName> element to specify the new name for the user.
<newName>new name for the user</newName>
By using the <preferredDomainController> element, you can specify the domain controller that you want to use for this request. Using a single preferred domain controller eliminates replication delays that arise between multiple controllers.
This information is optional.
<preferredDomainController>your domain controller</preferredDomainController>
This procedure returns the new LDAP of the user in <path>.
<response>
<data>
<path>LDAP://cn=myUser1NewName,OU=Reseller1,OU=Hosting,DC=contoso,DC=com</path>
</data>
</response>
Important