# Using OAuth 2.0 to access Gmail Inbox from SSIS package

**URL:** <https://community.cdata.com/t/using-oauth-2-0-to-access-gmail-inbox-from-ssis-package/1085>\
**Category:** CData Drivers\
**Tags:** oauth-2.0, ssis-package, question, gmail\
**Created:** [May 6, 2025, 5:25pm UTC](https://community.cdata.com/t/using-oauth-2-0-to-access-gmail-inbox-from-ssis-package/1085 "2025-05-06T17:25:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GritKit](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@GritKit](https://community.cdata.com/u/GritKit)\
**Post date:** [May 6, 2025, 5:25pm UTC](https://community.cdata.com/t/using-oauth-2-0-to-access-gmail-inbox-from-ssis-package/1085/1 "2025-05-06T17:25:39Z")

</div>

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&nbsp; **CData SSIS Components for Email**.

---

<div class="post-metadata">

**Author:** ![Cameron\_L](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@Cameron\_L](https://community.cdata.com/u/Cameron_L)\
**Post date:** [May 7, 2025, 3:04pm UTC](https://community.cdata.com/t/using-oauth-2-0-to-access-gmail-inbox-from-ssis-package/1085/2 "2025-05-07T15:04:03Z")

</div>

Hi ​ @GritKit &nbsp;,  
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:** &nbsp;All&nbsp;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** : [CData SSIS Components for Gmail - Establishing a Connection](https://cdn.cdata.com/help/DLK/rssis/pg_connectionr.htm#user-accounts-oauth)&nbsp;  
**Creating a Custom OAuth App** : [CData SSIS Components for Gmail - 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](https://www.cdata.com/support/submit.aspx).

---

<div class="post-metadata">

**Author:** ![GritKit](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@GritKit](https://community.cdata.com/u/GritKit)\
**Post date:** [May 7, 2025, 10:35pm UTC](https://community.cdata.com/t/using-oauth-2-0-to-access-gmail-inbox-from-ssis-package/1085/3 "2025-05-07T22:35:06Z")

</div>

​ @Cameron_L , thank you for your response and links to documentation.

[Article](https://cdn.cdata.com/help/DLK/rssis/pg_oauthcustomappcreate.htm) 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&nbsp;Google’s APIs & Services_

Here are my settings:

 ![dc9a7cd8-e40c-44ad-8a6d-c9f2b01d3a77.png](https://us1.discourse-cdn.com/cdata/original/2X/6/6e8994319df37922644593f3148ec42b4682e292.png)
