Creating a group by using XML

Use the CreateGroup procedure of the Managed Active Directory namespace to create a group in Active Directory. The CreateGroup procedure creates a new group within a specified organization according to the policy name you supply 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 CreateGroup procedure

<request>
  <procedure>
	<execute namespace="Managed Active Directory" procedure="CreateGroup">
	<executeData>
		<container>LDAP://ou=Hosting,DC=contoso,DC=com</container>
		<name>myGroup1</name>
		<groupType>UNIVERSAL SECURITY</groupType>
		<policyName>reseller</policyName>
		<description>Describes the new group</description>
		<preferredDomainController>myPrimaryDC.contoso.com</preferredDomainController>
	</executeData>
	<after source="executeData" destination="data" sourcePath="group" />
	</execute>
  </procedure>
</request>

Input for CreateGroup

The following input is valid for this request:

Typical response for CreateGroup

<response>
  <data>
	<group path="LDAP://cn=myGroup1,ou=Hosting,DC=contoso,DC=com" name="myGroup1" 
	samName="myGroup1"></group>
  </data>
</response>

Important