Hosted Exchange::CreateResellerOrganization
This procedure creates a reseller organization in the specified container.
Arguments
Input Arguments | Required | Description |
---|---|---|
container |
Yes |
A valid LDAP path of the OU where the new reseller will be created. For example LDAP://OU=Hosting,DC=fabrikam,DC=Com. |
name |
Yes |
The common name (CN) of the new reseller organization. |
preferredDomainController |
Yes |
|
description |
No |
Description of the organization. |
propertiesXmlString |
No |
Valid AD attributes for an object of class OU. This property is passed in as an XML fragment string in the following format:
|
Remarks
Method Syntax
public string CreateResellerOrganization(
string container, string name,
string description,
string propertiesXmlString,
string preferredDomainController,
bool sendCredentials)
Sample Code
Example XML Response
MPS XML Response in string format (some parts omitted for brevity):
<response>
<data>
<preferredDomainController>AD01-Wh.fabrikam.Com</preferredDomainController>
<container>LDAP://OU=Hosting,DC=fabrikam,DC=Com</container>
<name>KrakHeRes01</name>
<org path="LDAP://ou=KrakHeRes01,OU=Hosting,DC=fabrikam,DC=Com" name="KrakHeRes01">
<otherWellKnownObjects>
<obj wkName="ThisOrganizationRoot" name="LDAP://ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="ForeignOwnerOrg" name="LDAP://ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="OrgType" name="LDAP://cn=reseller,cn=WatOrgTypes,cn=_Private,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="UserCreators" name="LDAP://cn=Admins@KrakHeRes01,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="ChildOrgCreators" name="LDAP://cn=CSRAdmins@KrakHeRes01,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="MultiGroupPointer" name="LDAP://cn=MultiGroup,cn=_Private,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
</otherWellKnownObjects>
<orgs>
<org path="LDAP://cn=_Private,ou=KrakHeRes01,OU=Hosting,DC=fabrikam,DC=Com" name="_Private" class="container">
<otherWellKnownObjects>
<obj wkName="ThisOrganizationRoot" name="LDAP://ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="OrgType" name="LDAP://cn=private,cn=WatOrgTypes,cn=_Private,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<.>
<org path="LDAP://cn=AllCustomerAdminsGroups@KrakHeRes01,cn=ChildOrgN,cn=MultiGroup,cn=_Private,ou=KrakHeRes01,OU=Hosting,DC=fabrikam,DC=Com" name="AllCustomerAdminsGroups@KrakHeRes01" class="container">
<otherWellKnownObjects>
<obj wkName="MultiGroupPointer" name="LDAP://cn=AllCustomerAdminsGroups@KrakHeRes01,cn=_Private,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
</otherWellKnownObjects>
</org>
<org path="LDAP://cn=AllCustomerCSRAdminsGroups@KrakHeRes01,cn=ChildOrgN,cn=MultiGroup,cn=_Private,ou=KrakHeRes01,OU=Hosting,DC=fabrikam,DC=Com" name="AllCustomerCSRAdminsGroups@KrakHeRes01" class="container">
<otherWellKnownObjects>
<obj wkName="MultiGroupPointer" name="LDAP://cn=AllCustomerCSRAdminsGroups@KrakHeRes01,cn=_Private,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
</otherWellKnownObjects>
</org>
</orgs>
</org>
</orgs>
</data>
</response>
Typical C# Usage
//Get user name and password.
string userName = this.Request.ServerVariables.Get("AUTH_USER");
string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD");
//Set credentials.
hostedExch.PreAuthenticate = true;
hostedExch.Credentials = new NetworkCredential(userName,pass);
lblMsg.InnerHtml = mpsResponseHeaderLabel;
//Display response.
this.mpsResponse.DocumentSource = "";
response = hostedExch.CreateResellerOrganization(
container,resellerName,description, propertiesXmlString,
preferredDomainController,sendCredentials);
// set the response XML to match the return from MPF
responseXml.LoadXml(response);
this.mpsResponse.Document = responseXml;
lblDone.InnerText = successMsg;
Applies To
Hosted Exchange Web Service for:
Hosted Messaging and Collaboration version 3.5
Hosted Messaging and Collaboration version 3.0
See also
Tasks
Hosted Exchange::CreateBusinessOrganization
Hosted Exchange::CreateBusinessOrganization2