Problem
When you try to sync in Google Cloud Directory Sync, you receive the following error message:
'400 Bad Request { "error" : "invalid_grant", "error_description" : "Token has been expired or revoked." }'
Environment
- Google Cloud Directory Sync
Solution
You need to authorize your Google account to allow authentication by following the steps described below:
- Open Configuration Manager and click Google Domain Configuration.
- Click Authorize Now > Sign In.
- Sign in to your Google Account as a super admin.
- Click Allow.
- Configuration Manager receives the verification code and authorizes GCDS.
- Close the browser window.
If you are using a machine without a GUI, go to How do I authorize GCDS on a machine without a GUI?
Optional step: Revoke the access token.
If you're concerned about using long-standing credentials, you can revoke the access token and reauthorize:
- Ensure that you’re signed in using the super admin account that was used to authorize GCDS.
- Go to Apps with access to your account.
- Under Google apps, click Google Cloud Directory Sync.
- Click Remove Access.
- Reauthorize your account by following the steps above.
If you need further information, please review Authorize your Google Account
Cause
You are receiving the 400 Bad Request error and want to solve it.