Creating a contact by using XML

Use the CreateContact procedure of the Managed Active Directory namespace to create a contact in Active Directory.

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

Example of a request that calls the CreateContact procedure

<request>
   <procedure>
	 <execute namespace="Managed Active Directory" procedure="CreateContact">
	 <executeData>
		 <container>LDAP://OU=Hosting,DC=contoso,DC=com</container>
		 <name>Kevin Browne</name>
		 <properties>
		 <property name="displayName">Kevin F. Browne</property>
		 <property name="givenName">Kevin</property>
		 <property name="middleName">F</property>
		 <property name="sn">Browne</property>
		 <property name="initials">KFB</property>
		 <property name="description">description of new contact</property>
		 </properties>
	 </executeData>
	 <after source="executeData" sourcePath="path"
		 destination="data"mode="insert" /> 
	 </execute>
  </procedure>
</request>

Input for CreateContact

The following input is valid for this request:

Typical response for CreateContact

<response>
  <data>
	<path>LDAP://cn=Kevin Browne,OU=Hosting,DC=contoso,DC=com</path>
  </data>
</response>

Important