Share via


Windows-based Hosting::CreateCustomerOrganization

This procedure creates an organization according to the Customer policy name.

Arguments

Input Arguments Description

<requiredArgument>

<orgName>

The organization name.

<container>

A valid Lightweight Directory Access Protocol (LDAP)path of the OU where the new organization will be created. For example LDAP://OU=Reseller1,OU=Hosting,DC=fabrikam,DC=Com.

<preferredDomainController>

<sendCredentials>

<description>

Description.

<propertiesXMLString>

Any valid Active Directory properties for object class.

Remarks

Method Syntax

 
public string   CreateCustomerOrganization( 
                                        string orgName, 
                                        string container, 
                                        string description, 
                                        string propertiesXMLString, 
                                        string preferredDomainController, 
                                        bool sendCredentials) 
 

Sample Code

Example XML Request

No example XML request.

Example XML Response

 
<response> 
  <data> 
    <name>WingTipToys</name> 
    <container>LDAP://OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com</container> 
    <description>Imp</description> 
    <preferredDomainController>AD01-wh.fabrikam.com</preferredDomainController> 
    <properties /> 
    <org path="LDAP://ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="WingTipToys"> 
      <otherWellKnownObjects> 
        <obj wkName="ThisOrganizationRoot" name="LDAP://ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
        </obj> 
        <obj wkName="ForeignOwnerOrg" name="LDAP://OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
        </obj> 
        <obj wkName="UserCreators" name="LDAP://cn=Admins@WingTipToys,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
        </obj> 
        <obj wkName="ChildOrgCreators" name="LDAP://cn=CSRAdmins@WingTipToys,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
        </obj> 
        <obj wkName="OrgType" name="LDAP://cn=customer,cn=WatOrgTypes,cn=_Private,ou=Hosting,DC=fabrikam,DC=com"> 
        </obj> 
        <obj wkName="MultiGroupPointer" name="LDAP://cn=MultiGroup,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
        </obj> 
      </otherWellKnownObjects> 
      <orgs> 
        <org path="LDAP://cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="_Private" class="container"> 
          <otherWellKnownObjects> 
            <obj wkName="ThisOrganizationRoot" name="LDAP://ou=WingTipToys,OU=consolidatedmessenger,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> 
          </otherWellKnownObjects> 
          <orgs> 
            <org path="LDAP://cn=MultiGroup,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="MultiGroup" class="container"> 
              <orgs> 
                <org path="LDAP://cn=UserN,cn=MultiGroup,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="UserN" class="container"> 
                  <orgs> 
                    <org path="LDAP://cn=AllUsers@WingTipToys,cn=UserN,cn=MultiGroup,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="AllUsers@WingTipToys " class="container"> 
                      <otherWellKnownObjects> 
                        <obj wkName="MultiGroupPointer" name="LDAP://cn=AllUsers@WingTipToys,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
                        </obj> 
                      </otherWellKnownObjects> 
                    </org> 
                  </orgs> 
                </org> 
                <org path="LDAP://cn=ChildOrgN,cn=MultiGroup,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="ChildOrgN" class="container"> 
                </org> 
              </orgs> 
            </org> 
          </orgs> 
          <groups> 
            <group path="LDAP://cn=AllUsers@WingTipToys,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="AllUsers@WingTipToys"> 
              <memberOfGroup name="LDAP://cn=AllCustomers@consolidatedmessenger,cn=_Private,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
              </memberOfGroup> 
            </group> 
          </groups> 
        </org> 
      </orgs> 
      <groups> 
        <group path="LDAP://cn=Admins@WingTipToys,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="Admins@WingTipToys"> 
          <memberOfGroup name="LDAP://cn=AllCustomerAdminsGroups@consolidatedmessenger,cn=_Private,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
          </memberOfGroup> 
        </group> 
        <group path="LDAP://cn=CSRAdmins@WingTipToys,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com" name="CSRAdmins@WingTipToys"> 
          <memberOfGroup name="LDAP://cn=AllCustomerCSRAdminsGroups@consolidatedmessenger,cn=_Private,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com"> 
          </memberOfGroup> 
          <dacl> 
            <ace> 
              <inheritance>NO_INHERITANCE</inheritance> 
              <permission>ADS_RIGHT_READ_CONTROL</permission> 
              <trusteeType>0</trusteeType> 
              <trusteeForm>0</trusteeForm> 
              <trustee>S-1-5-10</trustee> 
              <mode>GRANT_ACCESS</mode> 
            </ace> 
          </dacl> 
        </group> 
      </groups> 
      <dacl> 
        <ace> 
          <permission>ADS_RIGHT_DS_LIST_OBJECT</permission> 
          <trustee>LDAP://cn=AllUsers@WingTipToys,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com</trustee> 
          <trusteeType>TRUSTEE_IS_GROUP</trusteeType> 
          <trusteeForm>TRUSTEE_IS_SID</trusteeForm> 
          <mode>GRANT_ACCESS</mode> 
        </ace> 
        <ace> 
          <permission>ADS_RIGHT_ACTRL_DS_LIST</permission> 
          <permission>ADS_RIGHT_DS_READ_PROP</permission> 
          <inheritance>SUB_CONTAINERS_AND_OBJECTS_INHERIT</inheritance> 
          <trustee>LDAP://cn=AllUsers@WingTipToys,cn=_Private,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com</trustee> 
          <trusteeType>TRUSTEE_IS_GROUP</trusteeType> 
          <trusteeForm>TRUSTEE_IS_SID</trusteeForm> 
          <mode>GRANT_ACCESS</mode> 
        </ace> 
        <ace> 
          <permission>ADS_RIGHT_READ_CONTROL</permission> 
          <inheritance>SUB_CONTAINERS_AND_OBJECTS_INHERIT</inheritance> 
          <trustee>LDAP://cn=Admins@WingTipToys,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com</trustee> 
          <trusteeType>TRUSTEE_IS_GROUP</trusteeType> 
          <trusteeForm>TRUSTEE_IS_SID</trusteeForm> 
          <mode>GRANT_ACCESS</mode> 
        </ace> 
        <ace> 
          <permission>ADS_RIGHT_READ_CONTROL</permission> 
          <permission>ADS_RIGHT_DS_WRITE_PROP</permission> 
          <permission>ADS_RIGHT_WRITE_DAC</permission> 
          <permission>ADS_RIGHT_DS_SELF</permission> 
          <permission>ADS_RIGHT_DS_CONTROL_ACCESS</permission> 
          <permission>ADS_RIGHT_DS_CREATE_CHILD</permission> 
          <permission>ADS_RIGHT_DS_DELETE_CHILD</permission> 
          <permission>ADS_RIGHT_DS_DELETE_TREE</permission> 
          <permission>ADS_RIGHT_DELETE</permission> 
          <inheritance>SUB_CONTAINERS_AND_OBJECTS_INHERIT</inheritance> 
          <trustee>LDAP://cn=CSRAdmins@consolidatedmessenger,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com</trustee> 
          <trusteeType>TRUSTEE_IS_GROUP</trusteeType> 
          <trusteeForm>TRUSTEE_IS_SID</trusteeForm> 
          <mode>GRANT_ACCESS</mode> 
        </ace> 
        <ace> 
          <permission>ADS_RIGHT_DS_WRITE_PROP</permission> 
          <permission>ADS_RIGHT_READ_CONTROL</permission> 
          <permission>ADS_RIGHT_WRITE_DAC</permission> 
          <permission>ADS_RIGHT_DS_SELF</permission> 
          <permission>ADS_RIGHT_DS_CONTROL_ACCESS</permission> 
          <permission>ADS_RIGHT_DS_CREATE_CHILD</permission> 
          <permission>ADS_RIGHT_DS_DELETE_CHILD</permission> 
          <permission>ADS_RIGHT_DS_DELETE_TREE</permission> 
          <inheritance>SUB_CONTAINERS_AND_OBJECTS_INHERIT</inheritance> 
          <trustee>LDAP://cn=Admins@WingTipToys,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com</trustee> 
          <trusteeType>TRUSTEE_IS_GROUP</trusteeType> 
          <trusteeForm>TRUSTEE_IS_SID</trusteeForm> 
          <mode>GRANT_ACCESS</mode> 
        </ace> 
        <ace> 
          <permission>ADS_RIGHT_GENERIC_ALL</permission> 
          <inheritance>11</inheritance> 
          <inheritedObjectTypeName>{BF967ABA-0DE6-11D0-A285-00AA003049E2}</inheritedObjectTypeName> 
          <trustee>LDAP://cn=CSRAdmins@WingTipToys,ou=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com</trustee> 
          <trusteeType>TRUSTEE_IS_GROUP</trusteeType> 
          <trusteeForm>TRUSTEE_IS_OBJECTS_AND_SID</trusteeForm> 
          <mode>GRANT_ACCESS</mode> 
        </ace> 
      </dacl> 
    </org> 
  </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.       
        objWS.PreAuthenticate = true; 
        objWS.Credentials = new NetworkCredential(userName,pass); 
        lblMsg.InnerHtml = mpsResponseHeaderLabel; 
 
        //Display response. 
        this.mpsResponse.DocumentSource = ""; 
response = objWS.CreateCustomerOrganization(name, container, description, propertiesXMLString, preferredDomainController, true); 
 
        // set the response XML to match the return from MPF 
        responseXml.LoadXml(response); 
        this.mpsResponse.Document = responseXml; 
 

Applies To

Managed Windows-based Hosting Web Service for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

Windows-based Hosting::DeleteOrganization