OpenMsgStore fails while accessing archive mailbox by using an account having full access permission in Exchange Online (O365)

Apr 17, 2015 at 12:02 PM

I am trying to access archive mailbox using an account which has full access permissions on the mailbox. The mailbox and archive both are in cloud - O365. I have "ArchiveGUID" of the archive which I want to access. I use this ArchiveGUID and append to MsgStoreEntryID. i.e. I use PR_ENTRYID to access archive mailbox store.

For example, I want to access xyz's mailbox archive (present in O365) using account "SuperAccnt". SuperAccnt has full access permission on xyz's mailbox. I have archive GUID of xyz's mailbox. IMapiSession::OpenMsgStore fails here. With full access permissions I am able to access xyz' mailbox and dumpster. It just fails while accessing archive mailbox.

The strange thing I noticed is that if I open the profile in Outlook 2013 and let Outlook load the archive store and close Outlook and then OpenMsgStore succeeds.

The same code works well with Exchange 2013 On premise - i.e. Loading profile in Outlook is not required. However, For Exchange Online it requires profile to be loaded in Outlook and then only OpenMsgStore works.

Am I missing anything here ?

Thanks in advance,