Hosted Active Directory::RenameUser
The RenameUser method renames a user account.
Arguments
Input Arguments | Required | Description |
---|---|---|
<path> |
Yes |
The Lightweight Directory Access Protocol (LDAP) path of the user to rename. |
<preferredDomainController> |
Yes |
The name of the preferred domain controller. |
<cn> |
No |
Optional parameter. If this parameter is supplied, it renames the user Active Directory object. This value should also be updated in the Customer Plans database commonname column of the customers table. |
<userPrincipalName> |
No |
Optional parameter. If this parameter is supplied, it changes the user's userPrincipalName attribute. |
<sAMAccountName> |
No |
Optional parameter. If this parameter is supplied, it changes the user's sAMAccountName attribute.
Note
sAMAccountName cannot be longer than 20 characters. See SAM-Account-Name Attribute for more information.
|
Remarks
Procedure Steps
Preferred DC Active Directory Provider::Search-Query UPN address to avoid duplication
Preferred DC Active Directory Provider::SetProperties-Set UPN/sAMAccountName/CN
Managed Plans:: SetCustomerCommonName-Set updated CN in plan database
Managed Plans::UpdateLastProvisioningDate
Sample Code
Example XML Request
<request xmlns:xsl="https://www.w3.org/1999/XSL/Transform">
<data>
<preferredDomainController>pad02.paflab.local</preferredDomainController>
<path>LDAP://CN=jessie2@JCNewCustomer5.com,OU=JCNewCustomer5,OU=DataCom,OU=Hosting,DC=paflab,DC=local</path>
<userPrincipalName>fred@JCNewCustomer5.com</userPrincipalName>
</data>
<procedure>
<execute namespace="Hosted Active Directory" procedure="RenameUser" impersonate="1">
<before source="data" destination="executeData" mode="merge" />
<after source="executeData" destination="data" mode="insert" />
</execute>
</procedure>
</request>
Applies To
Hosted Active Directory Namespace API for
Hosted Messaging and Collaboration version 4.5
Hosted Messaging and Collaboration version 4.0
See also
Tasks
Hosted Active Directory::CreateUser
Hosted Active Directory::DeleteUser
Hosted Active Directory::EnableUser
Hosted Active Directory::DisableUser
HostedActiveDirectory::MakeUserAdmin