A mailbox migration is currently in progress and functioning as expected. However, when attempting to migrate OneDrive using ODM, the process fails with the error: ‘Attempted to perform an unauthorized operation.’
The service account has SharePoint Administrator permissions on the target environment, and all required consents have been granted.
Multi-Factor Authentication
Although MFA is disabled for the accounts, when accessing OneDrive for the first time (during provisioning), Microsoft displays a page explaining the benefits of MFA and how to configure it. At the bottom of this page, there is a ‘Skip Setup’ link. Clicking this link completes OneDrive provisioning, allowing ODM to migrate data without issues.
Workaround:
Note: OneDrive must be provisioned at least 24 to 48 hours before starting a migration.