Knowledge Base

How to fix problems with the migration of public folders (quota exceeded)


Your migration process cannot be completed, and you see the following error messages in the program's log files:

Error while uploading package. System.Exception: [ErrorQuotaExceeded] - Mailbox has exceeded maximum mailbox size.


An internal server error occurred. Try again later.


You may get this error when:

Target public folder mailbox quota is exceeded

The above error may occur when your target primary public folder mailbox exceeds its maximum allowed size, which is 50 GB (Fig. 1.) or 100 GB, depending on your Office 365 plan.

Fig. 1. The quota of a primary public folder mailbox is exceeded.

To solve this problem, you need to wait for up to two weeks for the Office 365 AutoSplit feature to kick in. Automatic splitting will create a secondary mailbox for public folders and move some of the data from the primary mailbox to the secondary mailbox (Fig. 2. and 3.). 

Fig. 2. The primary mailbox usage after the auto-split process.

Fig. 3. A new mailbox created automatically by the auto-split feature.

Before this happens, it might not be possible to write any new data to your Office 365 public folders (this includes delivering emails to mailbox-enabled public folders), because the size limit has been reached.

It is possible and actually advised to manually create more public folder mailboxes (Fig. 4.). You can also contact Microsoft support (Office 365 business support details) and ask them to create additional public folder mailbox(es) prior to migration.

However, it is not possible to rush the auto-split feature otherwise or to manually redirect migration to additional public folder mailbox. The above is a standard Exchange Online behavior and, as of June 2017, it is not possible to override it. Learn more about the AutoSplit process

Fig. 4. Data usage of a manually created mailbox after the auto-split process.

After the auto-split operation is properly completed, use the Run delta migration button in the Administration Panel of CodeTwo Office 365 Migration to migrate items that were not migrated previously.


It is possible that when the size of a public folder mailbox is close to the limit, Microsoft may increase the mailbox storage size. In our tests, the mailbox storage quota grew from 50 to 73 GB (see Fig. 2.).


Sometimes the auto-split process is not starting, or it has started but hasn't finished. This may happen if you manually changed the default storage quota (i.e. the maximum allowed size of an item or individual folder) on your target server. It is strongly recommended that you use default storage quota to avoid that kind of problems. The settings on your target server should be the same as in Fig. 5.

Fig. 5. The size limits (storage quotas) for all public folders.

Target public folder quota is exceeded

You may also get the error described earlier if your source and target public folder quotas do not match, for example when you are migrating a public folder that exceeds the maximum folder size allowed in your target environment.

To fix the problem, you need to change the quota settings of your target public folders so that this value matches (or exceeds) the quota in your source organization. We recommend increasing the public folder quota to its maximum value, that is either 50 GB or 100 GB, depending on your Office 365 plan. You can change the quota settings via PowerShell by following the steps below.

  1. To view the current public folder quotas in your target Office 365, open Windows PowerShell, connect to your Office 365 tenant and execute the following command:
Get-OrganizationConfig | fl *DefaultPublicFolder*
  1. Your quota will be displayed (Fig. 6.). By default, the public folder size limit in Office 365 is 2 GB, and the warning is issued when a public folder exceeds 1.7 GB, as shown in the figure.

Fig. 6. Default public folder quota in Office 365.

  1. Now change the target quota limit to e.g. 50 GB, and the value when the warning message should be sent to e.g. 45 GB, by using the cmdlets below:
Set-OrganizationConfig -DefaultPublicFolderProhibitPostQuota 50GB
Set-OrganizationConfig -DefaultPublicFolderIssueWarningQuota 45GB
  1. After you execute these commands and wait (up to an hour) for the changes to propagate, you should be able to resume your migration.


Use the Run delta migration button in the Administration Panel of the CodeTwo Office 365 Migration to migrate items that were not migrated in the previous job cycle.

See also:

Was this information useful?