question

AmitBadgujar-7293 avatar image
2 Votes"
AmitBadgujar-7293 asked TusharBhargava-6888 published

Migration from google g suite to office 365 - Error: MigrationPermanentException: The call to https://www.googleapis.com/oauth2/v4/token returned with status code Unauthorized:

Error: MigrationPermanentException -Unauthorized

I have Migration from google g suite to office 365 and when i make sync it issue

User status
Data migrated:
Migration rate:
Last successful sync date:
Error: MigrationPermanentException: The call to https://www.googleapis.com/oauth2/v4/token returned with status code Unauthorized: Unauthorized Error response: unauthorized_client Error description: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested. --> The call to https://www.googleapis.com/oauth2/v4/token returned with status code Unauthorized: Unauthorized Error response: unauthorized_client Error description: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.

office-sharepoint-onlineoffice-exchange-server-administrationoffice-sharepoint-server-administration
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

michev avatar image
1 Vote"
michev answered AmitBadgujar-9672 commented

Make sure you've followed the instructions to add API permissions on Google side: https://docs.microsoft.com/en-us/exchange/mailbox-migration/perform-g-suite-migration#enable-api-usage-in-your-project

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I already followed all the steps which you mentioned above, but still getting the same issue -

Error: MigrationPermanentException: The call to https://www.googleapis.com/oauth2/v4/token returned with status code Unauthorized: Unauthorized Error response: unauthorized_client Error description: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested. --> The call to https://www.googleapis.com/oauth2/v4/token returned with status code Unauthorized: Unauthorized Error response: unauthorized_client Error description: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.

1 Vote 1 ·
EmilyDu-MSFT avatar image
0 Votes"
EmilyDu-MSFT answered 41669690 published

@AmitBadgujar-7293

It seems that the service account configured in the Google Console doesn’t have enough permissions to perform a migration.

Please check whether service account is configured correctly and contain all necessary scopes.

References about how to troubleshoot the issue:
“Client Is Unauthorized To Retrieve Access Tokens Using This Method.” G Suite Migration Error
Error: Cannot connect to Calendar API: Unauthorized Client. Client is unauthorized to retrieve access tokens using this method

References about how to perform a Google Workspace (formerly G Suite) migration:
Perform a Google Workspace (formerly G Suite) migration
Migrate consumer Google Workspace (formerly G Suite) mailboxes to Microsoft 365 or Office 365
G Suite to Office 365 Migration: A Step-By-Step Guide from Our Pros


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I already followed all the steps which you mentioned above, but still getting the same issue -

Error: MigrationPermanentException: The call to https://www.googleapis.com/oauth2/v4/token returned with status code Unauthorized: Unauthorized Error response: unauthorized_client Error description: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested. --> The call to https://www.googleapis.com/oauth2/v4/token returned with status code Unauthorized: Unauthorized Error response: unauthorized_client Error description: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.

0 Votes 0 ·
Jihad-0414 avatar image Jihad-0414 AmitBadgujar-9672 ·

have you managed to find a solution for this error message

0 Votes 0 ·

I experienced this same problem and it turned out to be the endpoint associated with the migration. The endpoint you use needs to be the address of the service account you created to facilitate the migration. All I had to do was add the correct endpoint and it worked like a charm.

In Classic exchange admin center, sign in.
On the left click "Recipients".
At the top select the "Migration" tab
Above the batches list you'll see some options like "New', "Edit", "delete", "stop".
Click the 3 dots next to those option and select "migration endpoints"
Select "New"
Select Migration type
Enter in your super Admin email and upload the json file you created for your service account.
On the next page under "Migration endpoint name" enter in the email address of the service account you created.
For max concurrent migrations i set it to 20
max concurrent sync i set to 15
Save and select this new endpoint name when you try your next migration.

Hope this helps

0 Votes 0 ·
JasonGaffney-7827 avatar image
2 Votes"
JasonGaffney-7827 answered 41669690 commented

Have you found a solution for this? I have the same issue and have through the same documents multiple times.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I experienced this same problem and it turned out to be the endpoint associated with the migration. The endpoint you use needs to be the address of the service account you created to facilitate the migration. All I had to do was add the correct endpoint and it worked like a charm.

In Classic exchange admin center, sign in.
On the left click "Recipients".
At the top select the "Migration" tab
Above the batches list you'll see some options like "New', "Edit", "delete", "stop".
Click the 3 dots next to those option and select "migration endpoints"
Select "New"
Select Migration type
Enter in your super Admin email and upload the json file you created for your service account.
On the next page under "Migration endpoint name" enter in the email address of the service account you created.
For max concurrent migrations i set it to 20
max concurrent sync i set to 15
Save and select this new endpoint name when you try your next migration.

Hope this helps

0 Votes 0 ·
JimboJones-4728 avatar image
0 Votes"
JimboJones-4728 answered

I am getting the same error (not 100% resolved yet).
I did however get past the error you're getting. I'm doing a GWorkspace to M365 Migration using the gmail migration tool in Exchange online.
I can't upload the screenshot because the upload tool's not working but when you get to the step "Automate the configuration of your Google Workspace for migration", once it's finished doing it's 4 setup steps there's a link it gives you and a ClientId and a Scope you need to manually add into Google admin. Once I did that I stopped getting that error you're receiving when running the PS "Test-MigrationServerAvailability" command.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TusharBhargava-6888 avatar image
0 Votes"
TusharBhargava-6888 answered TusharBhargava-6888 published
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.