Authorizing Zoho eProtect to access Google Workspace 

Overview

To authorize Zoho eProtect to access your organization's Google Workspace users and email data, Google Workspace mandates the following authorization process. First, the organization's admin will have to create a Google Workspace service account, then permit Zoho eProtect to access the required services in Google Workspace and then define the scopes that can be accessed by the service account that you are creating. 

Ensure that this entire authorization process is done in a browser where no Google Workspace or Gmail account, other than the one from which you will be creating the service account is open. 

Google Workspace Authorization

To authorize your Google Workspace account, admins should download a Key file which contains vital information required for authorization. The key file can be downloaded in either the JSON format or the P12 format. As an administrator you can use one of the below options to download the key file:

Authorize using the Cloud Shell Method (Recommended)

Below are the steps involved to authorize using the JSON method:

Follow these instructions to download the JSON file and authorize Zoho eProtect to access your account:

  1. Log in to the Google Developers Console with your admin credentials.
  2. Click Activate Cloud Shell from the upper right corner.
    google cloud console
  3. Copy the below script and paste it into the Cloud Shell console.

    wget -cO - https://workdrive.zohoexternal.com/external/66b83748d91361c3aaefdedcef8dd96bd8d77a9bdfb5d20b4bfe306bd0e69637/download?directDownload=true > "gcp.sh";sh gcp.sh

  4. Enter a project id as "eprotectapp" in the Cloud Shell.

    Note:

    • The project id can be any string that is - all lowercase letter, more than 6 characters in length and less than 16 character in length.
    • If you receive an error, follow the project id criteria that appear on the screen.
  5. Select AUTHORIZE and then click DOWNLOAD to save the JSON file to your computer.
  6. Open the JSON file and make a note of the client_email and client_id.
    • client_email - this is the Service account email address which you should enter at the time of migration creation.
    • client_id - Enter this in the Client ID field during scope definition.
  7. Follow the instructions given in the Granting access to Service Account section, to define the scopes that can be accessed by the service account.

Authorize using the Google Developers Console

The steps that follow are required if you wish to authorize using the P12 file. If you have already downloaded the JSON file, you can proceed to the Granting access to Service Account step. Authorizing Zoho eProtect to access your account using the P12 method involves the below steps:

Creating G Suite Service Account:

This section will guide you through the process of setting up a service account in your Google Workspace account.

  1. Log in to the Google Developers Console with your admin credentials.
  2. Click on the dropdown next to your organization's name from the top of the window, and select New Project.
    Creating GSuite service account
  3.  Enter a name for your project in the Project Name field and click Create.
    Creating project in GSuite
  4. Select the Create Service Account option. 
    Create Service Account
  5. Enter a service name in the Service account name field, and a description for the service in the Service account description field, and click Create.
    Service Account details in GSuite
  6. In the next step, select the role that you want to assign to this service account. In the Role field, select Project > Owner, and click Continue.
    Service account permissions
  7.  If you'd like to assign roles to users and admins, enter the relevant data and click Done.
  8. Click the email address under the Email field. This will be the Service account email address. Make sure that you note this down, as you will have to enter it in the Zoho eProtect.*
    Gsuite Migration Account selection
  9. The value generated in the Unique ID field is the Client ID. Please make note of this value as you will need it for later use during the authorization process. 
    Client ID for migration
  10. Now, navigate to the Keys tab, click Add Key, and select the Create New Key option.
    Creating new key
  11. Select P12 and click Create.
    Creating private key for Gsuite Migration
  12. Once you've created the key, you will notice that a file was downloaded onto your system. Please make sure that you save a copy of this file for later use during the migration.*

​Enabling API Access:

You will have to enable access to some of these APIs. Follow the below instructions to enable access.

  1. Log in to the Google API Library.
  2. Locate the Gmail API and click Enable.
  3. Locate the Admin SDK and click Enable.

Granting access to Service Account

This section will aid you in granting access to the service account and defining the scopes that can be accessed by the service account.

  1. Log in to your Google Workspace Admin account.
  2. Go to the Security menu, and select API Controls under Access and data control.
  3. Under Domain-wide delegation, click MANAGE DOMAIN-WIDE DELEGATION.
  4. On this page, click Add New.​
  5. In the Client ID field, enter the client_id that was generated.
  6. Copy the following values and paste them in the One or more API scopes field, and click Authorize.

    https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/admin.directory.domain.readonly, https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.group.member.readonly, https://www.googleapis.com/auth/gmail.readonly, https://www.googleapis.com/auth/admin.directory.orgunit.readonly

Once done, this will grant access to the service account and the mentioned scopes will be made accessible.

Details to be entered in the Zoho eProtect

* The service account email address and the file that was downloaded will be required for use while setting up Zoho eProtect.

  • Enter the Super Admin email address of your Google Workspace organization account in the Google Workspace Super Admin Email Address field. 
  • Enter the Service account email address in the respective field.
  • Finally, upload the JSON or P12 file you downloaded in the Private key file field and click Verify.

This will authorize your Zoho eProtect account to access Google Workspace. Navigate to the Setting up Google Workspace in Zoho eProtect help page to continue set up.