Search code examples
outlook-redemption

Programmatically adding an Exchange Online mailbox to Outlook


Does Redemption support adding an Exchange Online mailbox to Outlook? I know this can be done for a .pst using NameSpace.AddStoreEx, but can Redemption handle an Exchange Online store?

My goal is to turn off Outlook automapping and programmatically add Exchange Online mailboxes based on delegated permissions.

Thanks.


Solution

  • Yes, Redemption exposes RDOSession.Stores.AddDelegateExchangeMailBoxStore - note that it needs to be able to retrieve the autodiscover XML of that mailbox. It needs to either be cached, or used alongside RDOSession.LogonHostedExhangeMailbox (which takes explicit credentials) or the parent RDOSession object must be used inside the outlook.exe address space (e.g. from a COM addin or Outlook VBA) - this way Redemption can intercept Outlook credentials.