KB Article: Generating Client ID and Client Secret for Google OAuth 2.0 & Configuring SMTP in BDRSuite

KB Article: Generating Client ID and Client Secret for Google OAuth 2.0 & Configuring SMTP in BDRSuite

Overview

This article provides step-by-step instructions to:

1. Generate a Client ID and Client Secret using the Google Cloud Console for OAuth 2.0 authentication.

2. Configure SMTP settings in BDRSuite using OAuth-based authentication with Google.

Generate a Client ID and Client Secret using the Google Cloud Console for OAuth 2.0 authentication
  1. Log in to console.developers.google.com using your personal or work email account.

  2. Ensure that the account you have logged in has the appropriate permissions to create a project. If not, contact your administrator for assistance. If your account has sufficient permissions, create a new project with a name of your choice and the following options:

    1. This option applies for work accounts only: In the Organization field, select your organization to attach it to the project.

    2. If you are using a work account, choose the appropriate parent organization in the Location Field. For personal Gmail accounts, this field will be preset to "No Organization".

  3. Make sure the project you just created is selected as the active project before you proceed to the next step.

  4. Navigate to the API Library page and enable "Gmail API"

  5. Navigate to the OAuth Consent Screen.

    1. Click Get Started.

    2. Under the App Information, Provide the Application Name, the support email of your help desk, and click Next.

    3. Under Audience, Choose the User Type as follows: Select "Internal User" if you have a Google Workspace account, else select "External User" and click "Next".

    4. Fill in your Contact Information and click Next.

    5. Click Create.

  6. Navigate to "Data Access" and provide access to the scope "https://mail.google.com/" under Gmail API and make sure to save the changes.

NotesNote : This comprehensive scope is required at this stage because of Gmail platform's limitations. You can read more about Gmail’s OAuth and SMTP scope requirements here: https://developers.google.com/workspace/gmail/imap/xoauth2-protocol#oauth_20_scopes

  1. This step applies only for "External Users": Navigate to the "Audience" page and add Test Users.

NotesNote: For External Users: Only the users in the test-users list are allowed to give consent to the app during the OAuth Authorization process. For Internal Users: The app is accessible to only the users in the Google Workspace.

  1. Navigate to "Clients" and Create a Client with the following settings:

    1. Set Application Type to "Web Application".

    2. Provide a name of your choice for the client.

    3. Under Authorized Redirect URIs, add a Redirect URI as follows:

      1. If your BDRSuite server is accessed only locally using local IP addresses, Provide a redirect URI in following format: https://<ip_address>.nip.io:<port_number>/emailoauth/gws          Eg: https://192.168.103.8.nip.io:6061/emailoauth/gws

      2. If your BDRSuite server is accessed using a public domain name or a public IP addresses, Provide a redirect URI in the following format: https://<public_ip_address or public_domain_name>:<port_number>/emailoauth/gws Eg : https://bdr.example.com:6061/emailoauth/gws

      3. If your BDRSuite server is accessed using the domain name localhost, provide a redirect URI in the following format: https://localhost:<port_number>/emailoauth/gws Eg:https://localhost:6061/emailoauth/gws

Notes
Note: Always use https:// for all OAuth redirect URIs to keep data secure and prevent interception.
  1. Save the OAuth Client.

  2. Make sure you download the "Client Secrets" file (JSON file) containing the authorization server details as it may not be available for download later.

  3. Make sure you copy the Client ID and Client Secret displayed on the screen since some of these information may not be accessible later. 

   Configure SMTP settings in BDRSuite using OAuth-based authentication with Google

1. Open the redirect URL(specified in step 8 of Generation of Client for OAuth) directly in your browser. Login into BDRSuite Web console with an admin account using the URL as follows,     

  1.  If your BDRSuite server is accessed only locally using local IP addresses, Provide a redirect URI in following format: https://<ip_address>.nip.io:<port_number>         Eg:https://192.168.103.8.nip.io:6061 
  2. If your BDRSuite server is accessed using a public domain name or a public IP addresses, Provide a redirect URI in the following format: https://<public_ip_address or public_domain_name>:<port_number> Eg:https://bdr.example.com:6061 
  3. If your BDRSuite server is accessed using the domain name localhost, provide a redirect URI in the following format: https://localhost:<port_number>Eg:https://localhost:6061
2. Access the SMTP settings page: Management -> Settings -> SMTP.

3. Provide values in various fields such as SMTP Server etc.. as per Google's settings.

4. For the "Authentication" field, choose Select OAuth > Google.

5. Provide the Client ID and Client Secret you saved earlier during the Google Project creation process.

6. Ensure that all fields are appropriately filled and click "Authorize and Save".

7. Proceed with the OAuth consent process. 

NotesNote : Make sure your account has permission to grant consent for third-party apps. If it doesn’t, contact your Organization’s admin.

    • Related Articles

    • KB Article: Generate Client ID, Client Secret & Tenant ID for Microsoft 365 OAuth & Configuring SMTP in BDRSuite

      Overview This guide provides step-by-step instructions on how to: Register an application in Microsoft Azure to generate: Client ID Client Secret Tenant ID Use these credentials to configure SMTP with OAuth in BDRSuite. Steps to Generate Client ID, ...
    • Backup aborted

      KB ID: 101005 Product: BDRSuite Backup Server Cause This will occur due to the following reasons: Backup configuration stored in the server and client is incompatible. When the Backup storage location is inaccessible to the backup server. If you ...
    • Configuring GMAIL SMTP Settings for Email Notifications

      By configuring the SMTP Server settings, you can enable the functionality of automatic email notifications, allowing you to receive reports directly to your email inbox. This configuration ensures that important information and updates are seamlessly ...
    • Configuring SMTP Settings for Email Reports

      KB ID: 115007 Challenge: Configure email settings to receive backup and restore reports in BDRSuite Solution: SMTP server settings are needed for setting up Email reports. Please login to your web console and go to Email Settings page to enable it. ...
    • How to Uninstall BDRSuite Client

      KB ID: 115019 Challenge: Uninstalling the BDRSuite Client from machines is essential for various reasons. This knowledge base article provides step-by-step instructions on how to perform a complete uninstallation of the BDRSuite Client for Windows ...