How to use MFCMAPI to create a MAPI profile to connect to Exchange 2010


** The following article is for only the Exchange MAPI / CDO download.  Outlook users will not have to use these steps.  Also this configuration may not work on previous versions of Exchange.

  1. Open up MFCMAPI, go to Profile > Launch Profile Wizard > Click OK
  2. Then Click Next
  3. Add the name of your Client Access Server, click Next
  4. Click Next
  5. Click Finish
  6. Go To Profile > Show Profiles, select the profile you just created
  7. Select the only service there and double click it
  8. Find the Global Profile Section.  It’s the provider with the PROVIDER_UID that is 13DBB0C8AA05101A9BB000AA002FC45A and single click itExchange User Guid
  9. Select PR_PROFILE_CONNECT_FLAGS and set it equal to 0x8000 (CONNECT_IGNORE_NO_PF)
  10. Select PR_PROFILE_UI_STATE and set it equal to 0x4000 (EDK_PROFILEUISTATE_ENCRYPTNETWORK)
  11. Close all dialogs until the default dialog appears.
  12. Select Session > Logon and display store, and select the profile if not already selected

Once you have the profile working in MFCMAPI, you can do the same thing programmatically.

Notes:

You can also walk through the manual way (Profile > Shows Profile > Create Profile, etc) of creating a profile in MFCMAPI but I will leave that as an experiment for the reader.

You must be using the Exchange 2010 RC or higher for these instructions to work

You will need to disable encryption to use the Exchange MAPI / CDO download.  This should be fixed by RTM (See Below).  To disable encryption please run the following cmdlet:

Set-RpcClientAccess -Server <FQDN of CAS> -EncryptionRequired: $false

Additional Resources:

http://mfcmapi.codeplex.com/

http://blogs.msdn.com/stephen_griffin/archive/2008/07/14/getting-a-referral-from-exchange-2007.aspx

http://blogs.msdn.com/stephen_griffin/archive/2007/03/19/mapi-and-exchange-2007.aspx

[Edit: 11/23] The fix for requiring MAPI encryption is made in the Exchange CDO / MAPI download and will be available in the next refresh of that component which is currently scheduled for early December.

[Edit: 12/22] The fix for requiring MAPI encryption is now available. You can download it here: http://www.microsoft.com/downloads/details.aspx?familyid=E17E7F31-079A-43A9-BFF2-0A110307611E&displaylang=en

[Edit: 5/27/2013] If you have an Exchange 2013 Server in your organization you need to use the RpcHttpProxyMap registry value and version 6.5.8309 to connect to any mailboxes on it.  I detail this registry value in the post here.

[Edit: 7/8/2014] Added a screenshot for the Global Profile Section

Comments (10)

  1. D says:

    You are the first person to post this in a manner that makes sense. Thank you.

  2. As several of you have noted, we recently released an update for the MAPICDO package . This is the update

  3. Thomas Guttesen says:

    Any ideas on how to build a profile for Exchange 2013.

    Regards

  4. Len says:

    With the new MAPICDO, Is it possible to create a profile for both Exchange 2007/2010/2013 running from the same machine. If so, when will this be documented?

    Thanks.

  5. PJ says:

    Very nice article thank you. Any updates for how to do this on Exchange 2013?????

  6. dvespa says:

    @Len – Yes, it is and I just documented that here: blogs.msdn.com/…/omniprof.aspx

  7. John says:

    Is there an x64 bit version of the MAPI CDO 1.2.1

  8. dvespa says:

    No, there is not a version of Exchange's MAPI (aka MAPI / CDO) that is 64 bit.  Outlook's MAPI is the only one that will ever be.

  9. John says:

    Thanks Dave for the response.  I guess I'll have to look at EWS or another method.

  10. dvespa says:

    EWS is a better solution anyway.  MAPI CDO is no longer supported for Exchange 2016.