As promised in my previous post, here is an post which walks you through the creation of a profile which can be used to connect to both an Exchange 2013 Server as well as a legacy version of Exchange Server (2007, 2010). The reason why this is needed is because their is an explicit block in place that prevents profiles configured to use RPC over HTTP to interact with legacy versions of Exchange Server. Therefore, the standard mechanism of profile creation won't work. To get this working you will need to utilize a registry value named RpcHttpProxyMap. You can read more about this registry value and it's various settings in the MAPI guidance document published with the latest version of the MAPI/CDO download. The steps below will walk you through creating a profile that uses this value in addition to the properties configured in the profile. Although not a prerequisite, it may be helpful to review my previous posts about profile creation with MFCMAPI before walking through this one.
- How to use MFCMAPI to create a MAPI profile to connect to Exchange 2013
- How to use MFCMAPI to create a MAPI profile to connect to Exchange 2010
These steps require that the version of MAPI/CDO is at least 6.5.8309 and the latest version of MFCMAPI. These steps will not work with any version of Microsoft Outlook.
Important This section contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following Microsoft TechNet article: Backing Up and Restoring the Registry
- Make sure that you have Exchange 2013 properly configured. The best way to do this is confirm that Microsoft Outlook can connect successfully.
- Create a REG_SZ value named RpcHttpProxyMap_MFCMAPI in the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current Version\Windows Messaging Subsystem
- Populate this key with the domain suffix of the personalized server id (the domain part that is right of the '@' symbol, e.g. F5FA...firstname.lastname@example.org) then an equal sign followed by the FQDN of the Rpc Proxy Server, followed by a comma then the proxy server settings in the format RpcHttpAuthenticationMethod, RpcAuthenticationMethod, and then indicate what the subsystem should do when an invalid certificate is encountered. A value of 'true' indicates that invalid certificates should be ignored. For example, contoso.com=http://mail.contoso.com,ntlm,ntlm,false
- Open up MFCMAPI, go to Profile > Show Profiles
- Give the new profile a name and click OK.
- Select the new profile
- Right-Click and choose Services > Add Service...
- Enter MSEMS for the service name
- Uncheck the box which says 'Display Service UI'
- Click OK
- Double-click the newly created profile
- Double-click the MSEMS service
- Find the Global Profile Section. It's the provider with the PROVIDER_UID that is 13DBB0C8AA05101A9BB000AA002FC45A and single click it.
- Go to Property > Additional Properties
- Click Add and add the following properties PR_PROFILE_UNRESOLVED_NAME, PR_PROFILE_UNRESOLVED_SERVER
- Click OK
- Configure each property using the guidance below.
Property: PR_PROFILE_UNRESOLVED_NAME Value: mailbox alias The alias for the target mailbox. For example, Administrator Property: PR_PROFILE_UNRESOLVED_SERVER Value: The personalized server id This is the value retrieved from Autodiscover. It will be in the format guid@domain. For example, F5FA2827-5978-43cd-8FA8-E07BC3BB5591@contoso.com Property: PR_PROFILE_CONNECT_FLAGS Value: CONNECT_USE_SEPARATE_CONNECTION (0x4) | CONNECT_IGNORE_NO_PF (0x8000) Tells the subsystem to use a separate connection and still connect if no public folders are in the organization
- Select Session > Logon and display store, and select the profile is not already selected.
Click Actions > Create Profile
The steps above will connect you to a mailbox residing on an Exchange 2013 Server. From there you can use MDB > Open other mailboxes > From GAL... to connect to a mailbox residing on a legacy version of Exchange Server. If you want to connect first to the mailbox on the legacy version of Exchange Server use the same steps but in step 17, use the target server's name for PR_PROFILE_UNRESOLVED_SERVER instead of the personalized server id. Additionally, you may need to specify PR_PROFILE_UI_STATE if RPC encryption is enabled on the target legacy Exchange Server. This is the default in Exchange 2010. Please see my previous post on profile creation for Exchange 2010 for setting the value of that property.
The personalized server id is the server name returned from Autodiscover. You can find this in a variety of ways. If you are using the SOAP based Autodiscover the property you are looking for is InternalRpcClientServer. If you are using the Plain Old XML (POX) based Autodiscover the property you are looking for is of type EXHTTP in the protocol node. The node name is Server. You can use Outlook to make an Autodiscover request on your behalf by right clicking the Outlook icon in the System Tray while holding down the CTRL button and choosing 'Test E-Mail Autoconfiguration'.
It is recommended that you add a suffix to the RpcHttpProxyMap which is unique. This avoids conflicts with other MAPI applications that may be running on the machine. I added "_MFCMAPI" to the value's name for this purpose.
The RpcHttpProxyMap value's data is case sensitive if using version 6.5.8309. Therefore, "contoso.com=http://mail.contoso.com,ntlm,ntlm,false" is not the same as "Contoso.com=http://mail.contoso.com",ntlm,ntlm,false. This was changed in 6.5.8320 and is no longer case sensitive.
Properties configured in the profile will always override the registry key. Therefore, when the properties in the profile are in conflict to the properties in the registry MAPI will use the properties in the profile.
Lastly, the version of MAPI/CDO was incorrectly stated on the download page as 8.3.8309 for 6.5.8309.