Creating a user account by using XML

Use the CreateUser procedure of the Managed Active Directory namespace to create an account for a user. The CreateUser procedure creates a new user within a specified organization according to the policy name you provide in the <policyName> element.

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

Example of a request that calls the CreateUser procedure

	<execute namespace="Managed Active Directory" procedure="CreateUser">
		<displayName>Joe Smith</displayName>
		<description>User description</description>
		<property name="otherHomePhone">
	<after source="executeData" destination="data" sourcePath="user" />

Input for CreateUser

The following input is valid for this request:

Typical response for CreateUser

This procedure returns the <user> tag containing the user object created and the membership and security policies supplied. Each object created has its LDAP path in a path attribute.

	<user path="LDAP://cn=upnMyUser1,OU=Reseller1,OU=Hosting,DC=contoso,DC=com" 
		name="upnMyUser1" samName="upnMyUser1"></user>