MPS Import::ApplyMailboxPlan

This procedure applies a valid Exchange Mailbox plan to an existing mailbox. This includes:

  • Applying standard hosting attributes such as msQueryBaseDn.

  • Applying mailbox setting such as size, protocols, etc.

  • Stamping additional user attributes as defined by the plan.

  • Associating the mailbox plan with the specified user.

Arguments

Input argument Required Description

<path>

Yes

The Lightweight Directory Access Protocol (LDAP) path of the user.

<planName>

Yes

A valid Exchange Mailbox plan.

<preferredDomainController>

Yes

<proxyAddresses>

No

Additional proxy addresses for the user.

Dd279150.note(en-us,TechNet.10).gifNote
The procedure will accept additional proxyAddress. However a primary SMTP address based on the user's UPN prefix and the org's SMTP Domain (for example, user@alpineskihouse.com) is created.

<alias>

No

(optional) The procedure will accept this as an optional parameter. Other wise an alias will be generated from the UPN prefix (for example, user from user@alpineskihouse.com).

Remarks

Prerequisites

  • User must be located in the hosting Active Directory tree at the proper level in the hierarchy depending on whether it is a reseller or customer.

  • The organization must be compliant with the hosting prescription. If the OU was created or processed with any of the following, then it is valid:

    • Managed Active Directory::CreateOrganization.

    • HostedExchange::CreateBusinessOrganization.

    • Hosted Messaging and Collaboration::CreateOrganization.

    • MPS Import::ImportOrganization.

    • MPS Import::EnableOrganizationForHosting.

  • The user must be compliant with the hosting prescription. If the user was created or processed with any of the following, then it is valid:

    • Managed Active Directory::CreateUser.

    • HostedExchange::CreateBusinessUser.

    • HostedExchange::CreateConsumerUser.

    • Hosted Messaging and Collaboration::CreateUser.

    • MPS Import::ImportUser.

    • MPS Import::EnableUserForHosting.

  • A record must be present for the user in the plans database. If the user was created or processed by any of the following then it is valid:

    • Managed Active Directory::CreateUser.

    • HostedExchange::CreateBusinessUser.

    • HostedExchange::CreateConsumerUser.

    • Hosted Messaging and Collaboration::CreateUser.

    • MPS Import::ImportUser.

    • MPS Import::EnableCustomerForPlans.

  • The user must have an Exchange Mailbox.

Procedure Steps

  1. Managed Active Directory::GetThisOrganizationRoot - get the root organization for user.

  2. MPS Import::GetMailboxSettings_ - checks to determine that request service plan is allowed for the user's organization, retrieves the details of request service plan, gets the primary domain of the user's organization.

  3. Managed Active Directory::EnsureMapi_ (conditional) - if the plan includes Outlook the procedure creates the Exchange Address lists if they do not exist, stamps any existing users showInAddressBook property, creates the OutlookUsers group if it does not exist, adds the user to the OutlookUsers group.

  4. Active Directory Provider::Set Properties set msExchQueryBaseDN, proxyAddresses attributes.

  5. Managed Exchange::ModifyMailbox.

  6. Active Directory Provider::Set Properties set showInAddressBook, msExchUserAccountControl, and any properties defined by the service plan.

  7. MPS Import::EnsureMailboxGUID_ ensures that the user's msExchMailboxGUID is stored in the customerAssets table in the plans database.

  8. Managed Helpers::AddPlanToCustomer_ add the new mailbox plan to the customer.

Security

Impersonate caller.

Sample Code

Example XML Request

<request> 
  <procedure> 
    <execute namespace="MPS Import" procedure="ApplyMailboxPlan" impersonate="1"> 
      <executeData> 
        <preferredDomainController>AD01.fabrikam.com</preferredDomainController> 
        <path>LDAP://CN=jimc@alpineskihouse,OU=alpineskihouse,OU=consolidatedmessenger,oU=Hosting,DC=fabrikam,DC=Com</path> 
        <planName>BaseMail</planName> 
        <customerTypeName>BusinessUser</customerTypeName> 
      </executeData> 
      <after source="executeData" destination="data" mode="merge"/> 
    </execute> 
  </procedure> 
</request> 

Example XML Response

Shown for format only; content may vary.

<response> 
  <data> 
    <preferredDomainController>AD01-Wh.fabrikam.Com</preferredDomainController> 
    <path>LDAP://CN=user2@MPSImportOrg01.com,OU=MPSImportOrg01,OU=MPSImportRes01,OU=Hosting,DC=fabrikam,DC=Com</path> 
    <planName>BaseMail</planName> 
    <customerTypeName>BusinessUser</customerTypeName> 
    <properties> 
      <property name="msExchQueryBaseDN">OU=MPSImportOrg01,OU=MPSImportRes01,OU=Hosting,DC=fabrikam,DC=com</property> 
      <property name="mail">user2@MPSImportOrg01.com</property> 
      <property name="msExchMailboxFolderSet"> 
        <value>98821</value> 
      </property> 
      <property name="showInAddressBook" mode="append"> 
        <value>CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,CN=fabrikam,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=com</value> 
      </property> 
      <property name="msExchUserAccountControl">0</property> 
    </properties> 
    <mail> 
      <disablePOP>0</disablePOP> 
      <disableIMAP>0</disableIMAP> 
      <disableHTTP>0</disableHTTP> 
      <size>10000</size> 
    </mail> 
    <proxyAddresses> 
      <value>user2@MPSImportOrg01.com</value> 
      <value>$0I5100-C80TMRV0Q54H@fabrikam.com</value> 
    </proxyAddresses> 
  </data> 
</response> 

Applies To

MPS Import Namespace API for:

  • Hosted Messaging and Collaboration version 3.5

See also

Tasks

MPS Import::AllocateExistingMailbox