To automatically discover and back up all public Exchange Online folders, add the public folders to an Exchange Online app.
Before You Begin
To back up and restore public folders, you must configure a service account that meets the following requirements:
Multi-factor authentication must be disabled for the service account.
The service account must be an online mailbox or a shared mailbox.
The service account must have owner permissions at the root level.
For backups and restores of public folders, the service account must have impersonation and view-only permissions.
Run below command to assign owner permission to service account for root and sub-folders.
You must run this command each time new public folders are added to the Exchange Online app.
Get-PublicFolder -identity "\" -Recurse | Add-PublicFolderClientPermission -user email@example.com -AccessRights Owner
From the navigation pane, go to Protect > Office 365.
The Office 365 apps page appears.
In the Name column, click the Exchange Online app to add the public folders to.
The app page appears.
On the Content tab, click Add, and then select All Public Folders.
The Edit association dialog box appears.
Select the Office 365 plan to use for the public folders, and then click Save.
To back up the public folders immediately, do the following:
In the All public folders row, click the action button , and then select Back up.
A message prompts you to confirm submission of the job.
After the backup completes, to view the backed-up public folders, on the Office 365 app page, in the row for the app, click the action button , and then click Restore.