MPS Import::AllocateExistingMailbox

This procedure allocates an existing mailbox to the Exchange Resource Manager based on its current mail store and quota settings.

Note

This procedure must be run from a highly privileged account such as Enterprise Administrator.

Arguments

Input argument Required Description

<path>

Yes

This is the Lightweight Directory Access Protocol (LDAP) path of the user with an existing Exchange Mailbox.

<preferredDomainController>

Yes

This is the LDAP path of the user with an existing Exchange Mailbox.

<customerTypeName>

No

The type of allocation. Valid values are:

  • BusinessUser (default) Mailbox must exist on a mailstore that has been designated for business users. If the user's organization does not own space on the mail store, then adequate space to satisfy the allocation will be granted to the organization.

  • ConsumerUser Mailbox must exist on a mailstore that has been designated for consumer users.

<kilobytes>

No

Size of the mailbox in kilobytes:

  • If not supplied the procedure will read the size from the mDBOverLimit attribute and use this value for the allocation. If the value of the attribute is not set, then the procedure will throw an error.

  • If supplied the procedure will set the mDBOverLimit and use this value for the allocation.

Remarks

Prerequisites

  • User must be located in the hosting AD 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.

  • Exchange Resources must be present in the Resource Manager system.

Procedure Steps

  1. Preferred DC Active Directory Provider::Get Properties - check for existing mailbox and mDBOverLimit value.

  2. If the user is a BusinessUser:

    • Managed Active Directory::LDAPToGUID_ - get the GUID of the mailstore where the maibox is located.

    • Exchange Resource Manager::QueryResourcesByOrganization_ - get the parent organization's existing resource and determine if sufficient resources are available on the target mailstore to satisfy the request.

    • Exchange Resource Manager::AllocateOrganization_ (conditional) - If the parent org has no resources then allocate the size of the mailbox to the store where it exists.

    • Exchange Resource Manager::ReallocateOrganizationMailNoMove_ (conditional) - If the parent org has no resources on the target mailstore then allocate the size of the mailbox to that store.

    • Exchange Resource Manager::AllocateMailbox_.

  3. If the user is a ConsumerUser:

    • Exchange Resource Manager Ex::AllocateConsumerUserMailbox_.

Security

Impersonate caller.

Sample Code

Example XML Request

<request> 
  <procedure> 
    <execute namespace="MPS Import" procedure="AllocateExistingMailbox" impersonate="1"> 
      <executeData> 
        <preferredDomainController>AD01.fabrikam.com</preferredDomainController> 
        <path>LDAP://CN=jimc@alpineskihouse,OU=alpineskihouse,OU=consolidatedmessenger,oU=Hosting,DC=fabrikam,DC=Com</path> 
        <customerTypeName>BusinessUser</customerTypeName> 
      </executeData> 
      <after source="executeData" sourcePath="user" destination="data"/> 
    </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> 
    <customerTypeName>BusinessUser</customerTypeName> 
    <mailStore> 
      <mailStoreName>BusinessMailstore1</mailStoreName> 
      <serverName>EXBE01-WH</serverName> 
      <path>LDAP://CN=BusinessMailstore1,CN=First Storage Group,CN=InformationSt 
ore,CN=EXBE01-WH,CN=Servers,CN=First Administrative Group,CN=Administrative Grou 
ps,CN=fabrikam,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC 
=com</path> 
      <GUID>041895B81811CF47A6EC78F306C4D9E9</GUID> 
    </mailStore> 
  </data> 
</response> 

Applies To

MPS Import Namespace API for:

  • Hosted Messaging and Collaboration version 3.5

See also

Tasks

MPS Import::ApplyMailboxPlan