Migration of selected messages from In-Place Archive to another tenant

%3CLINGO-SUB%20id%3D%22lingo-sub-2920729%22%20slang%3D%22en-US%22%3EMigration%20of%20selected%20messages%20from%20In-Place%20Archive%20to%20another%20tenant%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2920729%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20migrate%20a%20select%20group%20of%20messages%20(based%20on%20certain%20criteria%20related%20to%20from%2Fto%2Fcc%20addresses)%20from%20the%20In-Place%20Archive%20of%20one%20mailbox%20in%20tenant%20A%20to%20another%20mailbox%20in%20tenant%20B.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20a%20Global%20Admin%20for%20both%20tenants%20A%20and%20B%2C%20so%20I%20wanted%20to%20check%20if%20there's%20a%20way%20to%20do%20this%20through%20the%20admin%20center%20or%20PowerShell.%20I%20realize%20I%20can%20do%20this%20through%20an%20Outlook%20client%20(by%20searching%2Ffiltering%20and%20then%20moving%20messages)%2C%20but%20this%20has%20proven%20to%20take%20too%20much%20time%2C%20since%20I%20am%20unable%20to%20move%20so%20many%20messages%20at%20once%20from%20a%20search%20results%20display.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2920729%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2921950%22%20slang%3D%22en-US%22%3ERe%3A%20Migration%20of%20selected%20messages%20from%20In-Place%20Archive%20to%20another%20tenant%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2921950%22%20slang%3D%22en-US%22%3ENo%2C%20there%20isnt.%20Best%20you%20can%20do%20via%20the%20UI%20is%20run%20eDiscovery%20search%2Fexport%2C%20then%20import%20the%20resulting%20PST%20(or%20individual%20messages)%20to%20the%20other%20mailbox.%20However%2C%20there%20is%20no%20way%20to%20limit%20the%20search%20to%20just%20items%20in%20the%20archive%2C%20so%20you%20might%20need%20to%20get%20creative%20with%20the%20filter.%3CBR%20%2F%3EPowerShell%20on%20its%20own%20doesn't%20expose%20any%20item-level%20operations%2C%20but%20generally%20speaking%20you%20can%20use%20some%20EWS%20(or%20Graph%20API)%20based%20script.%20Here's%20a%20sample%20one%2C%20though%20it%20does%20NOT%20support%20moving%20between%20mailboxes%20in%20different%20tenants%3A%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FDavid-Barrett-MS%2FPowerShell-EWS-Scripts%2Fwiki%2FMerge-MailboxFolders.ps1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FDavid-Barrett-MS%2FPowerShell-EWS-Scripts%2Fwiki%2FMerge-MailboxFolders.ps1%3C%2FA%3E%3CBR%20%2F%3EYou%20can%20however%20use%20it%20as%20a%20starting%20point%20to%20build%20you%20own%20solution.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello,

 

I would like to migrate a select group of messages (based on certain criteria related to from/to/cc addresses) from the In-Place Archive of one mailbox in tenant A to another mailbox in tenant B.

 

I am a Global Admin for both tenants A and B, so I wanted to check if there's a way to do this through the admin center or PowerShell. I realize I can do this through an Outlook client (by searching/filtering and then moving messages), but this has proven to take too much time, since I am unable to move so many messages at once from a search results display.

 

Thanks!

3 Replies
No, there isnt. Best you can do via the UI is run eDiscovery search/export, then import the resulting PST (or individual messages) to the other mailbox. However, there is no way to limit the search to just items in the archive, so you might need to get creative with the filter.
PowerShell on its own doesn't expose any item-level operations, but generally speaking you can use some EWS (or Graph API) based script. Here's a sample one, though it does NOT support moving between mailboxes in different tenants: https://github.com/David-Barrett-MS/PowerShell-EWS-Scripts/wiki/Merge-MailboxFolders.ps1
You can however use it as a starting point to build you own solution.
Thanks! Using eDiscovery then exporting/importing the PST may actually work. The specific criteria I will use will only bring up messages in the archive anyway, so that’ll work out.
One question though: Can I delete the messages from the first mailbox using this? Remember I want to move, not copy, messages.