Share via


Managed Active Directory::RenameUser

The RenameUser procedure renames a user.

Arguments

Input Arguments Required Description

<user>

Yes

The Lightweight Directory Access Protocol (LDAP) path of the user.

<newName>

Yes

The new name for the user.

<preferredDomainController>

No

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.

Remarks

Security

  • Impersonate Caller.

Sample Code

Example XML Request

<request> 
  <procedure> 
    <execute namespace="Managed Active Directory" procedure="RenameUser" impersonate="1"> 
      <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>

Example XML Response

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>

Applies To

Managed Active Directory Namespace APIManaged Active Directory Namespace API for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

Managed Active Directory::ModifyUser