How to authorize your Google Account

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:

  1. Open Configuration Manager and click Google Domain Configuration.
  2. Click Authorize Now > Sign In.
  3. Sign in to your Google Account as a super admin.
  4. Click Allow.
  5. Configuration Manager receives the verification code and authorizes GCDS.
  6. 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:

  1. Ensure that you’re signed in using the super admin account that was used to authorize GCDS.
  2. Go to Apps with access to your account.
  3. Under Google apps, click Google Cloud Directory Sync.
  4. Click Remove Access.
  5. 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.