Forum Discussion
Error: MigrationPermanentException -Unauthorized
emadadel2008 Have you had any luck with this? I am experiencing the same issue. I also have two separate service requests open and MS tech have yet to assist in help me resolve this or point me in the right direction. I have followed the steps outlined in the migration documents but still no resolve.
- emadadel2008Apr 27, 2020MVP
Well, make sure the token is valid, and has the necessary permissions/scopes as detailed here: https://docs.microsoft.com/en-us/exchange/mailbox-migration/perform-g-suite-migration#grant-access-t...
make sure you have done this point "Grant access to the service account for your Google tenant" in https://docs.microsoft.com/en-us/exchange/mailbox-migration/perform-g-suite-migration#grant-access-t...
Grant access to the service account for your Google tenant
Go to the G Suite Admin page and sign in as G Suite admin for your tenant.
Click Security, then click Advanced settings, and then click Manage API client access.
In Client Name, type the ClientId for the service account you created in the Create a Google Service Account section above.
In API Scopes, add the required scopes in comma-separated format, with no spaces in between. For example, https://mail.google.com/,https://www.googleapis.com/auth/calendar,https://www.google.com/m8/feeds/,https://www.googleapis.com/auth/gmail.settings.sharing. If the API Scopes are entered incorrectly, the resulting list won't match and the migration process will fail later, after you start the migration batch.
Click Authorize. Verify that the resulting list shows "Email (Read/Write/Send)", "Calendar (Read-Write)", "Contacts (Read/Write)", and "https://www.googleapis.com/auth/gmail.settings.sharing".
Note