What are the steps to create Public Folders on Office 365, when hybrid mode has been set up?
If you try to create any Public Folder mailboxes on Office 365 when hybrid mode has been set up, you will receive a 'HoldforMigration' error similar to the one pictured below. This is because the Office 365 Organization has the Public Folders configured as "Remote", so that users can access the On-Premises Public Folders. The error occurs because hybrid mode is expecting Microsoft tools to complete the migration.
In order to proceed, follow the steps below. Once these steps have been completed, hybrid mode can be re-enabled. The steps to do this are also included below.
First, take a quick look at the root Public Folder mailbox, by running from the Exchange Online PowerShell: (Get-OrganizationConfig).rootpublicfoldermailbox |fl
You will see results similar to these:
This picture shows that the root Public Folder mailbox is locked for migration. All other Public Folder mailboxes will also be unavailable.
Now look at the Organization Configuration, by running the following command from the same PowerShell: Get-OrganizationConfig |fl *public*
You will see results similar to these:
The PublicFoldersEnabled attribute set to remote confirms that the Office 365 users are set to use the On-Premises Public Folders.
To resolve this issue, and to be able to create the Public Folders on Office 365:
Remove all the existing Public Folder mailboxes on Office 365, by running on the Exchange Online PowerShell: Get-Mailbox -PublicFolder |Remove-Mailbox -PublicFolder
Note: It may be necessary to run the cmdlet twice, because when there is more than one Public Folder mailbox, it is not possible to delete the primary mailbox before deleting the others.
Warning: In a Hybrid scenario, where Public Folders are being used On-Premises, the Public Folder mailboxes on Office 365 should be empty and not have any relevant data. If unsure if the Public Folder mailboxes are empty, verify that they are empty before deleting them.
Once all the Public Folder Mailboxes are deleted from Office 365, change the Organization Configuration to use Public Folders on Office 365, by running on the Exchange Online PowerShell: Set-OrganizationConfig -PublicFoldersEnabled Local -RemotePublicFolderMailboxes $null
Warning: This will break the connectivity to the On-Premises Public Folders for all users with a mailbox on Office 365. Plan a maintenance window.
Now create a Public Folder mailbox, and assign root permissions to this Public Folder mailbox to the admin account being used for the migration. Exact steps are provided in KB005069. Plus, here is a video on the process for creating the Public Folder mailbox and assigning root permissions: Video
Note: You do not need to create all the Public Folders on Office 365. Just create the top-level folder, and MigrationWiz will create the rest, and migrate the permissions, during migration.
Now revert the Organization Configuration, and restore the access to the On-Premises Public Folders, by running: Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes <YourOnPremisesPFMailbox>
This last change can take a while to apply. To make sure that the change applied run the following cmdlet: Get-Mailbox <username> |fl *public*
Once you are certain that the default Public Folder mailbox is the On-Premises one, inform the users that the access to the Public Folders has been restored. Again, this might take up to one hour, so plan carefully for the Public Folders downtime.
Finally, since the Organization Configuration on Office 365 has been changed, revisit the KB005103 and run the script at the bottom to change the default public folder mailbox parameter to make sure that the MigrationWiz administrator on Office 365 has an Office 365 Public Folder mailbox as default.