Backtrack:  
 
by lunarg on October 5th 2021, at 13:11

After migrating your on-premise Exchange mailboxes to Office 365 using Hybrid method, and subsequently decommissioning your on-premise Exchange, you may run into the issue where it is not possible to enable the in-place archive for a mailbox through the online Exchange Admin Portal or ECP. Attempting to do so will trigger an error.

Microsoft has released some Powershell scripts to work around the issue. You can run the scripts to enable or disable the in-place archive for a certain mailbox. The script does not need any prerequisites other than the Powershell AD module and the user running the script must have the proper permissions as outlined on the downloads page.

https://docs.microsoft.com/en-us/office365/troubleshoot/archive-mailboxes/cannot-provision-deprovision