Use the DeleteOrganizationalUnit procedure of the Managed Active Directory namespace to delete an organization.
This procedure expects to be called with impersonate="1". The procedure impersonates the caller.
<request>
<procedure>
<execute namespace="Managed Active Directory" procedure="DeleteOrganizationalUnit">
<executeData>
<org>LDAP://OU=Reseller1,OU=Hosting,DC=contoso,DC=com</org>
<preferredDomainController>myPrimaryDC.contoso.com</preferredDomainController>
</executeData>
</execute>
</procedure>
</request>
The following input is valid for this request:
Use the <org> element to specify the Lightweight Directory Access Protocol (LDAP) path of the organizational unit that you want to delete.
<org>LDAP://LDAP path of the organization</org>
By using the <preferredDomainController> element, you can specify the preferred domain controller that you want to use for this request. Using a single preferred domain controller eliminates replication delays that arise between multiple controllers.
This information is optional.
<preferredDomainController>your domain controller</preferredDomainController>
<request>
<procedure>
<execute namespace="Managed Active Directory" procedure="DeleteOrganization">
<executeData>
<org>LDAP://OU=Reseller1,OU=Hosting,DC=contoso,DC=com</org>
<preferredDomainController>myPrimaryDC.contoso.com
</preferredDomainController>
</executeData>
</execute>
</procedure>
</request>
Important