Skip to main content

Google now requires OAuth 2.0 to access Gmail, and my SSIS package had stopped working.

I did quite extensive research, but still can’t figure out how to make my CData Gmail Connection Manager to access my company’s Gmail Inbox.

 

Can someone please provide a guidance (ideally step-by-step) on how to make my SSIS package query the Gmail Inbox using either CData SSIS Components for Gmail or CData SSIS Components for Email.

Hi ​@GritKit ,
The CData SSIS Components for Gmail do support OAuth authentication to access the Gmail API. Below are some steps for connecting using OAuth in SSIS:

  1. Open the CData Gmail Connection Manager and set these properties:
    • AuthScheme = OAuth
    • InitiateOAuth = GETANDREFRESH
    • OAuthClientId = <Your OAuth Client Id>
    • OAuthClientSecret = <Your OAuth Client Secret>
  2. After setting those properties, click "Test Connection" to begin the OAuth flow and connect. The component opens the OAuth endpoint in your default browser where you can log in and grant permissions to the application.
  3. After logging in and granting permissions you should receive a successful connection message and you can click "OK" to save your connection.

Note: All user account flows require that you create and register a custom OAuth application with Gmail.

Additionally, please find some helpful documentation links below going over this process:

Establishing a Connection: https://cdn.cdata.com/help/DLK/rssis/pg_connectionr.htm#user-accounts-oauth 
Creating a Custom OAuth App: https://cdn.cdata.com/help/DLK/rssis/pg_oauthcustomappcreate.htm 

I hope this helps and should an issue with your connection persist, I would suggest opening a ticket with our support team here.


@Cameron L, thank you for your response and links to documentation.

 

Article explains how to create OAuth 2.0 Client IDs. For SSIS apps it’s important to select Desktop type (option Other is no longer available).

 

CData Gmail Connection Manager settings:

  • Auth Schema: OAuth
  • Schema: REST <== don’t use IMAP
  • Initiate OAuth: GETANDREFRESH
  • OAuth ClientId: enter value generated in Google’s APIs & Services
  • OAuth Client Secret: enter value generated in Google’s APIs & Services

 

Here are my settings: