# Test Connection failed. OAuth authentication failed

**URL:** <https://community.cdata.com/t/test-connection-failed-oauth-authentication-failed/459>\
**Category:** Editions\
**Tags:** article, oauth, ssis\
**Created:** [October 13, 2023, 9:31pm UTC](https://community.cdata.com/t/test-connection-failed-oauth-authentication-failed/459 "2023-10-13T21:31:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luçjano\_Capo](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/lu%C3%A7jano_capo/32/1638_2.png) [@Luçjano\_Capo](https://community.cdata.com/u/Lu%C3%A7jano_Capo)\
**Post date:** [October 13, 2023, 9:31pm UTC](https://community.cdata.com/t/test-connection-failed-oauth-authentication-failed/459/1 "2023-10-13T21:31:43Z")

</div>

This error frequently arises when the OAuth flow hasn’t been initialized. It’s important to note that while this issue is more common in SSIS it is not limited to SSIS components only; it can also occur in various editions. However, the InitiateOAuth connection property within SSIS components may not always be readily visible for configuration.

 ![705191a5-2605-4a08-a4bb-5a267399db14.png](https://us1.discourse-cdn.com/cdata/original/2X/4/4fe2c8996260e0b64ce95043e8809f514ceb8566.png)

To resolve this error, navigate to the **Advanced** tab and locate the **OAuth** section. Within this section, you will find the **Initiate OAuth** connection property. Depending on your specific use case, set this property to either **GETANDREFRESH** or **REFRESH**.

- **GETANDREFRESH** : Indicates that the entire OAuth Flow will be handled by the component. If no token currently exists, it will be obtained by prompting the user via the browser. If a token exists, it will be refreshed when applicable.
- **REFRESH** : Indicates that the component will only handle refreshing the OAuthAccessToken. The user will never be prompted by the component to authenticate via the browser. The user must handle obtaining the OAuthAccessToken and OAuthRefreshToken initially.

 ![6a31a350-0101-455a-9bbd-e83ba60d6e2b.png](https://us1.discourse-cdn.com/cdata/original/1X/b560d6ab988870d9ef1a00f5d95a2e5edf5da5d8.png)

Please reach out to [support@cdata.com](mailto:support@cdata.com) if this does not resolve the problem for you.
