Access on-premise public folders from Exchange Online

Access on-premise public folders from Exchange Online

9 February 2020 0 By editeur

Configure legacy local public folders as part of a hybrid deployment

Users whose mailboxes are migrated to Exchange Online required access to the public folder hosted on Exchange 2010 Server (on-premise). An Office 365 user who is not represented by an on-premises messaging user AD object will not be able to access the legacy on-premises public folder.

Prerequisites for migrating public folders

  • Outlook Anywhere must be activated and functional on the Exchange server.
  • The Exchange online organization is upgraded to the latest version supported for the public folder.
  • Outlook clients are upgraded to the latest update.

Create a mailbox database

New-MailboxDatabase -Server PFServerwithCAS -Name PFDB -IsExcludedFromProvisioning $True

Create a mailbox for the proxy

Create a proxy mailbox in the new mailbox database and hide the mailbox in the address book. The SMTP of this mailbox will be returned by AutoDiscover as the SMTP DefaultPublicFolderMailbox, so that by resolving this SMTP, the client can reach the legacy exchange server for access to public folders.

New-Mailbox -Name PFMailbox -Database PFDB

Provide the password for this mailbox.

Hide the mailbox from the address list

Set-Mailbox -Identity PFMailbox -HiddenFromAddressListsEnabled $true

Enable autodiscovery to return mailboxes to proxy public folders

Set-MailboxDatabase PFDB -RpcClientAccessServer MaiboxServerName

Download scripts: Mail-enabled Public Folders – directory sync script

Save the files to the local computer where you will be running PowerShell.

Configure directory synchronization

The directory synchronization service does not synchronize mail-enabled public folders. Running the following script will synchronize the mail-enabled public folders (on-premise). Special permissions assigned to mail-enabled public folders will need to be recreated in the cloud, as inter-local permissions are not supported in hybrid deployment scenarios.
On the legacy Exchange server, run the following command to synchronize mail-enabled public folders from your local Active Directory to O365.

Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile:sync_summary.csv

Check the error on the log file to resolve the problem.

Configure Exchange Online Users to Access Local Public Folders

The final step in this procedure is to configure the Exchange Online organization and allow access to legacy local public folders.

Connect to Exchange Online and run the following command:


Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes PFMailbox

We have to wait for Active Directory synchronization to finish to see the changes. This process can take up to 4 hours.