Exchange Provider::CreateMailbox

The CreateMailbox method mailbox-enables an existing user. The mailbox is actually created when the user first logs on. In addition to mailbox-enabling the user, this method appends or stamps several attributes related to address lists:

  • Checks the otherWellKnownGuids property on the parent container to verify if the WKGUID=9E444526CB6F4d5c9A59C9A84E26B627 is set on the organization. If so, it appends the Distinguished Name (DN) of the well-known-object to the showInAddressBook. This is the hosted organization Address List (AL).

  • Checks the otherWellKnownGuids property on the parent container to verify if the WKGUID=89FB25B7DF784fc198A493E2E8A0EE7E is set on the organization. If so, it appends the DN of the well-known-object to the showInAddressBook. This is the hosted organization global address list (GAL).

  • Sets the organization as an otherWellKnownObjects on the user, by using the value: WKGUID=B7AE2ABCCBAD41a28973559FCA154DB0.

  • Checks the otherWellKnownGuids property on the parent container to verify if WKGUID=D22DFCC5B73645e99E16C9AD3D61F34F is set on the organization. If so, it stamps the DN of the well-known-object on the user's msExchUseOAB attribute.

Arguments

Input argument Required Description

Path

Yes

The Lightweight directory access protocol (LDAP) path of the user object.

Alias

Yes

Sets the mailNickname attribute on the user object. Microsoft Outlook uses the mailNickname to resolve a user, however, this attribute does not need to be unique. For example, if two users in two different virtual organizations have the same mailNickname, sending users are prompted to select the one they want. If the two users are in two different GALs, this prompt is not presented.

Mdb

Yes

The Common Name (CN) of the mailbox store.

Server

Yes

The Exchange server Network Basic Input/Output System (NETBIOS) name.

ProxyAddresses

Yes

Proxy addresses to be created for the user object.

Mail/size

Yes

Mailbox size in megabytes (MB) (equivalent to the ProhibitSendQuota value).

QueryBase

No

The DN of the OU to be used for msExchQueryBaseDN. If you do not supply this parameter, assume that this is a stand-alone user that should not see other users in the organization.

Organization

No

A user that should see all the other users in the organization.

Self

No

A stand-alone user that should not see other users in the organization, by default.

Mail/warningQuota

No

The size in megabytes (MB) required to set this quota; the default value is 90 percent of the required size.

Mail/prohibitSendAndReceiveQuota

No

The size in megabytes (MB) required to set this quota; the default value is 500 percent of the required size.

Mail/outgoingSizeLimit

No

The maximum size in kilobytes (KB) of outgoing messages; the default (-1) is unlimited.

Mail/incomingSizeLimit

No

The maximum size in kilobytes (KB) of incoming messages; the default (-1) is unlimited.

Mail/recipientLimit

No

The maximum number of mail recipients for outgoing messages; the default (-1) is unlimited.

Mail/disablePOP

No

Values for this parameter are:

  • 0 = enable POP3

  • 1 = disable POP3

  • Default = enabled

Mail/disableIMAP

No

Values for this parameter are:

  • 0 = enable IMAP4

  • 1 = disable IMAP4

  • Default = enabled

Mail/disableHTTP

No

Values for this parameter are:

  • 0 = enable HTTP

  • 1 = disable HTTP

  • Default = enabled

OrgPath

No

The path of the hosted organization that contains the AL, GAL, and Outlook Address Book (OAB), as well-known-objects. By default, this path is that of the parent OU of the user.

Note

The alias (mailNickname) is no longer generated from the left hand side of the Active Directory user object User Principal Name (UPN) attribute. The UPN does not need to be set in order to create a mailbox.

Remarks

Rollback Calls

The CreateMailbox method calls the DeleteMailbox method on transaction rollback.

Comments

If an improperly-formed or non-existent DN is passed as the queryBase parameter, the CreateMailbox method will return an error that states: "A constraint violation occurred."

Sample Code

Example XML Request

The following is an example of an XML request for the CreateMailbox method of the Exchange Provider:

<request> 
    <data/> 
        <procedure> 
            <execute namespace='Exchange Provider' 
             procedure='CreateMailbox'> 
                <executeData> 
                    <path> LDAP://CN=Johnc,OU=litware,OU=consolidatedmessenger, 
                     DC=fabrikam,DC=com 
                    </path> 
                    <mdb>Mailbox Store (Exchserv1)</mdb> 
                    <server>Exchserv1</server> 
                    <alias>johnc</alias> 
                    <proxyAddresses> 
                        <value>johnc@litware.com</value> 
                        <value>johnc@fabrikam.com</value> 
                    </proxyAddresses> 
                    <mail> 
                        <size>100</size> 
                        <disablePOP>1</disablePOP> 
                        <disableIMAP>1</disableIMAP> 
                    </mail> 
                </executeData> 
            </execute> 
        </procedure> 
</request> 

Example XML Response

No example XML response.

Applies To

Exchange Provider API for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

See also

Tasks

Exchange Provider::DeleteMailbox