Managed Active Directory::ModifyUser
The ModifyUser procedure modifies a user's account.
Arguments
Input Arguments | Required | Description |
---|---|---|
<user> |
Yes |
The Lightweight Directory Access Protocol (LDAP) path of the user you want to modify. |
<userPrincipalName> |
No |
The new universal principal name for the user. |
<sAMAccountName> |
No |
The new SAM account name for the user.
Note
sAMAccountName cannot be longer than 20 characters. See SAM-Account-Name Attribute for more information.
|
<givenName> |
No |
The user's first name. |
<sn> |
No |
The user's surname. |
<middleName> |
No |
The user's middle name. |
<initials> |
No |
The user's initials. |
<displayName> |
No |
The name you want to display for the user. |
<description> |
No |
The description for the user. You can include the user's title and position in the description. |
<properties> |
No |
Any valid Active Directory properties for user that you want to store with the user account, such as phone numbers and account numbers. |
<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="ModifyUser" impersonate="1">
<executeData>
<user>LDAP://CN=myUser1,CN=Users,DC=contoso,DC=com</user>
<userPrincipalName>upnMyUser1</userPrincipalName >
<sAMAccountName>myUser1</sAMAccountName>
<displayName>John Smith</displayName>
<givenName>John</givenName>
<middleName>Joe</middleName>
<sn>Smith</sn>
<initials>JS<initials>
<description>Reseller description</description>
<properties>
<property name="otherHomePhone" mode="append">
<value>425-555-1212</value>
<value>206-555-1212</value>
</property>
<property name="userAccountControl">512</property>
<property name="showInAdvancedViewOnly">
<value xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="boolean">1</value>
</property>
</properties>
<preferredDomainController>myPrimaryDC.contoso.com
</preferredDomainController>
</executeData>
</execute>
</procedure>
</request>
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