Recently, I went to an error when moving online mailboxes from Office 365 – Exchange Online – to on premises – Exchange 2013.
Strangely, these mailboxes have been moved multiple times in both direction – on premises to online and online to on premises – without any issue.
The migration batch starts and content is being synchronized between Exchange Online and Exchange On Premises and finally the job failed with the error
Error: MigrationPermanentException: Error: Resource ’CiAgeOfLastNotification(System)’ is unhealthy and shouldn’t be accessed

After some digging, the issue was due to a corrupted index on Exchange On Premises.
Strangely, these mailboxes have been moved multiple times in both direction – on premises to online and online to on premises – without any issue.
The migration batch starts and content is being synchronized between Exchange Online and Exchange On Premises and finally the job failed with the error
Error: MigrationPermanentException: Error: Resource ’CiAgeOfLastNotification(System)’ is unhealthy and shouldn’t be accessed

After some digging, the issue was due to a corrupted index on Exchange On Premises.
Solution
- On the Exchange server which host the mailboxes databases, stop the following services
- Microsoft Exchange Search
- Microsoft Exchange Search Host Controller
- Using Windows Explorer, browse to the location where the index are located
- This is a subfolder named with a GUID below the folder where the database file is stored
- To get to the path to the database, run the PowerShell command Get-MailboxDatabase | fl *path*
- Delete the folder with a GUID – BE CAREFUL don’t delete anything else
- Restart both services and wait few minutes until the Fast engine starts indexing again
- Then start again your migration