How to: Create Exchange 5.5 Mailboxes

Visual Studio 2010

This example shows how to provision a Microsoft Exchange 5.5 mailbox object in Forefront Identity Manager Synchronization Service (FIM Synchronization Service).

Microsoft Exchange 5.5 is deprecated. For information about performing these steps with the current version of Exchange, see How to: Create Exchange Mailboxes.

Attribute Inclusion List

You must select the following attributes from the Select Attributes property page for your Exchange 5.5 management agent to provision an Exchange 5.5 mailbox:

  • uid

  • cn

  • rdn

  • mail

  • mailPreferenceOption

  • rfc822Mailbox

  • textEncodedORaddress

  • MAPI-Recipient

  • Home-MDB

  • Home-MTA

  • Assoc-NT-Account

  • NT-Security-Descriptor

The following examples show how to use a rules extension to provision an Exchange 5.5 mailbox. You must add a reference to logging.dll to use the LogException method.

void IMVSynchronization.Provision (MVEntry mventry)
          ConnectedMA ex55MA;
          CSEntry csentry;
          String nickName, displayName, orAddress, smtpAddress, mailboxMDB, mailboxMTA;
          byte[] ntAccount;
          ReferenceValue dn;

             if( "person" == mventry.ObjectType )
                ex55MA = mventry.ConnectedMAs["Fabrikam Ex55 MA"];

                nickName    = mventry["mailNickname"].Value;
                displayName = mventry["DisplayName"].Value;
                smtpAddress = mventry["SMTPAddress"].Value;
                ntAccount   = mventry["objectSID"].BinaryValue;
                orAddress   = mventry["ORaddress"].Value;
                mailboxMDB  = mventry["homeMDB"].Value;
                mailboxMTA  = mventry["homeMTA"].Value;

                // Construct the distinguished name.
                dn = ex55MA.EscapeDNComponent("CN=" + mventry["cn"].Value).Concat("cn=Recipients,ou=fabrikam,o=com");

                if(0 == ex55MA.Connectors.Count)
                   csentry = ExchangeUtils.Create55Mailbox(ex55MA, dn, nickName, displayName, smtpAddress, orAddress, mailboxMDB, mailboxMTA, ntAccount);

          // Log and rethrow any exception.
          catch(Exception ex)
             Logging.Logging.LogException(ex, "Provision", "Caught exception", false);

See Also

Community Additions