Provisioning mailbox in Office 365 fails with error: An unknown error has occurred. Refer to correlation ID…

This sometimes happens because of a remnant mailbox – user or archive – that prevents the creation of a new mailbox. The fix is to forcibly remove the existing mailbox and re-create it. The article below describes the process.

https://blogs.technet.microsoft.com/exovoice/2016/11/07/how-to-fix-office365-user-provisioning-issues-that-are-generated-by-faulty-exchange-attributes/