Gmail

This document provides information on how to configure Gmail connection for Focus product.

https://docs.getvisibility.com/scan-with-getvisibility/configure-data-sources/gmail#create-oauth2-credentialsCreate OAuth2 Credentials
  • Create a Project in Google Cloud Console:

  • Enable the Gmail:

    • In the Google Cloud Console, navigate to the "APIs & Services" > "Library"

    • Search for "Gmail API" and click on it

    • Click the "Enable" button to enable the Goolge Drive Activity API for your project

  • Create OAuth 2.0 Credentials:

    • In the Google Cloud Console, navigate to the "APIs & Services" > "Credentials" tab

    • Click "Create credentials" and select "Service account"

    • Enter a name in the Service account name field and CREATE AND CONTINUE

    • Under Grant this service account access to the project, select role as Owner and click DONE

    • Select the newly created service account and click Keys > Add Key > Create new key

    • Make sure the key type is set to json and click Create

    • The new private key pair is generated and downloaded to the machine. Note the values of private_key, client_email and client_id

https://docs.getvisibility.com/scan-with-getvisibility/configure-data-sources/gmail#delegate-domain-wide-authority-to-your-service-accountDelegate domain-wide authority to your service account
  • From your domain's Admin console, go to Main menu menu > Security > Access and data control > API controls

  • In the Domain wide delegation pane, select Manage Domain Wide Delegation

  • Click Add new

  • In the Client ID field, enter the client ID obtained from the service account creation steps above

  • In the OAuth Scopes field, enter a comma-delimited list of the scopes required for the application

  • Use the below scopes:

    For scanning

    • https://www.googleapis.com/auth/admin.directory.user.readonly

    • https://www.googleapis.com/auth/gmail.readonly

    For tagging

    • https://www.googleapis.com/auth/gmail.modify

    • https://www.googleapis.com/auth/gmail.labels

    • https://www.googleapis.com/auth/gmail.metadata

  • Click Authorize

https://docs.getvisibility.com/scan-with-getvisibility/configure-data-sources/exchange-online