You can configure Public folders synchronization between Exchange online and Exchange Onprem. Public Folder mailboxes can be synchronized through Directory synchronization process but mail-enabled public folders can’t, so you have to do additional efforts in synchronizing mail-enabled public folders. Also remember that Public folders can’t reside on both location (Exchange Online and Exchange onprem). So you need to decide where you want to keep public folders.
Here are steps for synchronizing onprem Public folders to Exchange Online.
1. If you still have outlook 2010 then make sure that the Public Folder DB is on an exchange mailbox server that has the Client Access Server role installed.
2. Create a new Mailbox Database on the CAS role server. Make sure to exclude the new DB from provisioning mailboxes:
New-MailboxDatabase -Server Exch01 -Name PFDB -EdbFilePath C:\PFDB\PFDB.edb -LogFolderPath C:\PFDBLogs\ -IsExcludedFromProvisioning $true
3. Create a proxy mailbox within the new mailbox database and hide the mailbox from the address book. The SMTP of this mailbox will be returned by AutoDiscover as the DefaultPublicFolderMailbox SMTP, so that by resolving this SMTP the client can reach the legacy exchange server for public folder access.
New-Mailbox -Name PFMbx01 -Database PFDB
Set-Mailbox -Identity PFMBX01 -HiddenFromAddressListsEnabled $true
Set-MailboxDatabase PFDB -RPCClientAccessServer Exch01
4. Run Azure AD Connect to synchronize the proxy mailbox user object with Office 365:
PS C:\Program Files\Microsoft Azure AD Sync\Bin> .\DirectorySyncClientCmd.exe
5. Download the synchronization scripts from the Microsoft site and save it to Exchange server:-
6. Run the following command to synchronize mail-enabled public folders from your local on-premises Active Directory to O365:
Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile:sync_summary.csv
Here provide your Exchange online credential. Account which you are using must be member of organization management
7) Enable the exchange online organization to access the on-premises public folders. You will point to all of the proxy public folder mailboxes that you created:
Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes PFMbx01
This again needs to be run for Exchange online