0
votes

We are migrating mailboxes from an Exchange organization in our multi-forest environment to Exchange Online. When we migrated shared mailboxes from one of the forests and a user has that mailbox mapped to their profile, it is causing multiple user experience issues post-migration because the profile is looking for the mailbox where it no longer exists. We want to find a way to programatically update the profile of those that have access to this mailbox by removing it from their profile. So far, no solutions have been found. I have no experience with VBA, but others have suggested that it might work. Does anyone know how to do something like this?

1

1 Answers

0
votes

Outlook Object Model won't let you remove delegate stores. You can use either Extended MAPI (C++ or Delphi) or Redemption (any language). In case of Redemption, you can use RDOStore.Remove method: create an instance of the RDOSession object, sets its MAPIOBJECT property to Application.Session.MAPIOBJECT from Outlook (that will ensure that both Redemption and Outlook use the same MAPI session), loop through the RDOSession.Stores collection, find the store in question by name or by checking the store type name (TypeName() will return "RDOExchangeDelegateMailboxStore"), call RDOStore.Remove.

It might also be possible to remove the store without running Outlook or logging into a profile by using the ProfMan library (comes with the distributable version of Redemption), but it is more involved as ProfMan requires low level knowledge of the way the stores are configured in MAPI.