{"id":1327,"date":"2017-06-13T14:34:23","date_gmt":"2017-06-13T14:34:23","guid":{"rendered":"http:\/\/zappysys.com\/blog\/?p=1327"},"modified":"2025-09-24T05:21:34","modified_gmt":"2025-09-24T05:21:34","slug":"rest-api-authentication-with-oauth-2-0-using-ssis","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/","title":{"rendered":"How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC"},"content":{"rendered":"<h2><span id=\"Introduction\">Introduction<\/span><\/h2>\n<p><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1854\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png\" alt=\"\" width=\"100\" height=\"100\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png 180w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180-150x150.png 150w\" sizes=\"(max-width: 100px) 100vw, 100px\" \/><\/a>In the world of REST APIs you have to know how to authenticate, before using any API\u00a0method. In this article we will cover a topic how to authenticate to\u00a0an API with <a href=\"https:\/\/oauth.net\/2\" target=\"_blank\" rel=\"noopener\">OAuth 2.0<\/a>\u00a0technology using SSIS or ODBC Drivers. We are going to use <em>OAuth Connection Manager <\/em>SSIS component to achieve that, which is a part of\u00a0<a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\">ZappySys SSIS PowerPack<\/a>. Concepts listed in this articles also applicable for <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">ODBC PowerPack<\/a> product. If you like to access API data in BI Tools (e.g. Power BI, Excel, MS Access) or SQL Server directly then use ODBC PowerPack<\/p>\n<p>&nbsp;<\/p>\n<div id=\"custom_post_widget-2523\" class=\"content_block\">\n<h2><span id=\"Prerequisites\"><span id=\"Prerequisites\">Prerequisites<\/span><\/span><\/h2>\n<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:<\/p>\n<ol style=\"margin-left: 1.5em;\">\n<li><b>For SSIS:<\/b> <abbr title=\"SQL Server Integration Services\">SSIS<\/abbr> designer installed.\u00a0Sometimes it is referred to as <abbr title=\"Business Intelligence Development Studio\">BIDS<\/abbr> or <abbr title=\"SQL Server Data Tools\">SSDT<\/abbr> (<a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/ssdt\/download-sql-server-data-tools-ssdt\" target=\"_blank\" rel=\"noopener\">download it from the Microsoft site<\/a>).<\/li>\n<li>Basic knowledge of SSIS package\u00a0development using\u00a0<em>Microsoft SQL Server Integration Services<\/em>.<\/li>\n<li>Make sure\u00a0<span style=\"text-decoration: underline;\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys SSIS PowerPack<\/a><\/span>\u00a0is installed (<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/download\/\" target=\"_blank\" rel=\"noopener\">download it<\/a>, if you haven&#8217;t already).<\/li>\n<li>(<em>Optional step<\/em>)<em>.<\/em>\u00a0<a href=\"https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/360035974593\" target=\"_blank\" rel=\"noopener\">Read this article<\/a>, if you are planning to deploy packages to a server and schedule their execution later.<\/li>\n<li><b>For ODBC:<\/b>Download and Install\u00a0<a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys ODBC PowerPack<\/a>\u00a0(This includes XML \/ JSON \/ REST API and few other drivers for SQL Server and ODBC connectivity in tools like Excel, Power BI, SSRS)<\/li>\n<\/ol>\n<\/div>\n<h2>Concepts about OAuth 2.0<\/h2>\n<p>In this post we will not cover in depth about OAuth 2.0 protocol. If you want to learn how OAuth 2.0 Protocol works then <a href=\"https:\/\/aaronparecki.com\/oauth-2-simplified\/\" target=\"_blank\" rel=\"noopener\">check article like this<\/a> (or few more you can search). Don&#8217;t get overwhelmed by details \ud83d\ude42 because you don&#8217;t have to worry when you use <a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-oauth-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">SSIS OAuth Connection Manager<\/a>. Most of complexity of OAuth Protocol such as Token Extract, Token Renew is taken care by connection manager behind the scene for you.<\/p>\n<p>Important things you will have to do to <b>Call API in SSIS using OAuth<\/b> are listed below.<\/p>\n<ol>\n<li>Register OAuth App to obtain ClientID \/ Client Secret<\/li>\n<li>Confirm OAuth 2.0 Grant Type (By <strong>default<\/strong> it will be <strong>Authorization Code Grant<\/strong> (i.e. 3-legged grant &#8211; Which shows Login Page when you click Generate Token Button). If you see mention about Grant Type=<strong>Client Credentials<\/strong> or <strong>Password<\/strong> Grant on your API help file then on you must configure SSIS OAuth Connection Manager with <strong>OAuth Version=2.0<\/strong> and Change <strong>OAuth Grant Type<\/strong>\u00a0drop down on the UI to correct setting. Refresh Token is only supported in\u00a0<strong>Authorization Code Grant<\/strong>.<\/li>\n<li>Obtain necessary Token URL (i.e. Token endpoint(s) &#8211; Usually documented in your API helpfile. Example : https:\/\/somesite\/oauth\/token )<\/li>\n<li><strong>Optional<\/strong> &#8211; Identify Scopes (i.e. Permission you want to grant to the token. Many times its not needed)<\/li>\n<li><strong>Optional<\/strong> &#8211; Identify redirect URL (Usually entered on App registration Page.. Same URL must be entered on the SSIS OAuth Connection Manager &gt; Advanced Tab)<\/li>\n<\/ol>\n<h2><\/h2>\n<h2>Video Tutorial<\/h2>\n<div class=\"lyte-wrapper fourthree\" style=\"width:480px;max-width:100%;margin:5px auto;\"><div class=\"lyMe\" id=\"WYL_NFjPWxOUWzM\"><div id=\"lyte_NFjPWxOUWzM\" data-src=\"https:\/\/zappysys.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FNFjPWxOUWzM%2Fhqdefault.jpg\" class=\"pL\"><div class=\"tC\"><div class=\"tT\"><\/div><\/div><div class=\"play\"><\/div><div class=\"ctrl\"><div class=\"Lctrl\"><\/div><div class=\"Rctrl\"><\/div><\/div><\/div><noscript><a href=\"https:\/\/youtu.be\/NFjPWxOUWzM\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FNFjPWxOUWzM%2F0.jpg\" alt=\"\" width=\"480\" height=\"340\" \/><br \/>Watch this video on YouTube<\/a><\/noscript><\/div><\/div><div class=\"lL\" style=\"max-width:100%;width:480px;margin:5px auto;\"><\/div><\/p>\n<p>&nbsp;<\/p>\n<h2>Grant Types in OAuth 2.0<\/h2>\n<p>There are multiple Grant Types in OAuth. API may enforce one or other based on Security Level they want to enforce. You can look at your API documentation to find out which Grant Type they are using. In above example of Hubspot API we used Authorization Code Grant (Its Default grant type in SSIS OAuth Connection Manager)<\/p>\n<h3>Authorization Code Grant Type<\/h3>\n<p>This is most common grant type for any popular API you may access (e.g.\u00a0<a href=\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/\" target=\"_blank\" rel=\"noopener\">Google API<\/a>, <a href=\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/\">Facebook<\/a>, <a href=\"https:\/\/zappysys.com\/blog\/how-to-import-linkedin-data-in-powerbi\/\">LinkedIn<\/a>\u00a0). In this grant type it requires 3-legged authorization for first time before you can obtain Access \/ Refresh Token.\u00a0 Basically you will see Login Prompt for first time which you have to Accept before you can get token(s). After that you may not have to Log in again if you are using ZappySys SSIS OAuth Connection manager. Refreshing Token is automatica after first login call.<\/p>\n<h3>Client Credentials Grant Type<\/h3>\n<p>ZappySys offers various data integration components, including REST API Task, JSON Source, XML Source, and CSV Source, which allow you to connect to external APIs and retrieve data. For secure API authentication, you can create an OAuth connection using the Client Credentials Grant Type. <a href=\"https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/360008704413\" target=\"_blank\" rel=\"noopener\">Check this article to learn more<\/a> about this option.<\/p>\n<p><b>What is Client Credentials Grant Type?<\/b><br \/>\nThe Client Credentials Grant Type is used by applications to access an API without user involvement. It is commonly used for machine-to-machine authentication, where the application itself authenticates with the API using a Client ID and Client Secret.<\/p>\n<p><b>Steps to Create an OAuth2 Client Credentials Grant Type Connection<b><\/b><\/b><\/p>\n<div class=\"d-editor-preview\">\n<ol>\n<li>Using ZappySys <b>SSIS PowerPack<\/b> or <b>ODBC PowerPack<\/b>\n<ul>\n<li>Using ZappySys SSIS PowerPack\n<ul>\n<li>Launch <strong>Visual Studio<\/strong> and Open existing SSIS Project or Create new SSIS Project to use <strong>ZappySys SSIS PowerPack<\/strong> in your environment.<\/li>\n<li>Choose either:\n<ul>\n<li>SSIS <a title=\"REST API Web Service Task\" href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\">REST API Task<\/a> or <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-web-api-destination-connector\/\">Web API Destination<\/a> (for direct operations)<\/li>\n<li>SSIS <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\">JSON Source<\/a>, <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-xml-source\/\">XML Source<\/a>, or <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-csv-file-source-flat-file-web-api\/\">CSV Source<\/a> (for data extraction)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Using ZappySys ODBC PowerPack\n<ul>\n<li>Launch <strong>ZappySys Data Gateway<\/strong> or <strong>ODBC DSN (64\/32 bit)<\/strong> in your environment.<\/li>\n<li>Choose either:\n<ul>\n<li>ODBC <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-json-rest-api-driver\/\">JSON Driver<\/a>, <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-xml-soap-api-driver\/\">XML Driver<\/a>, or <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-csv-rest-api-driver\/\">CSV Driver<\/a> (for data extraction)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Create a New OAuth Connection\n<ul>\n<li>Go to the <strong>Connection Manager<\/strong>.<\/li>\n<li>Select <strong>Add New Connection<\/strong> \u279d Choose <strong>OAuth Connection<\/strong>.<\/li>\n<li>Select <strong>Custom<\/strong> OAuth Provider.<\/li>\n<li>Select <strong>OAuth2 version<\/strong>.<\/li>\n<li>Select <strong>Client Credentials Grant Type<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li>Configure OAuth Settings. Enter the following details:\n<ul>\n<li><strong>Token Endpoint URL:<\/strong> The API endpoint to obtain the access token (e.g., <code>https:\/\/api.example.com\/oauth\/token<\/code>)<\/li>\n<li><strong>Client ID:<\/strong> Your app\u2019s Client ID<\/li>\n<li><strong>Client Secret:<\/strong> Your app\u2019s Client Secret<\/li>\n<li><strong>Scope:<\/strong> (Optional) Specify any required permissions or scopes<\/li>\n<li><strong>Content-Type:<\/strong> <code>application\/x-www-form-urlencoded<\/code> (Default common for token requests)<\/li>\n<\/ul>\n<\/li>\n<li>Test the Connection\n<ul>\n<li>Click <strong>Test Connection<\/strong> to ensure that ZappySys can retrieve the token successfully.<\/li>\n<\/ul>\n<\/li>\n<li>Use the OAuth Connection in API Calls. Once the OAuth connection is established:\n<ul>\n<li>In SSIS use it in <strong>REST API Task<\/strong>, <strong>JSON Source<\/strong>, <strong>XML Source<\/strong>, <strong>CSV Source<\/strong>, or <strong>Web API Destination<\/strong>.<\/li>\n<li>In ODBC use it in <strong>JSON Driver<\/strong>, <strong>XML Driver<\/strong>, or <strong>CSV Driver<\/strong>.<\/li>\n<li>The OAuth token will automatically be included in the <strong>Authorization header<\/strong> when making API requests.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/div>\n<div style=\"width: 828px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-1-e1743083581693.png\" alt=\"Calling API in SSIS using OAuth 2.0 - Client Credentials Grant Type\" width=\"818\" height=\"788\" \/><p class=\"wp-caption-text\">Calling API in SSIS using OAuth 2.0 &#8211; Client Credentials Grant Type<\/p><\/div>\n<h3>Password Grant Type<\/h3>\n<p>The Password Grant Type is an OAuth 2.0 flow used to exchange a user\u2019s username and password directly for an access token. Depending on the API requirements, you may also need to provide a Client ID, Client Secret, and Scope. This flow is typically used in trusted applications or internal systems where collecting credentials directly is considered safe.<\/p>\n<p><b>Steps to Create an OAuth2 Password Grant Type Connection<b><\/b><\/b><\/p>\n<div class=\"d-editor-preview\">\n<ol>\n<li>Using ZappySys <b>SSIS PowerPack<\/b> or <b>ODBC PowerPack<\/b>\n<ul>\n<li>Using ZappySys SSIS PowerPack\n<ul>\n<li>Launch <strong>Visual Studio<\/strong> and Open existing SSIS Project or Create new SSIS Project to use <strong>ZappySys SSIS PowerPack<\/strong> in your environment.<\/li>\n<li>Choose either:\n<ul>\n<li>SSIS <a title=\"REST API Web Service Task\" href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\">REST API Task<\/a> or <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-web-api-destination-connector\/\">Web API Destination<\/a> (for direct operations)<\/li>\n<li>SSIS <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\">JSON Source<\/a>, <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-xml-source\/\">XML Source<\/a>, or <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-csv-file-source-flat-file-web-api\/\">CSV Source<\/a> (for data extraction)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Using ZappySys ODBC PowerPack\n<ul>\n<li>Launch <strong>ZappySys Data Gateway<\/strong> or <strong>ODBC DSN (64\/32 bit)<\/strong> in your environment.<\/li>\n<li>Choose either:\n<ul>\n<li>ODBC <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-json-rest-api-driver\/\">JSON Driver<\/a>, <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-xml-soap-api-driver\/\">XML Driver<\/a>, or <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-csv-rest-api-driver\/\">CSV Driver<\/a> (for data extraction)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Create a New OAuth Connection\n<ul>\n<li>Go to the <strong>Connection Manager<\/strong>.<\/li>\n<li>Select <strong>Add New Connection<\/strong> \u279d Choose <strong>OAuth Connection<\/strong>.<\/li>\n<li>Select <strong>Custom<\/strong> OAuth Provider.<\/li>\n<li>Select <strong>OAuth2 version<\/strong>.<\/li>\n<li>Select <strong>Password Grant Type<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li>Configure OAuth Settings. Enter the following details:\n<ul>\n<li><strong>Token Endpoint URL:<\/strong> The API endpoint to obtain the access token (e.g., <code>https:\/\/api.example.com\/oauth\/token<\/code>)<\/li>\n<li><strong>Client ID:<\/strong> Your app\u2019s Client ID<\/li>\n<li><strong>Client Secret:<\/strong> Your app\u2019s Client Secret<\/li>\n<li><strong>User Name:<\/strong> Your app\u2019s User Name<\/li>\n<li><strong>Password:<\/strong> Your app\u2019s Password<\/li>\n<li><strong>Scope:<\/strong> (Optional) Specify any required permissions or scopes<\/li>\n<li><strong>Content-Type:<\/strong> <code>application\/x-www-form-urlencoded<\/code> (Default common for token requests)<\/li>\n<\/ul>\n<\/li>\n<li>Test the Connection\n<ul>\n<li>Click <strong>Test Connection<\/strong> to ensure that ZappySys can retrieve the token successfully.<\/li>\n<\/ul>\n<\/li>\n<li>Use the OAuth Connection in API Calls. Once the OAuth connection is established:\n<ul>\n<li>In SSIS use it in <strong>REST API Task<\/strong>, <strong>JSON Source<\/strong>, <strong>XML Source<\/strong>, <strong>CSV Source<\/strong>, or <strong>Web API Destination<\/strong>.<\/li>\n<li>In ODBC use it in <strong>JSON Driver<\/strong>, <strong>XML Driver<\/strong>, or <strong>CSV Driver<\/strong>.<\/li>\n<li>The OAuth token will automatically be included in the <strong>Authorization header<\/strong> when making API requests.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/div>\n<div id=\"attachment_11475\" style=\"width: 711px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/oauth2-passward-grant-type-connection-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-11475\" class=\"size-full wp-image-11475\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/oauth2-passward-grant-type-connection-1.png\" alt=\"Calling API in SSIS using OAuth 2.0 - Password Grant Type\" width=\"701\" height=\"723\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/oauth2-passward-grant-type-connection-1.png 701w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/oauth2-passward-grant-type-connection-1-291x300.png 291w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/a><p id=\"caption-attachment-11475\" class=\"wp-caption-text\">Calling API in SSIS using OAuth 2.0 &#8211; Password Grant Type<\/p><\/div>\n<h2>Understand AccessToken and RefreshTokens in OAuth 2.0<\/h2>\n<p>Along with GrantType there is one more concept in OAuth you have to understand. Its about two types of Tokens you get in OAuth 2.0<\/p>\n<ol>\n<li>Access Token<\/li>\n<li>Refresh Token<\/li>\n<\/ol>\n<p>Here is brief description about each type of token.<\/p>\n<h3>Refresh Token<\/h3>\n<p>If you are using\u00a0<strong>Authorization Code Grant Type<\/strong> (see previous section) then most API will send you RefreshToken and AccessToken after you finish 3-legged authorization first time (i.e. Login Dialog box). Refresh Token usually never expires. Some API may expire refresh tokens but after a long time (e.g. 90 days).\u00a0 If you have case of expiring RefreshToken then you may have to use <a href=\"https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/115004555334-How-to-handle-Changing-OAuth-RefreshToken-in-SSIS-ODBC-\">this Pattern<\/a><\/p>\n<h3>Access Token<\/h3>\n<p>Access Token is needed to call API and its usually short lived (expires in 1-2 hours).<\/p>\n<p>If you are using\u00a0Authorization Code Grant Type\u00a0 then you have to use RefreshToken to get new AccessToken.<\/p>\n<div class=\"su-note\"  style=\"border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">Keep both Access and Refresh Token secure. Treat them like a password.<\/div><\/div>\n<h2>Step-by-Step <span id=\"Step-By-StepGet_data_from_HubSpot_REST_API\"><span id=\"Step-By-Step_8211_Call_Amazon_MWS_API_using_SSIS\">\u2013 API Authentication with SSIS OAuth Connection<\/span><\/span><\/h2>\n<p>Now let&#8217;s look at an example of how to call API using SSIS OAuth Connection Manager and REST API Task. We will use <a href=\"https:\/\/developers.hubspot.com\/docs\/overview\" target=\"_blank\" rel=\"noopener\">HubSpot API<\/a> as an example but concepts remain same for any other API such as <a href=\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/\" target=\"_blank\" rel=\"noopener\">Google API<\/a>, <a href=\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/\">Facebook<\/a>, <a href=\"https:\/\/zappysys.com\/blog\/read-twitter-data-in-ssis-using-rest-api-task-json-source-oauth2\/\">Twitter<\/a>, <a href=\"https:\/\/zappysys.com\/blog\/how-to-import-linkedin-data-in-powerbi\/\">LinkedIn<\/a><\/p>\n<ol>\n<li>Login into the service provider (whose API you want to use) membership area.<br \/>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>NOTE<\/strong>: Sometimes you have to create <em>Developer\u00a0<\/em>account first and login using it.<\/div><\/div><\/li>\n<li>Find API settings and create an application (API App).\u00a0It will be your little bridge\u00a0between user&#8217;s data and SSIS.\u00a0Usually you will have to configure just a few fields:\n<ol>\n<li>Name<\/li>\n<li>Scopes, your API App will be operating under<\/li>\n<li>Visibility<br \/>\nE.g. for <a href=\"https:\/\/app.hubspot.com\/signup\/developers\/?_ga=2.81860886.1851700985.1694116734-2138228589.1694116734&amp;_gl=1*i41z4w*_ga*MjEzODIyODU4OS4xNjk0MTE2NzM0*_ga_LXTM6CQ0XK*MTY5NDExNjczMy4xLjEuMTY5NDExNjczOC41NS4wLjA.\" target=\"_blank\" rel=\"noopener\">HubSpot<\/a>, it\u00a0looks like this:<\/p>\n<div id=\"attachment_1201\" style=\"width: 605px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/name-hubspot-application.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1201\" class=\"wp-image-1201 \" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-2.png\" alt=\"REST API App which will be used from within SSIS\" width=\"595\" height=\"267\" \/><\/a><p id=\"caption-attachment-1201\" class=\"wp-caption-text\">REST API App which will be used from within SSIS<\/p><\/div>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>NOTE<\/strong>: Your API App will never go out of the defined scope.<\/div><\/div><\/li>\n<\/ol>\n<\/li>\n<li>Once you created\u00a0an application, you should see fields\u00a0<em>Client ID<\/em> and <em>Client Secret\u00a0<\/em>nearby:\n<div id=\"attachment_1348\" style=\"width: 668px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/ssis-oauth-authentication-note-client-id-and-client-secret.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1348\" class=\" wp-image-1348\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-3.png\" alt=\"Write down Client Id and Client Secret for the next step in OAuth authentication process\" width=\"658\" height=\"346\" \/><\/a><p id=\"caption-attachment-1348\" class=\"wp-caption-text\">Write down Client Id and Client Secret for the next step in OAuth authentication process<\/p><\/div>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>NOTE<\/strong>: If you don&#8217;t see them right away, try\u00a0accessing\u00a0application settings and search them there.<\/div><\/div><\/li>\n<li>Write down <em>Client ID<\/em> and <em>Client Secret<\/em>. We will need them later for authentication.<\/li>\n<li>Open <em>SSIS Designer<\/em> and create a new package.<\/li>\n<li>Right mouse click in the <em>Connection Managers<\/em> area and press <em><em><em>New connection&#8230; <\/em><\/em><\/em>and then <em>ZS-OAUTH<\/em>. This will create a new <em>OAuth Connection<em><em>.<br \/>\n<\/em><\/em><\/em><\/p>\n<div id=\"attachment_1334\" style=\"width: 760px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/ssis-oauth-connection-for-restful-api-authentication-creation.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1334\" class=\"wp-image-1334 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-4.png\" alt=\"Create SSIS OAuth Connection for RESTful API authentication.\" width=\"750\" height=\"252\" \/><\/a><p id=\"caption-attachment-1334\" class=\"wp-caption-text\">Create SSIS OAuth Connection for RESTful API authentication<\/p><\/div><\/li>\n<li>Select<em> OAuth Provider\u00a0<\/em>which will be used by an API when authenticating. Usually,\u00a0<em>OAuth Provider&#8217;s<\/em> name is present in API&#8217;s name you want to use. E.g. Select <span class=\"lang:default decode:true crayon-inline\">Google<\/span>\u00a0 as <em>OAuth Provider<\/em> for\u00a0Google Sheets API:\n<div id=\"attachment_1340\" style=\"width: 411px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/ssis-oauth-connection-provider-selection.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1340\" class=\"wp-image-1340 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-5.png\" alt=\"Select predefined OAuth Provider\" width=\"401\" height=\"120\" \/><\/a><p id=\"caption-attachment-1340\" class=\"wp-caption-text\">Select predefined OAuth Provider<\/p><\/div>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>NOTE<\/strong>: If you can&#8217;t see the provider you want, you will have to use <span class=\"lang:default decode:true crayon-inline\">Custom<\/span>\u00a0option.<\/div><\/div><\/li>\n<li><span style=\"text-decoration: underline;\">This step is optional<\/span> (use it if you didn&#8217;t find predefined <em>OAuth Provider)<\/em>.\u00a0For custom OAuth Provider you will need to configure<em>:<\/em>\n<ol>\n<li><em>\u00a0<\/em><em>Authorization Url<\/em> and <em>Access Token Url<\/em>, which you will find in a guideline of an API.<br \/>\nFor HubSpot API these look like this:<\/p>\n<div id=\"attachment_1344\" style=\"width: 582px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/ssis-oauth-setting-authorization-and-access-token-url1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1344\" class=\"size-full wp-image-1344\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-6.png\" alt=\"Configure SSIS OAuth Connection Authorization and Access Token URLs\" width=\"572\" height=\"61\" \/><\/a><p id=\"caption-attachment-1344\" class=\"wp-caption-text\">Configure SSIS OAuth Connection Authorization and Access Token URLs<\/p><\/div><\/li>\n<li><em>Callback\/Return Url,\u00a0<\/em>which you should have the same as\u00a0<em>Redirect Url<\/em> field\u00a0in you API App settings.<br \/>\nFor HubSpot API it\u00a0is alright to enter\u00a0your secure website address (with <em>https<\/em>). In this example, we will use <span class=\"lang:default decode:true crayon-inline\">https:\/\/zappysys.com\/oauth<\/span>.<\/p>\n<div id=\"attachment_1345\" style=\"width: 581px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1345\" class=\"size-full wp-image-1345\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-7.png\" alt=\"Set Callback\/Return Url in OAuth Connection\" width=\"571\" height=\"123\" \/><p id=\"caption-attachment-1345\" class=\"wp-caption-text\">Set Callback\/Return Url in OAuth Connection<\/p><\/div>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>NOTE<\/strong>: Don&#8217;t be surprised you cannot find <em>Redirect Url<\/em>\u00a0field in your API App configuration. Some OAuth Providers don&#8217;t use this option.<\/div><\/div><\/li>\n<\/ol>\n<\/li>\n<li>Now it&#8217;s time to supply <em>Client Id<\/em> and <em>Client Secret\u00a0<\/em>you wrote down\u00a0in Step #4, enter <em>Scopes \/ Permissions <\/em>your user will need (we will use <span class=\"lang:default decode:true crayon-inline\">contacts<\/span>) and <em><em>Generate a Token:<br \/>\n<\/em><\/em><\/p>\n<div id=\"attachment_1352\" style=\"width: 781px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/ssis-oauth-connection-configuration-for-rest-api.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1352\" class=\"size-full wp-image-1352\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-8-1.png\" alt=\"Input Client Id, Client Secret and Scopes to generate a token\" width=\"771\" height=\"403\" \/><\/a><p id=\"caption-attachment-1352\" class=\"wp-caption-text\">Input Client Id, Client Secret and Scopes to generate a token<\/p><\/div>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>NOTE<\/strong>:<\/p>\n<ul>\n<li>To add a scope for the predefined OAuth Provider, use <em>Select Scopes<\/em> button.<\/li>\n<li>In scopes, if you set read only permissions you won&#8217;t be able call API methods that require write permissions.<\/li>\n<li>Also be aware that you cannot use different scopes other than you defined in Step #2.<\/li>\n<\/ul>\n<\/div><\/div><\/li>\n<li>Login with user account whose data you wish to access or just select a user if no\u00a0login is needed:\n<div id=\"attachment_1212\" style=\"width: 638px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/select-hubspot-ordinary-account.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1212\" class=\"wp-image-1212 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-9.png\" alt=\"Select the user, whose data you want to access\" width=\"628\" height=\"385\" \/><\/a><p id=\"caption-attachment-1212\" class=\"wp-caption-text\">Select the user, whose data you want to access<\/p><\/div><\/li>\n<li>Grant user access to your API App:\n<div id=\"attachment_1214\" style=\"width: 696px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/grant-access-to-hubspot-app.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1214\" class=\"wp-image-1214 size-full\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/grant-access-to-hubspot-app-e1497462527310.png\" alt=\"OAuth Connection SSIS component configuration - Grant access to HubSpot REST API App\" width=\"686\" height=\"345\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/grant-access-to-hubspot-app-e1497462527310.png 686w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/grant-access-to-hubspot-app-e1497462527310-300x151.png 300w\" sizes=\"(max-width: 686px) 100vw, 686px\" \/><\/a><p id=\"caption-attachment-1214\" class=\"wp-caption-text\">OAuth Connection SSIS component configuration &#8211; Grant access to HubSpot API App<\/p><\/div><\/li>\n<li>You will get a prompt to save <em>Access<\/em> and <em>Refresh<\/em> tokens to a backup file. Press &#8220;Yes&#8221; to save them.<br \/>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>NOTE<\/strong>: You will need to pass <span class=\"lang:default decode:true crayon-inline\">Refresh Token<\/span>\u00a0as the parameter, when you run the package in another machine. Check <a href=\"#deployment\">Deployment paragraph<\/a> for more info.<\/div><\/div><\/li>\n<li>That&#8217;s it! From now on your SSIS task\/component via your API App will be able to\u00a0use\u00a0user&#8217;s data which you just granted access to.<\/li>\n<\/ol>\n<h2>Using System Default Browser to get the token<\/h2>\n<p>If embedded browser has some issue to extract your token then you can close the window by pressing <strong>[X]<\/strong> in the title bar. Once you do that you will be prompted to use System Default browser to finish the token extraction. If you click Yes then Full browser will be launched.<\/p>\n<p><strong>NOTE:<\/strong> Below feature is added in version published after Dec 31, 2019 (v3.0.0.11231 or later) so make sure you have latest version.<\/p>\n<div id=\"attachment_8782\" style=\"width: 570px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/04\/use-system-browser-flow.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8782\" class=\"size-full wp-image-8782\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-10.png\" alt=\"Using System Default Browser to extract OAuth Token\" width=\"560\" height=\"287\" \/><\/a><p id=\"caption-attachment-8782\" class=\"wp-caption-text\">Using System Default Browser to extract OAuth Token<\/p><\/div>\n<h3>Untrusted App Warning<\/h3>\n<p>Sometimes Google might show you below warning. In order to continue the flow you might have to Click on <strong>Advanced<\/strong> and then click\u00a0<strong>Go to YourAppName (unsafe)<\/strong> like below<\/p>\n<div id=\"attachment_8779\" style=\"width: 658px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/04\/google-oauth-app-not-trusted.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8779\" class=\"size-full wp-image-8779\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-11.png\" alt=\"How to ignore Google Unsafe App Warning (OAuth Flow)\" width=\"648\" height=\"455\" \/><\/a><p id=\"caption-attachment-8779\" class=\"wp-caption-text\">How to ignore Google Unsafe App Warning (OAuth Flow)<\/p><\/div>\n<h3>Select the account<\/h3>\n<div id=\"attachment_8780\" style=\"width: 939px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/04\/use-system-browser-for-oauth-token-extract.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8780\" class=\"size-full wp-image-8780\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-12.png\" alt=\"Using System Browser\" width=\"929\" height=\"699\" \/><\/a><p id=\"caption-attachment-8780\" class=\"wp-caption-text\">Using System Browser<\/p><\/div>\n<h3>Copy code and finish the flow<\/h3>\n<div id=\"attachment_8786\" style=\"width: 1135px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/manually-extract-oauth-token-use-full-browser.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8786\" class=\"size-full wp-image-8786\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-13.png\" alt=\"Manually Copy Code and Get OAuth Refresh \/ Access Token \" width=\"1125\" height=\"672\" \/><\/a><p id=\"caption-attachment-8786\" class=\"wp-caption-text\">Manually Copy Code and Get OAuth Refresh \/ Access Token<\/p><\/div>\n<p>&nbsp;<\/p>\n<h2>Caching tokens (System-wide \/ multiple threads)<\/h2>\n<p>By default, each connection generates a new token. If you&#8217;re making repeated calls in a loop, you might notice that multiple tokens are created within a short time. To avoid this, you can enable token caching. This allows the same token to be reused across requests, significantly reducing the number of token renewal operations.<\/p>\n<p>To cache token, perform the following steps<\/p>\n<ol>\n<li>Goto the <strong>OAuth2 Grant Options<\/strong> Tab<\/li>\n<li>Check the <strong>Cache token to file<\/strong> option<\/li>\n<li>Enter Refresh Token \/ Cached Token File path. If the path is already prepopulated, then enter it where the token file will be saved.<\/li>\n<\/ol>\n<div id=\"attachment_11479\" style=\"width: 615px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/oauth-token-cache-avoid-multiple-calls.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-11479\" class=\"size-full wp-image-11479\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/oauth-token-cache-avoid-multiple-calls.png\" alt=\"Cache Token (Access token) - Across multiple processes and connections\" width=\"605\" height=\"489\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/oauth-token-cache-avoid-multiple-calls.png 605w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/oauth-token-cache-avoid-multiple-calls-300x242.png 300w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><p id=\"caption-attachment-11479\" class=\"wp-caption-text\">Cache Token (Access token) &#8211; Across multiple processes and connections<\/p><\/div>\n<h2><span id=\"Step-By-StepGet_data_from_HubSpot_REST_API\"><span id=\"Step-By-Step_8211_Call_Amazon_MWS_API_using_SSIS\">Using OAuth 2.0 in ODBC Drivers \/ Data gateway<\/span><\/span><\/h2>\n<p>So in previous section we talked how to setup OAuth in SSIS. If you like to use similar setup for Drivers in\u00a0 <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">ODBC PowerPack<\/a>\u00a0then use below steps.<\/p>\n<p>Following 3 drivers support OAuth Connection.<\/p>\n<div class=\"su-table su-table-alternate\">\n<table style=\"width: 1364px\">\n<colgroup>\n<col style=\"width: 80px\" \/>\n<col style=\"width: 170px\" \/>\n<col \/>\n<col style=\"width: 140px\" \/> <\/colgroup>\n<tbody>\n<tr>\n<th style=\"width: 90px\"><\/th>\n<th style=\"width: 233px\">Driver<\/th>\n<th style=\"width: 760px\">Description<\/th>\n<\/tr>\n<p><!--json driver--><\/p>\n<tr>\n<td style=\"vertical-align: top;width: 90px\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"\/images\/odbc-powerpack\/odbc-json-api-driver.png\" alt=\"ODBC Driver for JSON File, REST, Web API\" width=\"100\" height=\"100\" \/><\/td>\n<td style=\"vertical-align: top;width: 233px\"><strong>JSON Files \/ REST API Driver<\/strong><\/p>\n<a href=\"\/\/zappysys.com\/products\/odbc-powerpack\/odbc-json-rest-api-driver\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#106ed3;border-color:#0d58a9;border-radius:0px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:6px 18px;font-size:14px;line-height:21px;border-color:#589ae1;border-radius:0px\"><i class=\"sui sui-angle-double-right\" style=\"font-size:14px;color:#FFFFFF\"><\/i> Read More<\/span><\/a><\/td>\n<td style=\"vertical-align: top;width: 760px\">Must have ODBC Driver for <strong>JSON Files \/ REST API \/ OData<\/strong> Integration Projects. It can be used to read data from local JSON Files or any JSON based API Services (such as <strong>Google Analytics, BigQuery, Office 365 and many more<\/strong>). It supports high performance JSON Streaming engine with many options such as Pagination, Error handling, Security, Filtering.<\/td>\n<\/tr>\n<p><!--xml driver--><\/p>\n<tr>\n<td style=\"vertical-align: top;width: 90px\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"\/images\/odbc-powerpack\/odbc-xml-api-driver.png\" alt=\"ODBC Driver for XML File, REST, Web API\" width=\"100\" height=\"100\" \/><\/td>\n<td style=\"vertical-align: top;width: 233px\"><strong>XML Files \/ SOAP API Driver<\/strong><\/p>\n<a href=\"\/\/zappysys.com\/products\/odbc-powerpack\/odbc-xml-soap-api-driver\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#106ed3;border-color:#0d58a9;border-radius:0px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:6px 18px;font-size:14px;line-height:21px;border-color:#589ae1;border-radius:0px\"><i class=\"sui sui-angle-double-right\" style=\"font-size:14px;color:#FFFFFF\"><\/i> Read More<\/span><\/a><\/td>\n<td style=\"vertical-align: top;width: 760px\">Must have ODBC Driver for <strong>XML Files \/ SOAP API \/ OData<\/strong> Integration Projects. It can be used to read data from local XML Files or any XML \/ SOAP based API Services (such as <strong>Google AdWords, DoubleClick, Salesforce and many more<\/strong>). It supports high performance JSON Streaming engine with many options such as Pagination, Error handling, Security, Filtering.<\/td>\n<\/tr>\n<p><!--csv driver--><\/p>\n<tr>\n<td style=\"vertical-align: top;width: 90px\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"\/images\/odbc-powerpack\/odbc-csv-api-driver.png\" alt=\"ODBC Driver for CSV File, REST, Web API\" width=\"100\" height=\"100\" \/><\/td>\n<td style=\"vertical-align: top;width: 233px\"><strong>CSV Files \/ REST API Driver<\/strong><\/p>\n<a href=\"\/\/zappysys.com\/products\/odbc-powerpack\/odbc-csv-rest-api-driver\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#106ed3;border-color:#0d58a9;border-radius:0px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:6px 18px;font-size:14px;line-height:21px;border-color:#589ae1;border-radius:0px\"><i class=\"sui sui-angle-double-right\" style=\"font-size:14px;color:#FFFFFF\"><\/i> Read More<\/span><\/a><\/td>\n<td style=\"vertical-align: top;width: 760px\">Using this ODBC Driver you can read from CSV Formatted files or REST API which sends response in CSV format. It supports GZip or Zip format. If CSV data coming from URL you can use many advanced API settings such as Pagination, Error handling, Security.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>ODBC Driver OAuth Setup<\/h3>\n<p>If you are using <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys ODBC Drivers<\/a> for API integration then use below steps to configure OAuth Connection to call API.<\/p>\n<ol>\n<li>Search for ODBC in start menu and select ODBC Data Source (64 bit)<br \/>\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/odbc-data-sources-start-up-screen.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3992\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-ODBC-1.png\" alt=\"Open ODBC Data Sources from Startup menu\" width=\"986\" height=\"622\" \/><\/a><\/li>\n<li>Click ADD to Create a New ODBC DSN (Use System Tab if you creating DSN accessed by service account or other users on that machine)<\/li>\n<li>Select desired ZappySys API driver (e.g. JSON Driver, XML Driver or CSV Driver)<\/li>\n<li>When UI is visible like below you can select <strong>Connection Type<\/strong>\u00a0dropdown to OAuth and click Configure.\n<div id=\"attachment_5217\" style=\"width: 788px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/10\/gmail-oauth-configuration.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5217\" class=\"wp-image-5217 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/06\/rest-api-authentication-with-oauth-ODBC-2.png\" alt=\"Configure OAuth Connection for ZappySys ODBC Drivers\" width=\"778\" height=\"632\" \/><\/a><p id=\"caption-attachment-5217\" class=\"wp-caption-text\">Configure OAuth Connection for ZappySys ODBC Drivers<\/p><\/div><\/li>\n<\/ol>\n<h3>Data Gateway OAuth Setup<\/h3>\n<p>If you are using <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/data-gateway\/\" target=\"_blank\" rel=\"noopener\">Data Gateway<\/a>\u00a0for integration scenario like <a href=\"https:\/\/zappysys.com\/blog\/import-rest-api-json-sql-server\/\" target=\"_blank\" rel=\"noopener\">Import API data in SQL Server<\/a> then use almost same steps as previous section (ODBC DSN Setup) but in this case we have to click on New Data Source on Gateway Config UI as below.<\/p>\n<div id=\"attachment_5431\" style=\"width: 572px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/11\/gateway-create-datasource-2-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5431\" class=\"size-full wp-image-5431\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/11\/gateway-create-datasource-2-1.png\" alt=\"Configure Gateway Data Source\" width=\"562\" height=\"311\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/11\/gateway-create-datasource-2-1.png 562w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/11\/gateway-create-datasource-2-1-300x166.png 300w\" sizes=\"(max-width: 562px) 100vw, 562px\" \/><\/a><p id=\"caption-attachment-5431\" class=\"wp-caption-text\">Configure Gateway Data Source<\/p><\/div>\n<h2><\/h2>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span id=\"Deploy_to_Production\"><a name=\"deployment\"><\/a>Parameterization and deployment to production<\/span><\/h2>\n<div class=\"content_block\" id=\"custom_post_widget-1932\"><p style=\"text-align: justify;\">In SSIS package <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/integration-services\/security\/access-control-for-sensitive-data-in-packages\" target=\"_blank\" rel=\"noopener\">sensitive data such as tokens and passwords are by default encrypted by SSIS<\/a> with your Windows account which you use to create a package.\u00a0So SSIS will fail to decrypt tokens\/passwords when you run it from another machine using another Windows account. To circumvent this when you are creating an SSIS package which uses authentication components (e.g. an <a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-oauth-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">OAuth Connection Manager<\/a>\u00a0or an <a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-http-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">HTTP Connection Manager<\/a> with credentials, etc.), consider using parameters\/variables to pass tokens\/passwords. In this way, you won\u2019t face authentication related errors when a package is deployed to a production server.<\/p>\r\n<p style=\"text-align: justify;\">Check our article on <a href=\"https:\/\/zappysys.com\/blog\/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server\/\" target=\"_blank\" rel=\"noopener\">how to configure packages with sensitive data on your production or development server<\/a>.<\/p><\/div>\n<h2>Conclusion<\/h2>\n<p>In this tutorial we\u00a0learned how to access user&#8217;s data from within SSIS using an API by authenticating with OAuth 2.0. As you have probably noticed already, OAuth 2.0 was used not only for authentication, but\u00a0for authorization too (remember the <em>Scope\u00a0<\/em>you had to set?). In\u00a0subsequent article you will really get your hands dirty (not really, it is actually simple) and learn how to call an API method using SSIS <em>REST API Task.<\/em><\/p>\n<h2>Keywords<\/h2>\n<p>Connect to a RESTful API with OAuth using SSIS | How to authenticate to an API with OAuth using SSIS | Authenticate a user using OAuth with SSIS | Grant user access to API using OAuth from within SSIS | Authorize a user to access REST API with OAuth using SSIS<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In the world of REST APIs you have to know how to authenticate, before using any API\u00a0method. In this article we will cover a topic how to authenticate to\u00a0an API with OAuth 2.0\u00a0technology using SSIS or ODBC Drivers. We are going to use OAuth Connection Manager SSIS component to achieve that, which is a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1854,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[176,225,204,205,8],"tags":[202,203,206,194,60,201,199,3,198,12,4],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"REST API Authentication with OAuth 2.0 using SSIS OAuth Connection Manager. Learn how to authenticate to a RESTful API with OAuth in a step-by-step tutorial\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"REST API Authentication with OAuth 2.0 using SSIS OAuth Connection Manager. Learn how to authenticate to a RESTful API with OAuth in a step-by-step tutorial\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ZappySys\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2017-06-13T14:34:23+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2025-09-24T05:21:34+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"180\" \/>\r\n\t<meta property=\"og:image:height\" content=\"180\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/zappysys\/\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/\",\"url\":\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/\",\"name\":\"How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png\",\"datePublished\":\"2017-06-13T14:34:23+00:00\",\"dateModified\":\"2025-09-24T05:21:34+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\"},\"description\":\"REST API Authentication with OAuth 2.0 using SSIS OAuth Connection Manager. Learn how to authenticate to a RESTful API with OAuth in a step-by-step tutorial\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png\",\"width\":180,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"sameAs\":[\"http:\/\/www.zappysys.com\/\",\"https:\/\/www.facebook.com\/ZappySys\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC | ZappySys Blog","description":"REST API Authentication with OAuth 2.0 using SSIS OAuth Connection Manager. Learn how to authenticate to a RESTful API with OAuth in a step-by-step tutorial","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/","og_locale":"en_US","og_type":"article","og_title":"How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC | ZappySys Blog","og_description":"REST API Authentication with OAuth 2.0 using SSIS OAuth Connection Manager. Learn how to authenticate to a RESTful API with OAuth in a step-by-step tutorial","og_url":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/","og_site_name":"ZappySys Blog","article_author":"https:\/\/www.facebook.com\/ZappySys\/","article_published_time":"2017-06-13T14:34:23+00:00","article_modified_time":"2025-09-24T05:21:34+00:00","og_image":[{"width":180,"height":180,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/zappysys\/","twitter_misc":{"Written by":"ZappySys","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/","url":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/","name":"How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png","datePublished":"2017-06-13T14:34:23+00:00","dateModified":"2025-09-24T05:21:34+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82"},"description":"REST API Authentication with OAuth 2.0 using SSIS OAuth Connection Manager. Learn how to authenticate to a RESTful API with OAuth in a step-by-step tutorial","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/api-180x180.png","width":180,"height":180},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/rest-api-authentication-with-oauth-2-0-using-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to authenticate to an API with OAuth 2.0 using SSIS \/ ODBC"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","caption":"ZappySys"},"sameAs":["http:\/\/www.zappysys.com\/","https:\/\/www.facebook.com\/ZappySys\/","https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/"],"url":"https:\/\/zappysys.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1327"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=1327"}],"version-history":[{"count":71,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1327\/revisions"}],"predecessor-version":[{"id":11485,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1327\/revisions\/11485"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/1854"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=1327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=1327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=1327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}