Modifying a user account by using XML

Use the ModifyUser procedure of the Managed Active Directory namespace to modify a user's account.

This procedure expects to be called with impersonate="1". The procedure impersonates the caller.

Example of a request that calls the ModifyUser procedure

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

Input for ModifyUser

The following input is valid for this request:

Typical response for ModifyUser

The response to this procedure does not contain significant data.

Important