Prior to Exchange 2013, when Outlook’s emsmdb32 provider would log on to the server, it would get various bits of information back from the server, including information needed to connect to the Public Folder store. The provider would use this information to add the Public Folder store to the profile. This work involved pumping messages and this is where the workaround given here was involved:
With Exchange 2013, logon no longer returns any information related to Public Folders. Instead, the information needed to connect to Public Folders is handled through Autodiscover. When we do the initial AutoDiscover for profile creation, we get an entry back indicating that there is a Public Folder mailbox. Here’s what it looked like for my test mailbox:
We see the name of the Public Folder mailbox is TestPFMailbox. Outlook uses this information to conduct another Autodiscover conversation to get information on the Public Folder mailbox. Essentially, we send a request that looks like this:
<?xml version="1.0" encoding="utf-8"?>
We get a response back with information on the PF mailbox. Outlook then uses this information to make a call to CreateProvider to actually add the Public Folder store to the profile. CreateProvider takes a set of MAPI properties, whose values were derived from the information in the Autodiscover response. The properties we pass to CreateProvider are all derived from the AutoDiscover response:
I’ve done a bit of hand waiving above, and I’ve likely missed a number of corner cases, but this should be enough for someone to get started. All of this work actually happens in Outlook.exe, so there is no way for external MAPI processes to trigger it (though it’s possible it might happen while using the Outlook Object Model).
For more information on the Autodiscover process, see [MS-OXDSCLI]: Autodiscover Publishing and Lookup Protocol. Enjoy!
Hi Steve, thanks for the information. We've applied this to profiles we're using with downloadable MAPI and it works very nicely for on-premise Exchange but the same set of properties doesn't work for an Exchange Online mailbox - when we log in we get the mailbox but no public folders. Do you expect that to work?
As I noted, I probably missed a few cases here. I'd suggest letting Outlook configure a profile for that scenario and then take a look at the settings to see how they compared to what you tried to set and to what's in the Autodiscover response. That'll most likely highlight what I missed. If you find out what it is, lemme know and I'll update the article.
Hi Steve, I see that ServerExclusiveConnect is On in EXPR & EXHTTP nodes and Off in EXCH node. I believe the one from EXPR node only should be considered??
Our team has been trying to use MAPI to access public folder mailbox in a RDB for a long time. But nothing works.
Could you please let us know if it's possible at all to use MAPI(e.g. MFCMAPI) to access the public folder mailbox in a RDB? If it's possible, how? Thanks a lot!!!
I am not able to find the define for PR_PROFILE_ALTERNATE_STORE_TYPE, could you point me to where that is defined or provide the value?
#define PR_PROFILE_ALTERNATE_STORE_TYPE_W PROP_TAG(PT_UNICODE,0x65D0)
Thanks Steve, I also cannot find the value for PR_PROFILE_USER_SMTP_EMAIL_ADDRESS_W.
The last one I had trouble finding is PR_PROFILE_SERVER_FQDN, if this the same as PR_PROFILE_HOME_SERVER_FQDN PROP_TAG(PT_LONG, 0x662A)
#define PR_PROFILE_USER_SMTP_EMAIL_ADDRESS_W PROP_TAG(PT_UNICODE,0x6641)
#define PR_PROFILE_SERVER_FQDN PROP_TAG(PT_UNICODE,0x662B)