Renaming a user account by using XML

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.

Example of a request that calls the RenameUser procedure

<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>

Input for RenameUser

The following input is valid for this request:

Typical response for RenameUser

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