<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SSIS OAuth Connection Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis/connection-manager/ssis-oauth-connection/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis/connection-manager/ssis-oauth-connection/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 19 Mar 2026 23:07:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>SSIS OAuth Connection Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis/connection-manager/ssis-oauth-connection/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to download Outlook (Office 365) Emails as .EML or .MSG Files</title>
		<link>https://zappysys.com/blog/how-to-download-outlook-office-365-emails-as-eml-or-msg-files/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 19 Jun 2025 13:19:00 +0000</pubDate>
				<category><![CDATA[SSIS API Source]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=11380</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to download Outlook (Office 365) emails as .EML or .MSG files using ZappySys SSIS PowerPack without writing any code. We’ll leverage the power of Microsoft Graph API, which provides unified access to Microsoft 365 services like Outlook Mail, and integrate it seamlessly using the API Connector for [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-download-outlook-office-365-emails-as-eml-or-msg-files/">How to download Outlook (Office 365) Emails as .EML or .MSG Files</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><img loading="lazy" decoding="async" class="alignleft" title="Outlook Mail (Office 365)" src="https://zappysys.com/blog/wp-content/uploads/2025/06/Outlook-28x281-1.png" alt="Outlook Mail (Office 365)" width="100" height="100" /> In this article, you will learn how to download Outlook (Office 365) emails as .EML or .MSG files using ZappySys SSIS PowerPack without writing any code. We’ll leverage the power of Microsoft Graph API, which provides unified access to Microsoft 365 services like Outlook Mail, and integrate it seamlessly using the <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/ssis">API Connector for SSIS Outlook Mail (Office 365)</a>, Web API Destination and other components. By the end, you’ll be able to automate the process of extracting emails and saving them to disk in standard email formats directly from your SSIS package.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <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>
</ol></div>
<h2>Step 1: Register an Application in Azure Portal</h2>
<p>To access Outlook emails via Microsoft Graph API, the first step is to register an application in the Azure Portal. This allows your SSIS package to authenticate securely and retrieve mail data from Office 365.<br />
Step by step info is available here Outlook Mail (Office 365) Connector Authentication section.</p>
<h3>User Credentials</h3>
<p>Use delegated access (User Credentials) whenever you want to let a signed-in user work with their own resources or resources they can access. Whether it&#8217;s an admin setting up policies for their entire organization or a user deleting an email in their inbox, all scenarios involving user actions should use delegated access.<br />
<b>Refer to this links for the detailed steps:</b> <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/help/authentication/usercreds/" target="_blank" rel="noopener">User Credentials [OAuth]</a></p>
<h3>Application Credentials</h3>
<p>Application-only access is broader and more powerful than delegated access (User Credentials), so you should only use app-only access where needed. Use it when:</p>
<ol>
<li>The application needs to run in an automated way, without user input (for example, a daily script that checks emails from certain contacts and sends automated responses).</li>
<li>The application needs to access resources belonging to multiple different users (for example, a backup or data loss prevention app might need to retrieve messages from many different chat channels, each with different participants).</li>
<li>You find yourself tempted to store credentials locally and allow the app to sign in &#8216;as&#8217; the user or admin.</li>
</ol>
<p><b>Refer to this links for the detailed steps:</b> <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/help/authentication/appcreds/ target=">Application Credentials [OAuth]</a></p>
<h2>Step 2: Download Outlook (Office 365) Emails as .EML Files using SSIS</h2>
<p>Now let’s look at some examples of how to access your Outlook emails using our easy-to-use Outlook Mail Connector in ZappySys SSIS PowerPack. This connector simplifies calling the Microsoft Graph API, so you can retrieve emails with just a few clicks.<br />
In this section we will learn how to configure and use Outlook Mail (Office 365) Connector in <a title="SSIS API Source" href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">API Source</a> to extract data from Outlook Mail (Office 365).</p>
<ol>
<li>Begin with opening Visual Studio and Create a New Project.</li>
<li>Select Integration Service Project and in new project window set the appropriate name and location for project.<br />
And click OK.</li>
<li>In the new SSIS project screen you will find the following:
<ol type="i">
<li>SSIS ToolBox on left side bar</li>
<li>Solution Explorer and Property Window on right bar</li>
<li>Control flow, data flow, event Handlers, Package Explorer in tab windows</li>
<li>Connection Manager Window in the bottom</li>
</ol>
<p><img loading="lazy" decoding="async" class="img-thumbnail" title="SSIS Project Screen" src="https://cdn.zappysys.com/api/images/zappysys-ssis-project-with-toolbox.png" alt="SSIS Project Screen" width="1059" height="675" /></p>
<div class="alert alert-warning">Note: If you don&#8217;t see ZappySys SSIS PowerPack Task or Components in SSIS Toolbox, please refer to <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004935754-I-don-t-see-PowerPack-components-in-SSIS-Toolbox">this help link</a>.</div>
</li>
<li>Now, Drag and Drop <b>SSIS Data Flow Task</b> from SSIS Toolbox. Double click on the <em>Data Flow Task</em> to see <em>Data Flow</em> designer.<img loading="lazy" decoding="async" class="img-thumbnail" title="SSIS Data Flow Task - Drag and Drop" src="https://cdn.zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" width="460" height="155" /></li>
<li>From the SSIS toolbox drag and <a title="SSIS API Source" href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">API Source</a> (Predefined Templates) on the data flow designer surface, and double click on it to edit it:<br />
<img loading="lazy" decoding="async" class="img-thumbnail" title="SSIS API Source (Predefined Templates) - Drag and Drop" src="https://cdn.zappysys.com/api/images/ssis-api-source-drag-and-drop.jpg" alt="SSIS API Source (Predefined Templates) - Drag and Drop" width="659" height="292" /></li>
<li>Select <strong>New Connection</strong> to create a new connection:<br />
<img loading="lazy" decoding="async" class="img-thumbnail img-thumbnail" title="API Source - New Connection" src="https://cdn.zappysys.com/api/images/ssis-api-source-new-connection.png" alt="API Source - New Connection" width="684" height="643" /></li>
<li>Use a preinstalled Outlook Mail (Office 365) Connector from <em>Popular Connector List</em> or press <em>Search Online</em> radio button to download Outlook Mail (Office 365) Connector. Once downloaded simply use it in the configuration:
<div id="attachment_11392" style="width: 722px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-connector.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11392" class="size-full wp-image-11392" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-connector.png" alt="Outlook Mail (Office 365) Connector Selection" width="712" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-connector.png 712w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-connector-300x276.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></a><p id="caption-attachment-11392" class="wp-caption-text">Outlook Mail (Office 365) Connector Selection</p></div></li>
<li>Proceed with selecting the desired Authentication Type. Then select <em>API Base URL</em> (in most cases default one is the right one). Finally, fill in all the required parameters and set optional parameters if needed. You may press a link <strong>Steps to Configure</strong> which will help set certain parameters. More info is available in <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/help/authentication/UserCreds">Authentication section</a>.
<ol>
<li>User Credentials [OAuth]
<div id="attachment_11394" style="width: 806px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11394" class="size-full wp-image-11394" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication.png" alt="User Credentials [OAuth]" width="796" height="732" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication.png 796w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication-300x276.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication-768x706.png 768w" sizes="(max-width: 796px) 100vw, 796px" /></a><p id="caption-attachment-11394" class="wp-caption-text">User Credentials [OAuth]</p></div><b>OR</b></li>
<li>Application Credentials [OAuth]
<div id="attachment_11395" style="width: 809px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11395" class="size-full wp-image-11395" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication.png" alt="Application Credentials [OAuth]" width="799" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication.png 799w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication-300x276.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication-768x706.png 768w" sizes="(max-width: 799px) 100vw, 799px" /></a><p id="caption-attachment-11395" class="wp-caption-text">Application Credentials [OAuth]</p></div></li>
</ol>
</li>
<li>Select the <b>Get Messsages</b> endpoint, change/pass the properties values, and click on <strong>Preview Data</strong> button to make the API call.
<div id="attachment_11397" style="width: 756px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-get-messages.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11397" class="size-full wp-image-11397" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-get-messages.png" alt="API Source - Get Messages Endpoint" width="746" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-get-messages.png 746w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-get-messages-300x242.png 300w" sizes="(max-width: 746px) 100vw, 746px" /></a><p id="caption-attachment-11397" class="wp-caption-text">API Source &#8211; Get Messages Endpoint</p></div></li>
<li>That’s it — click <b>OK</b> and you&#8217;re done! In just a few clicks, you’ve successfully configured a connection to <b>Outlook Mail (Office 365)</b> using the <b>Outlook Mail Connector</b>.</li>
<li>Now let&#8217;s move to the next step — retrieving the full email content.<br />
You’ll use the <strong>Web API Destination</strong> component to make the <strong>Get MIME content</strong> API call. Within this task, you can dynamically pass the <strong>Message ID</strong> to fetch each email’s raw <code>.EML</code> content from Outlook (Office 365).<br />
For more details, refer to the official Microsoft documentation: <a href="https://learn.microsoft.com/en-us/graph/api/message-get?view=graph-rest-1.0&amp;tabs=http#example-4-get-mime-content" target="_blank" rel="noopener">Get Outlook Mail MIME content</a></li>
<li>Drag and drop the <b>Web API Destination</b> component from the SSIS Toolbox onto your Data Flow.<br />
Double-click to open it, then configure as follows and create a new OAuth Connection if needed:<strong>URL:</strong></p>
<blockquote><p>https://graph.microsoft.com/v1.0/me/messages/&lt;%Id%&gt;/$value</p></blockquote>
<p>The &lt;%Id%&gt; placeholder is dynamically replaced by SSIS at runtime with the actual Message ID, allowing the Web API Destination to download each email’s .EML content individually.</p>
<div id="attachment_11407" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11407" class="size-large wp-image-11407" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message-1024x748.png" alt="Get MIME content’ API call using the Web API Destination" width="720" height="526" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message-1024x748.png 1024w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message-300x219.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message-768x561.png 768w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message.png 1074w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-11407" class="wp-caption-text">Get MIME content’ API call using the Web API Destination</p></div></li>
<li>You’ll also need to create the OAuth connection using the same credentials.<br />
On the Advanced tab, make sure to set the Redirect URL correctly.For detailed steps, refer to this guide:<br />
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">How to set up OAuth 2.0 in SSIS</a></p>
<div id="attachment_11408" style="width: 711px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-oauth-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11408" class="size-full wp-image-11408" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-oauth-connection.png" alt="Outlook Mail OAuth 2.0 Connection" width="701" height="763" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-oauth-connection.png 701w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-oauth-connection-276x300.png 276w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-11408" class="wp-caption-text">Outlook Mail OAuth 2.0 Connection</p></div></li>
<li>Next, add a Derived Column transformation to create a new column that defines the file path for saving the <strong>.EML</strong> file.<br />
In this example, we’ll use the Message ID to generate a unique file name for each email:Expression:</p>
<blockquote><p>(DT_WSTR,1000)&#8221;E:\\zsTemp\\&#8221; + [Id] + &#8220;.eml&#8221;</p></blockquote>
<div id="attachment_11409" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11409" class="size-large wp-image-11409" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename-1024x626.png" alt="Derived Column - Dynamic File Path" width="720" height="440" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename-1024x626.png 1024w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename-768x470.png 768w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename.png 1154w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-11409" class="wp-caption-text">Derived Column &#8211; Dynamic File Path</p></div></li>
<li>Now, add an <strong>Export Column</strong> transformation to save the email content to a file.
<ul>
<li><strong>Extract Column:</strong> set to <code>ResponseText</code> (this holds the email content from Web API Destination)</li>
<li><strong>File Path Column:</strong> set to the column you created in the <strong>Derived Column</strong> step (e.g., <code>FilePath</code>)</li>
<li>Enable <strong>Force Truncate</strong> and <strong>Write Byte-Order Mark</strong> options</li>
</ul>
<div id="attachment_11411" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11411" class="size-large wp-image-11411" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file-1024x574.png" alt="Export Column - write the email content to a file on disk." width="720" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file-1024x574.png 1024w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file-300x168.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file-768x431.png 768w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file.png 1216w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-11411" class="wp-caption-text">Export Column &#8211; write the email content to a file on disk.</p></div></li>
<li><b>Set File Encoding to UTF-8 (Optional)</b><br />
Next, go to the <strong>Control Flow</strong> and use the <strong>Advanced File System Task</strong> to convert the downloaded <code>.eml</code> file’s encoding to <strong>UTF-8</strong>.<br />
This step is optional — I had to apply it on my system because the files weren’t opening correctly due to a non-UTF-8 encoding.<br />
If you encounter a similar issue, follow this step to ensure proper compatibility with email clients.</p>
<div id="attachment_11413" style="width: 889px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11413" class="size-full wp-image-11413" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding.png" alt="Advanced File System Task - Change Encoding" width="879" height="663" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding.png 879w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding-300x226.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding-768x579.png 768w" sizes="(max-width: 879px) 100vw, 879px" /></a><p id="caption-attachment-11413" class="wp-caption-text">Advanced File System Task &#8211; Change Encoding</p></div></li>
<li><strong>That’s it!</strong> The process will now automatically download your Outlook messages to your local system as <code>.EML</code> files.
<div id="attachment_11414" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11414" class="size-large wp-image-11414" src="https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files-1024x450.png" alt="Outlook .eml file’s" width="720" height="316" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files-1024x450.png 1024w, https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files-300x132.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files-768x338.png 768w, https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files.png 1044w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-11414" class="wp-caption-text">Outlook .eml file’s</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>Using <strong>ZappySys SSIS PowerPack</strong> and Microsoft Graph API, you can easily automate the download of Outlook (Office 365) emails in <code>.EML</code> format — all within SSIS and without writing any code.<br />
This approach is ideal for archiving, compliance, or integrating email content into downstream systems.<br />
With a few simple components and steps, your email extraction workflow can be up and running in minutes.</p>
<p>The post <a href="https://zappysys.com/blog/how-to-download-outlook-office-365-emails-as-eml-or-msg-files/">How to download Outlook (Office 365) Emails as .EML or .MSG Files</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call NetSuite RESTlet API in SSIS / ODBC</title>
		<link>https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 23 May 2022 21:18:19 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[NetSuite]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9657</guid>

					<description><![CDATA[<p>Introduction In our previous post we saw how to read API data in SSIS. This post we will cover how to call NetSuite RESTlet to read / write data in SSIS or ODBC Apps. For demo purpose we will use SSIS PowerPack REST API Task but concepts and many UI elements remain same for ODBC [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png"><img loading="lazy" decoding="async" class=" wp-image-9658 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png" alt="" width="144" height="114" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png 309w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo-300x238.png 300w" sizes="(max-width: 144px) 100vw, 144px" /></a>In our previous post we saw how to <a href="https://zappysys.com/blog/ssis-read-api-data-load-sql-table/">read API data in SSIS</a>. This post we will cover how to call <a href="https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N2979684.html">NetSuite RESTlet</a> to read / write data in SSIS or ODBC Apps. For demo purpose we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS PowerPack REST API Task</a> but concepts and many UI elements remain same for <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/">ODBC JSON Driver</a> too. This article assumes you know how to write Netsuite RESTlet and you have obtained Credentials to call RESTlet from extranal app.</p>
<h2></h2>
<h2></h2>
<h2>What is NetSuite RESTlets</h2>
<p>NetSuite added a really nice feature to expose business data and workflows as API by writing Javascript functions which they call it <strong>RESTlets</strong>. You can secure and customize these restlets as per your need.</p>
<p>You can automate CRUD (Create /Read / Write / Delete) operations in NetSuite by writing special functions in JavaScript and expose those functions as API URL which can be called by any external Systems (i.e. SSIS Packages , ODBC Apps like Power BI, Informatica, SSRS).</p>
<p>RESTlet can be secured few ways such as OAuth 1.0 and OAuth 2.0 authentication. We will cover both approach briefly in this article. You can choose any one as per your need</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <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>
</ol></div>
<h2>Creating NetSuite RESTlet / Obtain OAuth Credentials (Client ID and Secret)</h2>
<p>Below video shows how to obtain necessary credentials to call Netsuites API (RESTlet).</p>
<p>At mark 4:30 seconds it will show you How to use OAuth 2.0 for calling RESTlet</p>
<a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FMAOMQp5dh0U%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<p>&nbsp;</p>
<h2>Create NetSuite RESTlet Connection</h2>
<p>There are few ways to authenticate NetSuite RESTlet. If you are using ZappySys Products then it makes it super easy to use either approach. Lets look at both approaches.</p>
<h3>Using OAuth 2.0 (Recommended)</h3>
<p>As per above video if you obtained Client ID and Secret for OAuth 2.0 you can follow below steps to configure OAuth connection to call RESTlet.</p>
<p>What you need to use OAuth 2.0.</p>
<ul>
<li>Your Account ID (it goes in URL)</li>
<li>Your Client ID and Secret (Obtained from Netsuite Portal) &#8211; See above video Mark 04:30</li>
<li>Register Redirect URL in NetSuite portal (we recommend you use <strong>https://zappysys.com/oauth</strong> as call back Url for Automatic Code extraction)</li>
</ul>
<p><strong>Steps to configure OAuth Connection</strong></p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type<br />
<strong><strong><br />
</strong></strong></p>
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div>
<p>&nbsp;</p>
<p>&nbsp;</li>
<li> Enter following things<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On General Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
ClientID and Secret: <strong>&lt;get it from NetSuite&gt;</strong><br />
Authorization URL: <strong>https://&lt;accountID&gt;.</strong><a href="http://app.netsuite.com/app/login/oauth2/authorize.nl" target="_blank" rel="noopener noreferrer"><strong>app.netsuite.com/app/login/oauth2/authorize.nl</strong></a><br />
Token URL: <strong>https://&lt;accountID&gt;.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token<br />
</strong>Scope: <strong><strong><strong>restlet</strong></strong></strong></p>
<div id="attachment_9660" style="width: 642px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9660" class="size-full wp-image-9660" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png" alt="Configure NetSuite OAuth 2.0 Connection for API call" width="632" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png 632w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection-300x198.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></a><p id="caption-attachment-9660" class="wp-caption-text">Configure NetSuite OAuth 2.0 Connection for API call</p></div>
<p>&nbsp;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On Advanced Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Callback / Redirect URL:  <strong>https://zappysys.com/oauth </strong> (this must be entered same way in NetSuite Portal)</p>
<div id="attachment_9659" style="width: 563px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9659" class="size-full wp-image-9659" src="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png" alt="OAuth2 Connection - Callback / Redirect URL" width="553" height="201" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png 553w, https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url-300x109.png 300w" sizes="(max-width: 553px) 100vw, 553px" /></a><p id="caption-attachment-9659" class="wp-caption-text">OAuth2 Connection &#8211; Callback / Redirect URL</p></div></li>
<li>Now go back to General Tab and click <strong>Generate Token</strong> button</li>
<li>Follow login screen and try to finish the flow. At the end it will generate Tokens and populate on UI</li>
<li>Click OK to save</li>
</ol>
<h3>Using OAuth 1.0</h3>
<p>Another approach is use OAuth 1.0 (Older version). If you have enabled OAuth 1.0 in NetSuite then follow below steps (Create connection is same as before).</p>
<ol>
<li>Setup General Tab and Advanced Tab as below.<br />
On <strong>==== </strong><strong>General Tab====</strong>:<br />
Enter ClientID, ClientSecret, AccessToken, AccessToken Secret<br />
On <strong>==== </strong><strong>Advanced Tab ====</strong>:<br />
Check <strong>Do Not Include Empty Key/Value Pairs</strong><br />
Select Signature Method as <strong>HMAC-SHA256</strong><br />
For Extra Token Attribute enter <strong>realm=&lt;your-account-number&gt;_SB1</strong></li>
<li>Click OK to Save</li>
</ol>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9662" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9661" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<h2></h2>
<h2>Call NetSuite RESTlet in SSIS</h2>
<ol>
<li>Create a new SSIS Package</li>
<li>Drag REST API Task from SSIS Toolbox<img decoding="async" class="figureimage" title="SSIS REST Api Web Service Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="SSIS REST Api Task - Drag and Drop" /></li>
<li>Double click the Task to configure</li>
<li>Select <strong>URL from Connection </strong></li>
<li>From Connection dropdown select OAuth connection we created in the earlier section (either OAuth 1 or OAuth 2)</li>
<li>Enter the URL as below. Assuming you copied URL from NetSuite Replace script ID and account number<br />
<pre class="crayon-plain-tag">https://&lt;account-number&gt;-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=&lt;scriptid&gt;&amp;deploy=1</pre>Enter <strong>&lt;account-number&gt;</strong><br />
Enter <strong>&lt;scriptid&gt;</strong></li>
<li>Change Method to POST if your script supports Parameters (Else you can supply id=xxxx and recordtype=xxxxx in the URL for GET request)</li>
<li>If its POST request then chnage ContentType to ApplicationJSON (application/json)</li>
<li>Enter your Input in the body. In below example our RESTlet takes sql query as input so we enter just one parameter named query but you can have different parameter(s)<br />
<pre class="crayon-plain-tag">Syntax:  { param1_name : &lt;value&gt; , param2_name : &lt;value&gt; ....  }</pre>
</li>
<li>Now click Test see everything works
<div id="attachment_9663" style="width: 1178px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9663" class="size-full wp-image-9663" src="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png" alt="Calling NetSuite RESTlet in SSIS (Using REST API Task)" width="1168" height="928" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png 1168w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-768x610.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-1024x814.png 1024w" sizes="(max-width: 1168px) 100vw, 1168px" /></a><p id="caption-attachment-9663" class="wp-caption-text">Calling NetSuite RESTlet in SSIS (Using REST API Task)</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>We saw how easy it is to call NetSuite RESTlets or other NetSuite API in SSIS / other BI Apps using ODBC Drivers provided by ZappySys. <a href="https://zappysys.com/products/ssis-powerpack/download/">Download SSIS PowerPack</a> and try your self see how easy it is to consume virtually any API in SSIS.</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</title>
		<link>https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 18:38:33 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[manageengine]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[servicedesk]]></category>
		<category><![CDATA[zoho]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9624</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn how to read / write ManageEngine ServiceDesk data in SSIS (Drag and drop approach without any coding).  We will use SSIS JSON/ REST API Source to extract data from Servicedesk API and use SSIS Web API Destination to write data to Zoho. We will look at step-by-step instructions to read ServiceDesk  data [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/">Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<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;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/zoho-managedengine-service-desk-plus-connector/">API Connector for Zoho / ManageEngine ServiceDesk Pro OnDemand (Cloud Version)</a> which makes it much simpler to <strong>Read/Write ServiceDesk Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<p>In this post, you will learn how to read / write ManageEngine ServiceDesk data in SSIS (Drag and drop approach without any coding).  We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON/ REST API Source</a> to extract data from Servicedesk API and use <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination</a> to write data to Zoho.</p>
<p>We will look at step-by-step instructions to read ServiceDesk  data (e.g. Request, Problems, Contacts) and load into SQL Server Database Table.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <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>
</ol></div>
<h2>Authentication ServiceDesk REST API in SSIS (Use OAuth 2.0)</h2>
<p>Very first step to call ServiceDesk API is you need to register OAuth App in Zoho Portal. Don&#8217;t get confused if you see Zoho Portal for ServiceDesk a Product from ManageEngine is in fact Zoho subsidiary (in other words Zoho is the parent company). ServiceDesk has On-Premises version too but this article is only about Cloud version.</p>
<h3>Register Zoho OAuth App and get ClientID/ Secret (*** MUST READ ***)</h3>
<p><a href="https://zappysys.com/blog/register-oauth-app-zoho-api/" target="_blank" rel="noopener">Check this article</a> to register your OAuth App and obtain Client ID  /Client Secret</p>
<h3>Create ServiceDesk API Connection in SSIS</h3>
<p>Once you create Zoho OAuth App now its time to call some Zoho API. Let&#8217;s create the OAuth Connection first. In the next section we will see how to load data in SQL Server.</p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div></li>
<li>Configure your OAuth connection General Tab as below</li>
<li>OAuth Provider: <strong>Custom</strong></li>
<li>OAuth Version: <strong>OAuth2</strong></li>
<li><strong>Client Id</strong> , <strong>Client Secret </strong></li>
<li>Enter One Scope Per Line (For more info on scope <a href="https://www.manageengine.com/products/service-desk/sdpod-v3-api/getting-started/oauth-2.0.html#scopes" target="_blank" rel="noopener">read here</a>) . For write you can change READ to WRITE or use ALL as per the help link.<br />
<pre class="crayon-plain-tag">SDPOnDemand.requests.READ</pre>
</li>
<li>Auth URL : <strong>https://accounts.zoho.com/oauth/v2/auth</strong></li>
<li>Token URL:  <strong><strong>https://accounts.zoho.com/oauth/v2/token</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9617" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png" alt="" width="577" height="328" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png 577w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes-300x171.png 300w" sizes="(max-width: 577px) 100vw, 577px" /></a></li>
<li>Configure Advanced tab as below</li>
<li>Enter Callback URL : <strong>https://zappysys.com/oauth</strong></li>
<li>Enter Extra Attribute for /Auth : <strong>access_type=offline&amp;prompt=consent</strong><br />
This is needed to obtain refresh_token (if you ommit this then only access_token returned which cannot be renewed once expired after 1hr)</p>
<div class="mceTemp"></div>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9618" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png" alt="" width="551" height="320" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png 551w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url-300x174.png 300w" sizes="(max-width: 551px) 100vw, 551px" /></a></li>
<li>Now go back to general tab and <strong>Click Generate Token</strong>. Close the Popup and use Full browser instead if you see prompt.</li>
<li>Click OK to save the connection UI</li>
</ol>
<h2>Read data from ServiceDesk API in SSIS JSON Source</h2>
<p>In this section we will learn how to read data from ServiceDesk using SSIS JSON Source. We will use OAuth connection created in earlier section.</p>
<p>Now lets look at step by step example of reading ManageEngine ServiceDesk data using SSIS (e.g. Requests).</p>
<p>ManageEngine provides JSON API for read action so we will Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> for this purpose.</p>
<h3>Configure JSON Source</h3>
<p>So below steps shows example of reading from ManageEngine Requests API</p>
<ol>
<li>Open SSIS Package</li>
<li>Drag data flow task from Control flow SSIS Toolbox
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="Drag data flow from SSIS Toolbox" width="460" height="155" /><p class="wp-caption-text">Drag data flow from SSIS Toolbox</p></div></li>
<li>Go to data flow and drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a> from SSIS Toolbox
<div style="width: 551px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="Drag and drop SSIS JSON Source (REST API or File)" width="541" height="144" /><p class="wp-caption-text">Drag and drop SSIS JSON Source (REST API or File)</p></div></li>
<li>Double click JSON Source to configure. Enter URL as below. You can supply few more parameters. <a href="https://www.zoho.com/crm/developer/docs/api/get-records.html" target="_blank" rel="noopener">Click Here to get full list of parameters and usage</a>. In below example we are reading records from Leads Module but you can replace Leads to something else (e.g. Accounts). Refer to above help link for available Modules.<br />
<pre class="crayon-plain-tag">https://sdpondemand.manageengine.com/api/v3/requests</pre>
</li>
<li>Check Use Credentials. Select OAuth connection manager we created in the previous section.</li>
<li>Add the Accept header in HTTP Headers.<br />
<pre class="crayon-plain-tag">Accept: application/vnd.manageengine.sdp.v3+json</pre>
</li>
<li>Under filter options tab, enter <strong>Array Filter</strong> as  <pre class="crayon-plain-tag">$.requests[*]</pre></li>
<li>Now click Preview to see your data</li>
<li>Click OK to save UI. In the next section, we will see how to setup pagination and incremental extract of Servicedesk records. After that we will see how to load data into SQL Server Table.</li>
</ol>
<div id="attachment_9626" style="width: 961px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9626" class="size-full wp-image-9626" src="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png" alt="Read ManageEngine ServiceDesk Plus data in SSIS (Cloud Version) - Zoho API" width="951" height="909" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png 951w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api-300x287.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api-768x734.png 768w" sizes="(max-width: 951px) 100vw, 951px" /></a><p id="caption-attachment-9626" class="wp-caption-text">Read ManageEngine ServiceDesk Plus data in SSIS (Cloud Version) &#8211; Zoho API</p></div>
<h3>ServiceDesk API Pagination (Read all Requests)</h3>
<p>Just like most API ServiceDesk also uses pagination. See below to learn how to configure pagination in JSON Source for ServiceDesk API.</p>
<ol>
<li>Double click JSON Source</li>
<li>Change URL to include two things (Page size (how many rows per page and start row). Note &lt;%page%&gt; must match with <strong>Page Num Indicator </strong>you going enter in the next screen<br />
<pre class="crayon-plain-tag">https://sdpondemand.manageengine.com/api/v3/requests?input_data={"list_info":{"row_count":100,"start_index":&lt;%page%&gt;}}</pre>
</li>
<li>Go to <strong>Pagination</strong> Tab and select <strong>URL Path Mode</strong></li>
<li>For <strong>Page Num Indicator</strong> : Enter <pre class="crayon-plain-tag">&lt;%page%&gt;</pre></li>
<li>For <strong>Increment By</strong> : Enter <pre class="crayon-plain-tag">100</pre></li>
<li>Page Start Number select New variable call it StartIndex and start default value <strong>1</strong></li>
</ol>
<p>Once you configure this way now your API will return all records until last page is detected. For more information on pagination <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">check this article</a></p>
<div id="attachment_9628" style="width: 1043px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9628" class="size-full wp-image-9628" src="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png" alt="How to paginate ManageEngine ServiceDesk API" width="1033" height="1006" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png 1033w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-300x292.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-768x748.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-1024x997.png 1024w" sizes="(max-width: 1033px) 100vw, 1033px" /></a><p id="caption-attachment-9628" class="wp-caption-text">How to paginate ManageEngine ServiceDesk API</p></div>
<h3>Loading ServiceDesk data into SQL Server Table / Other Target</h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h3>Write data to ServiceDesk using OAuth 2.0</h3>
<p>If you like to load data from any source (i.e. SQL Server) to Zoho CRM then you can use <a href="https://www.zoho.com/crm/developer/docs/api/insert-records.html" target="_blank" rel="noopener">Records API (POST)</a>. Use a combination of the following Transforms  / Components. Later in this article we have some more examples (Older API) which may give you one more ways to load data into Zoho (Use of Template Transform).</p>
<p>Basically you have to build POST Body using JSON Generator Transform or Template Transform and then use that data in Web API Destination to call POST API request to push data to ServiceDesk. Basically screnshot below is just an example using some other Zoho API but you get the idea.</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/images/SSIS-PowerPack/ssis-json-generator-transform.png" alt="JSON Generator Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-parser-transform/ssis-json-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div id="attachment_8312" style="width: 678px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8312" class="size-full wp-image-8312" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png" alt="Create JSON for POST request (Single dataset pattern)" width="668" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png 668w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write-275x300.png 275w" sizes="(max-width: 668px) 100vw, 668px" /></a><p id="caption-attachment-8312" class="wp-caption-text">Create JSON for POST request (Single dataset pattern)</p></div>
<p>&nbsp;</p>
<div id="attachment_8313" style="width: 757px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8313" class="size-full wp-image-8313" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png" alt="Insert data to Zoho Table using SSIS (Lead, Account Modules) - Bulk Load using POST API call" width="747" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png 747w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts-300x253.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></a><p id="caption-attachment-8313" class="wp-caption-text">Insert data to Zoho Table using SSIS (Lead, Account Modules) &#8211; Bulk Load using POST API call</p></div>
<h2>Write data to ServiceDesk using SSIS (Import SQL Server Table to ServiceDesk)</h2>
<p>Now you know how to read data from Zoho CRM using JSON API Source next step is to load data to Zoho CRM. For writing data we will use following three components</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"></td>
<td>Template Transform</td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/xml-parser-transform/ssis-xml-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-parser-transform/" target="_blank" rel="noopener">XML Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div class="mceTemp"></div>
<div class="content_block" id="custom_post_widget-1887"><h3>Truncation related error</h3>
<p style="text-align: justify;">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article "<a href="//zappysys.com/blog/handling-ssis-component-metadata-issues/" target="_blank" rel="noopener">How to handle SSIS errors (truncation, metadata issues)</a>".</p>

<h3>Authentication related error</h3>
Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check <a href="#Deployment_to_Production">the paragraph below</a> to see why it happens and how to solve this problem.</div>
<div class="content_block" id="custom_post_widget-2021"><h2>Things have gone bad: Error handling &amp; debugging</h2>
<p style="text-align: justify;">Incidentally, bad things can happen<i>. </i>A remote server may go offline or your server may go out of memory. In any case, you may want to know when that happens and take actions accordingly. For that purpose, you have to redirect bad rows to some other destination. For this example, we will take and use <em>Web API Destination</em>, but basically, you can use any SSIS component:</p>

<h3>Handling errors</h3>
<ol style="margin-left: 0;">
 	<li>Add a <em>Derived Column</em> above <em>Web API Destination</em> with expression <strong>"(DT_WSTR,4000)ZS_JSON_OUT"</strong> and name it <strong>"JsonAsString"</strong>. This will let you see what JSON you are actually passing.</li>
 	<li>Then add a database or file destination or use another <em>Trash Destination</em> for debugging purposes and redirect the bad rows (<span style="color: #d66565;">red arrow</span>) from <em><em>Web API Destination </em></em>into it<em><em>. </em></em>Don't forget to set <span class="lang:default decode:true crayon-inline">Redirect row</span> option for both, <em>Error</em> and <em>Truncation</em> columns:<em><em>
</em></em>
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1487 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" alt="Redirect bad rows from &lt;em&gt;Web API Destination&lt;/em&gt; to &lt;em&gt;Trash Destination&lt;/em&gt; when load from SQL Server to Elasticsearch is failing. Add derived column JsonAsString to be able to read JSON you are using." width="739" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png 739w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows-300x108.png 300w" sizes="(max-width: 739px) 100vw, 739px" /></a>
<p class="wp-caption-text">Redirected failed requests from <em>Web API Destination</em> to a desired destination when loading from SQL Server to REST API Service is failing. Derived Column <em>JsonAsString</em> added to be able to read JSON which was passed to Elasticsearch</p>

</div></li>
 	<li>Finally, add a <a href="https://technet.microsoft.com/en-us/library/ms140318%28v=sql.90%29.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener"><em>Data Viewer</em></a> for the red path, if you want to debug the flow. You will be able to see URL, JSON and the error message for each record. You may want to copy-paste <em>ErrorMessage</em> to <em>Notepad </em>if you want it to be more readable:
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1494 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" alt="Use Data Viewer to view HTTP requests that failed to be fulfilled in Elasticsearch" width="752" height="280" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png 752w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-300x112.png 300w" sizes="(max-width: 752px) 100vw, 752px" /></a>
<p class="wp-caption-text">Use Data Viewer to view HTTP requests that failed to be fulfilled.</p>

</div></li>
</ol>
<div class="su-note" style="border-color: #e5dea5; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;">
<div class="su-note-inner su-clearfix" style="background-color: #fff7b7; border-color: #fffdf1; color: #333333; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"><strong>NOTE</strong>: You can read more about redirecting rows in <a href="//zappysys.com/blog/ssis-error-handling-in-data-flow-redirect-bad-rows/" target="_blank" rel="noopener">SSIS Error Handling (Redirect bad rows)</a> article.</div>
</div>
<h3>Debugging HTTP requests</h3>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>
<p class="wp-caption-text">Debugging Web API call using Fiddler in SSIS</p>

</div></div>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>Manageengine  Servicedesk API provides a great way to automate data read/write operations. However, to call Service API  you have to use SDK / coding approach (e.g. C#, Java, Python, Ruby). Luckily ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> provides a great way to integrate any Servicedesk API call via a  simple drag and drop approach without coding. Try  <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> for free and call virtually any REST API in a few clicks.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/">Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call OneDrive API in SSIS (Upload, Download)</title>
		<link>https://zappysys.com/blog/call-onedrive-api-ssis-file-upload-download-delete/</link>
		
		<dc:creator><![CDATA[Ankur Saxena]]></dc:creator>
		<pubDate>Wed, 05 Aug 2020 14:08:12 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[microsoft graph api]]></category>
		<category><![CDATA[onedrive]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8965</guid>

					<description><![CDATA[<p>Introduction Microsoft Graph API is a unified way to access many Microsoft services API including OneDrive API. In our previous blog post we saw how to call Office 365 API Graph API. In this post, you will focus on how to access OneDrive API in SSIS and use REST API Task or connector like SSIS JSON / [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-onedrive-api-ssis-file-upload-download-delete/">How to call OneDrive API in SSIS (Upload, Download)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<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;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/onedrive-connector/">API Connector for OneDrive</a> which makes it much simpler to <strong>Read/Write OneDrive Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).<br />
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png"><img loading="lazy" decoding="async" class="wp-image-9115 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png" alt="" width="161" height="119" /></a><a href="https://developer.microsoft.com/en-us/graph/docs/concepts/overview" target="_blank" rel="noopener">Microsoft Graph API</a> is a unified way to access many Microsoft services API including <strong>OneDrive API</strong>. In our previous blog post we saw <a href="https://zappysys.com/blog/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel/" target="_blank" rel="noopener">how to call Office 365 API Graph API</a>. In this post, you will focus on how to access OneDrive API in SSIS and use REST API Task or connector like <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON / REST API Source Connector</a> to load Read / Download / Upload data from OneDrive.</p>
<p>OneDrive allows to store files on the cloud and and we have seen growing requirements in downloading/Uploading files from there. This post will provide step by step details of how to Upload/Download files from OneDrive.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <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>
</ol></div>
<h2>Register Microsoft App for OAuth Authentication</h2>
<p>In this section, you will learn how to register a custom app in Microsoft Azure portal that will allow access to the OneDrive. So, let&#8217;s get started &#8211;</p>
<ol>
<li>Log into <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps">Microsoft Azure portal</a> to register a custom app.</li>
<li>Register a new application by clicking New Registration link.
<div id="attachment_9034" style="width: 758px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9034" class="size-full wp-image-9034" src="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png" alt="New App Registration in Azure portal" width="748" height="221" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png 748w, https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration-300x89.png 300w" sizes="(max-width: 748px) 100vw, 748px" /></a><p id="caption-attachment-9034" class="wp-caption-text">New App Registration in Azure portal</p></div></li>
<li>Provide the name of the custom app and who can access the app in the organization.
<div id="attachment_9005" style="width: 620px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9005" class="wp-image-9005 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg" alt="Register an OneDrive App" width="610" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg 610w, https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1-300x255.jpg 300w" sizes="(max-width: 610px) 100vw, 610px" /></a><p id="caption-attachment-9005" class="wp-caption-text">Register an OneDrive App</p></div></li>
<li>Go to the App overview and add a Redirect URL.
<div id="attachment_9044" style="width: 947px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9044" class="wp-image-9044 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg" alt="Add a Redirect URL" width="937" height="122" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg 937w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-300x39.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-768x100.jpg 768w" sizes="(max-width: 937px) 100vw, 937px" /></a><p id="caption-attachment-9044" class="wp-caption-text">Add a Redirect URL</p></div></li>
<li>Click on &#8220;Add a Platform&#8221; under Platform Configuration section and then select &#8220;Web&#8221; under Web applications section to enter a Redirect URL.<br />
<pre class="crayon-plain-tag">https://zappysys.com/oauth</pre>
<div id="attachment_9007" style="width: 476px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9007" class="size-full wp-image-9007" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg" alt="Redirect URL" width="466" height="564" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg 466w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2-248x300.jpg 248w" sizes="(max-width: 466px) 100vw, 466px" /></a><p id="caption-attachment-9007" class="wp-caption-text">Redirect URL</p></div></li>
<li>Create a Client Secret key which will be used to Authenticate the custom Azure app.
<div id="attachment_9010" style="width: 586px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9010" class="size-full wp-image-9010" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg" alt="Add a Client Secret" width="576" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg 576w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret-300x210.jpg 300w" sizes="(max-width: 576px) 100vw, 576px" /></a><p id="caption-attachment-9010" class="wp-caption-text">Add a Client Secret</p></div>
<div id="attachment_9011" style="width: 218px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9011" class="size-full wp-image-9011" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg" alt="Secret Key Expiration Period" width="208" height="259" /></a><p id="caption-attachment-9011" class="wp-caption-text">Secret Key Expiration Period</p></div>
<div id="attachment_9012" style="width: 1034px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9012" class="size-full wp-image-9012" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg" alt="Specify Secret Key" width="1024" height="176" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-300x52.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-768x132.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><p id="caption-attachment-9012" class="wp-caption-text">Specify Secret Key</p></div>
<div><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;"><strong>Note</strong> &#8211; Take a note of <strong>Client Secret</strong>, it will be required while configuring OAuth connection in the SSIS later.</div></div></div>
</li>
<li>Add API Permissions for OneDrive API.
<div id="attachment_10198" style="width: 1301px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10198" class="wp-image-10198 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1.jpg" alt="OneDrive API Permissions" width="1291" height="415" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1.jpg 1291w, https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1-300x96.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1-768x247.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1-1024x329.jpg 1024w" sizes="(max-width: 1291px) 100vw, 1291px" /></a><p id="caption-attachment-10198" class="wp-caption-text">OneDrive API Permissions</p></div></li>
<li>Select the following permissions from the Delegated Permissions section.<br />
<pre class="crayon-plain-tag">User.ReadBasic.All
Files.Read
offline_access</pre>
<div id="attachment_9009" style="width: 522px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9009" class="size-full wp-image-9009" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg" alt="Select Delegated Permissions" width="512" height="571" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg 512w, https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2-269x300.jpg 269w" sizes="(max-width: 512px) 100vw, 512px" /></a><p id="caption-attachment-9009" class="wp-caption-text">Select Delegated Permissions</p></div></li>
<li>Take note of Client ID, it will be required while configuring OAuth connection in the SSIS later.
<div id="attachment_10199" style="width: 820px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10199" class="wp-image-10199 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41.jpg" alt="Client ID" width="810" height="274" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41.jpg 810w, https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41-300x101.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41-768x260.jpg 768w" sizes="(max-width: 810px) 100vw, 810px" /></a><p id="caption-attachment-10199" class="wp-caption-text">Client ID</p></div></li>
</ol>
<h2>Get OneDrive File ID</h2>
<p>In this section, you will learn how to get the File ID of the CSV file through OneDrive API. So, let&#8217;s get started &#8211;</p>
<ol>
<li>Go to the <a href="https://developer.microsoft.com/en-us/graph/graph-explorer">Microsoft Graph Explorer</a>.</li>
<li>Sign in to Graph Explorer.
<div id="attachment_9153" style="width: 489px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/ssis-GraphExplorer-2.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9153" class="wp-image-9153 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/08/ssis-GraphExplorer-2.jpg" alt="SSIS GraphExplorer SignIn" width="479" height="388" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/ssis-GraphExplorer-2.jpg 479w, https://zappysys.com/blog/wp-content/uploads/2020/08/ssis-GraphExplorer-2-300x243.jpg 300w" sizes="(max-width: 479px) 100vw, 479px" /></a><p id="caption-attachment-9153" class="wp-caption-text">SSIS GraphExplorer SignIn</p></div></li>
<li>Run below OneDrive API to get a list of the files from the OneDrive.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/root/children</pre>
<div id="attachment_9048" style="width: 1003px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9048" class="size-full wp-image-9048" src="https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1.jpg" alt="Microsoft Graph Explorer" width="993" height="509" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1.jpg 993w, https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1-300x154.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1-768x394.jpg 768w" sizes="(max-width: 993px) 100vw, 993px" /></a><p id="caption-attachment-9048" class="wp-caption-text">Microsoft Graph Explorer</p></div>
<div><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;"><strong>NOTE:</strong> Take a note of <strong>File ID</strong> of the CSV file. For this example, we will download invoices.csv file.</div></div></div>
</li>
</ol>
<h2>Create OAuth Connection in SSIS</h2>
<p>In this section, you will learn how to create an OAuth connection in SSIS to an Azure custom app. So, let&#8217;s get started &#8211;</p>
<ol>
<li>Create a new ZS-OAuth connection in SSIS.
<div id="attachment_9015" style="width: 486px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9015" class="size-full wp-image-9015" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth.jpg" alt="ZappySys OAuth Connection in SSIS" width="476" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth.jpg 476w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth-300x280.jpg 300w" sizes="(max-width: 476px) 100vw, 476px" /></a><p id="caption-attachment-9015" class="wp-caption-text">ZappySys OAuth Connection in SSIS</p></div></li>
<li>Configure OAuth connection with following settings.
<div>
<div></div>
</div>
<div class="su-table su-table-alternate">
<table style="width: 100%;border-collapse: collapse;border-style: solid;border-color: #dedede" border="1">
<tbody>
<tr style="height: 21px">
<td style="width: 23.0015%;height: 21px"><span style="font-size: 10pt">Client ID</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">Provide Client ID from App Registration steps</span></td>
</tr>
<tr>
<td style="width: 23.0015%"><span style="font-size: 10pt">Client Secret</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">Provide Client Secret from App Registration steps</span></td>
</tr>
<tr>
<td style="width: 23.0015%"><span style="font-size: 10pt">Authorization URL</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize</span></td>
</tr>
<tr>
<td style="width: 23.0015%"><span style="font-size: 10pt">Access Token URL</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">https://login.microsoftonline.com/organizations/oauth2/v2.0/token</span></td>
</tr>
<tr>
<td style="width: 23.0015%"><span style="font-size: 10pt">Scope/Permissions</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">User.ReadBasic.All</span><br />
<span style="font-size: 10pt">Files.Read.All</span><br />
<span style="font-size: 10pt">offline_access</span></td>
</tr>
</tbody>
</table>
</div>
<div id="attachment_9016" style="width: 860px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9016" class="wp-image-9016 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2.jpg" alt="OAuth Connection Configuration" width="850" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2.jpg 850w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2-300x230.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2-768x590.jpg 768w" sizes="(max-width: 850px) 100vw, 850px" /></a><p id="caption-attachment-9016" class="wp-caption-text">OAuth Connection Configuration</p></div></li>
<li>Go to the Advanced tab and provide Return URL.<br />
<pre class="crayon-plain-tag">https://zappysys.com/oauth</pre>
<div id="attachment_9021" style="width: 827px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9021" class="size-full wp-image-9021" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6.jpg" alt="Add Redirect URL" width="817" height="197" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6.jpg 817w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6-300x72.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6-768x185.jpg 768w" sizes="(max-width: 817px) 100vw, 817px" /></a><p id="caption-attachment-9021" class="wp-caption-text">Add Redirect URL</p></div></li>
<li>Click on Generate Token will give a login screen which will allow to generate access and refresh token for the app.</li>
<li>Approve the requested permissions bu Accepting it.
<div id="attachment_9018" style="width: 638px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth4.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9018" class="size-full wp-image-9018" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth4.jpg" alt="Approve Permissions Requested" width="628" height="522" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth4.jpg 628w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth4-300x249.jpg 300w" sizes="(max-width: 628px) 100vw, 628px" /></a><p id="caption-attachment-9018" class="wp-caption-text">Approve Permissions Requested</p></div></li>
<li>Token has been generate successfully.
<div id="attachment_9019" style="width: 422px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth5.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9019" class="wp-image-9019 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth5.jpg" alt="Refresh Token Successful" width="412" height="315" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth5.jpg 412w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth5-300x229.jpg 300w" sizes="(max-width: 412px) 100vw, 412px" /></a><p id="caption-attachment-9019" class="wp-caption-text">Refresh Token Successful</p></div></li>
<li>Let&#8217;s test the connection to make sure it is working fine.
<div id="attachment_9020" style="width: 827px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9020" class="wp-image-9020 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7.jpg" alt="Connection Successful" width="817" height="694" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7.jpg 817w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7-300x255.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7-768x652.jpg 768w" sizes="(max-width: 817px) 100vw, 817px" /></a><p id="caption-attachment-9020" class="wp-caption-text">Connection Successful</p></div></li>
</ol>
<h2>Download CSV File Through OneDrive REST API in SSIS</h2>
<p>In this section, you will learn how to download a CSV file through OneDrive API in SSIS and save it into a CSV file.</p>
<ol>
<li>Here is the OneDrive API which allows to read content of the file.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/Items/&lt;File ID&gt;/content</pre>
</li>
<li>Replace &lt;File ID&gt; in above step#1 with the file ID that we have got in the <strong>Get OneDrive File ID</strong> section. Final URL will look something like below.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/Items/01W7L3VCUBS27ILUQKENAK4LQGGTJ2R3TT/content</pre>
</li>
<li>Let&#8217;s create a SSIS package with Data Flow Task from SSIS Toolbox.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/AddDataflow.png"><img loading="lazy" decoding="async" width="516" height="185" class="size-full wp-image-9073" src="https://zappysys.com/blog/wp-content/uploads/2020/07/AddDataflow.png" alt="&quot;&quot;/content&lt;/pre" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/AddDataflow.png 516w, https://zappysys.com/blog/wp-content/uploads/2020/07/AddDataflow-300x108.png 300w" sizes="(max-width: 516px) 100vw, 516px" /></a></li>
<li>Replace &lt;File ID&gt; in above step#1 with the file ID that we have got in the <strong>Get OneDrive File ID</strong> section. Final URL will look something like below.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/Items/01W7L3VCWMCGPYZLM2IRAYWROSH4XMQT7A/content</pre>
</li>
<li>Configure REST API task as follows.
<div id="attachment_9084" style="width: 928px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9084" class="size-full wp-image-9084" src="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File.png" alt="Binary File Configuration in ZappySys REST API Task" width="918" height="625" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File.png 918w, https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File-768x523.png 768w" sizes="(max-width: 918px) 100vw, 918px" /></a><p id="caption-attachment-9084" class="wp-caption-text">Binary File Configuration in ZappySys REST API Task</p></div></li>
<li>Configure the responses setting as below.
<div id="attachment_9083" style="width: 696px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9083" class="wp-image-9083 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File2.png" alt="Binary File Configuration in ZappySys REST API Task" width="686" height="613" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File2.png 686w, https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File2-300x268.png 300w" sizes="(max-width: 686px) 100vw, 686px" /></a><p id="caption-attachment-9083" class="wp-caption-text">Binary File Configuration in ZappySys REST API Task</p></div>
<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;"><strong>NOTE</strong>: Ensure that the <strong>Treat response as the binary</strong> checkbox is checked otherwise the file will be downloaded but corrupted as zip/mp3 etc. file format is binary.</div></div></li>
<li>Check if the request is made correctly by clicking Test Request/Response.
<div id="attachment_10201" style="width: 622px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/Download-Binary-File3.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10201" class="wp-image-10201 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/08/Download-Binary-File3.png" alt="Example of Testing the Request" width="612" height="621" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/Download-Binary-File3.png 612w, https://zappysys.com/blog/wp-content/uploads/2020/08/Download-Binary-File3-296x300.png 296w" sizes="(max-width: 612px) 100vw, 612px" /></a><p id="caption-attachment-10201" class="wp-caption-text">Example of Testing the Request</p></div></li>
<li>Let&#8217;s have a look at the folder where the file has been downloaded. Here is an example &#8211;
<div id="attachment_9082" style="width: 894px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9082" class="wp-image-9082 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample.png" alt="Downloaded File Example" width="884" height="128" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample.png 884w, https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample-300x43.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample-768x111.png 768w" sizes="(max-width: 884px) 100vw, 884px" /></a><p id="caption-attachment-9082" class="wp-caption-text">Downloaded File Example</p></div></li>
</ol>
<div class="mceTemp"></div>
<h2>Download a Text File Through OneDrive API in SSIS</h2>
<p>Here is another technique that can be used to download a CSV/text file through OneDrive API without knowing it&#8217;s file ID but file name. Please check this <a href="https://zappysys.zendesk.com/hc/en-us/articles/115005010573-How-to-download-file-from-OneDrive-using-Graph-API">link</a> for more details.</p>
<h2>Download Excel Sheets Through OneDrive API in SSIS</h2>
<p>JSON Source also supports reading API response which returns 2D arrays. Such as <a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/excel" target="_blank" rel="noopener">Office Excel Spreadsheet API</a> to read excel data. Check <a href="https://zappysys.com/blog/get-data-google-spreadsheet-using-ssis/" target="_blank" rel="noopener">this blog post</a> to learn a similar scenario to parse 2D arrays. There are few other options for parsing 2D arrays which are <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">documented here</a>.</p>
<div id="crayon-5efb7d9f087eb405096699" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate">
<div class="crayon-plain-wrap">
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/items/01CYZLFJDYxxxxxxx/workbook/worksheets('test')/range(address='A1:B200')</pre>
</div>
</div>
<h2>Upload a File Through OneDrive API in SSIS</h2>
<p>In this section, you will learn how to upload a file through OneDrive API in SSIS. Uploading a file has few additional steps and has been documented separately. Please check this <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004893713-How-to-upload-file-to-OneDrive-using-Office-365-Graph-API">link</a> for more details.</p>
<h2>Delete a File Through OneDrive API in SSIS</h2>
<p>In this section, you will learn how to delete a file from OneDrive through OneDrive APIs in SSIS.</p>
<ol>
<li>Add a REST API task and configure as follows. Make sure to use the File ID of the file which needs to be deleted from OneDrive. Example URL &#8211;<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/Items/01W7L3VCSEADQ457W54RBI3I47YGFJOD2I</pre>
<div id="attachment_9081" style="width: 818px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9081" class="wp-image-9081 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File.png" alt="Delete OneDrive File" width="808" height="648" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File.png 808w, https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File-300x241.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File-768x616.png 768w" sizes="(max-width: 808px) 100vw, 808px" /></a><p id="caption-attachment-9081" class="wp-caption-text">Delete OneDrive File</p></div></li>
<li>Execute the task and you will have file deleted from OneDrive.</li>
</ol>
<h2><span id="ConclusionWhats_next"><span id="ConclusionWhat8217s_next">Conclusion</span></span></h2>
<p>In this article, we have learned how to Upload/Download/Delete data/file from OneDrive API in SSIS. We used <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">SSIS REST API Task</a> to extract data through OneDrive API in SSIS. <a href="https://zappysys.com/products/ssis-powerpack/">Download SSIS PowerPack</a> to try many other automation scenarios not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/call-onedrive-api-ssis-file-upload-download-delete/">How to call OneDrive API in SSIS (Upload, Download)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Get Office 365 Mail Attachments using SSIS</title>
		<link>https://zappysys.com/blog/get-office-365-mail-attachments-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 22 Feb 2020 08:27:34 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS JSON Parser Transform]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Template Transform]]></category>
		<category><![CDATA[SSIS Trash Destination]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[office 365]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8791</guid>

					<description><![CDATA[<p>Introduction In our previous article, we saw how to get Office 365 data in Power BI. Now, let’s look at how to get Office 365 Mail Attachments using SSIS without any coding. Microsoft Graph API is a unified way to access many Microsoft services, including the Office 365 API. In this post, we will use the SSIS [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/get-office-365-mail-attachments-using-ssis/">How to Get Office 365 Mail Attachments using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<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>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/ssis">Outlook Mail (Office 365) connector</a>, which makes it much simpler to <strong>download attachments, read/search emails, users, mail folders, send email, and more in SSIS</strong> compared to the steps listed in this article. You can still use the steps from this article, but if you are new to APIs or want to avoid the learning curve, use a newer approach.</div></div>
<p><a href="//zappysys.com/blog/wp-content/uploads/2017/08/microsoft-office-365-api-integration.png"><img loading="lazy" decoding="async" class="alignleft wp-image-1694" src="//zappysys.com/blog/wp-content/uploads/2017/08/microsoft-office-365-api-integration.png" alt="" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2017/08/microsoft-office-365-api-integration.png 241w, https://zappysys.com/blog/wp-content/uploads/2017/08/microsoft-office-365-api-integration-150x150.png 150w" sizes="(max-width: 100px) 100vw, 100px" /></a><span style="box-sizing: border-box; margin: 0px; padding: 0px;">In our previous article, we saw <a href="https://zappysys.com/blog/get-office-365-data-in-power-bi-using-microsoft-graph-api-and-odbc/" target="_blank" rel="noopener">how to get Office 365 data in Power BI</a>.</span> Now, let’s look at how to get Office 365 Mail Attachments using SSIS without any coding. <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/overview" target="_blank" rel="noopener">Microsoft Graph API</a> is a unified way to access many Microsoft services, including the <strong>Office 365 API</strong>. In this post, we will use the <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON</a><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><a target="_blank" rel="noopener">/REST API Source Connector</a> to retrieve the Outlook Messages list and its attachments</span>.</p>
<h2></h2>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <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>
</ol></div>
<h2>Use Case of Microsoft Graph API</h2>
<p>Here are some use cases for why you want to use the Microsoft Graph API</p>
<ul>
<li>Read/Write events from <strong>Outlook Calendar</strong></li>
<li>Send <strong>email</strong>  / Read <strong>emails</strong></li>
<li>Get the list of files from <strong>OneDrive</strong></li>
<li>Upload/ Download files to <strong>OneDrive</strong></li>
<li>Read/Write <strong>Excel Sheet</strong> (Use range or a specific range of a specific sheet)</li>
<li>Read <b>the SharePoint</b> Document library</li>
<li>Search content from <b>the SharePoint</b> document library</li>
<li>Get AD users for your Organization (AD Accounts)</li>
<li>Update OneNote</li>
<li>Track changes to Users, Events, Calendar Items using the <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/delta_query_overview" target="_blank" rel="noopener">delta API</a></li>
</ul>
<div class="content_block" id="custom_post_widget-5670"><h2 style="text-align: left;">Register Application (OAuth2 App for Graph API)</h2>
<p style="text-align: left;">The first step to access any Office 365 API / Graph API is to register an OAuth App in the Azure Portal. After
following these steps, you will get the following two items to use in the next section:</p>

<ul style="text-align: left;">
 	<li>Application Id</li>
 	<li>Application Secret</li>
</ul>
<p style="text-align: left;">In this section, you will learn how to register a custom app in Microsoft Azure portal that will allow access to the
OneDrive. So, let's get started -</p>

<ol>
 	<li style="text-align: left;">Log into <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps">Microsoft
Azure portal</a> to register a custom app.</li>
 	<li style="text-align: left;">Register a new application by clicking New Registration link.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png"><img loading="lazy" decoding="async" class="size-full wp-image-9034" src="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png" alt="New App Registration in Azure portal" width="748" height="221" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png 748w, https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration-300x89.png 300w" sizes="(max-width: 748px) 100vw, 748px" /></a></li>
 	<li style="text-align: left;">Provide the name of the custom app and who can access the app in the organization.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg"><img loading="lazy" decoding="async" class="wp-image-9005 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg" alt="Register an OneDrive App" width="610" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg 610w, https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1-300x255.jpg 300w" sizes="(max-width: 610px) 100vw, 610px" /></a></li>
 	<li style="text-align: left;">Go to the App overview and add a Redirect URL.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg"><img loading="lazy" decoding="async" class="wp-image-9044 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg" alt="Add a Redirect URL" width="937" height="122" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg 937w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-300x39.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-768x100.jpg 768w" sizes="(max-width: 937px) 100vw, 937px" /></a></li>
 	<li style="text-align: left;">Click on "Add a Platform" under Platform Configuration section and then select "Web" under Web applications
section to enter a Redirect URL.
<pre class="lang:default decode:true">https://zappysys.com/oauth</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9007" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg" alt="Redirect URL" width="466" height="564" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg 466w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2-248x300.jpg 248w" sizes="(max-width: 466px) 100vw, 466px" /></a></li>
 	<li style="text-align: left;">Create a Client Secret key which will be used to Authenticate the custom Azure app.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9010" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg" alt="Add a Client Secret" width="576" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg 576w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret-300x210.jpg 300w" sizes="(max-width: 576px) 100vw, 576px" /></a><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9011" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg" alt="Secret Key Expiration Period" width="208" height="259" /></a><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9012" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg" alt="Specify Secret Key" width="1024" height="176" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-300x52.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-768x132.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a>
<div><strong>Note</strong> - Take a note of <strong>Client Secret</strong>, it will be required while
configuring OAuth connection in the SSIS later</div></li>
 	<li style="text-align: left;">Add API Permissions.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9008" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions.jpg" alt="OneDrive API Permissions" width="1291" height="415" /></a></li>
 	<li style="text-align: left;">Select following permissions from the Delegated Permissions section.
<pre class="lang:default decode:true">User.ReadBasic.All
Files.Read
offline_access</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9009" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg" alt="Select Delegated Permissions" width="512" height="571" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg 512w, https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2-269x300.jpg 269w" sizes="(max-width: 512px) 100vw, 512px" /></a></li>
 	<li>Take a note of Client ID, it will be required while configuring OAuth connection in the SSIS later.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret4.jpg"><img loading="lazy" decoding="async" class="wp-image-9013 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret4.jpg" alt="App Client ID" width="810" height="274" /></a></li>
</ol></div>
<h2>Step-By-Step to call the Microsoft Graph Rest API Using SSIS</h2>
<p>Now, let&#8217;s look at examples to access your Outlook.com emails using SSIS. You can use the same techniques to call pretty much any Office 365 API.</p>
<h3>Configure SSIS OAuth Connection for Graph REST API</h3>
<p>The first step to access any Graph API is to configure an OAuth connection</p>
<ol>
<li>Open Visual Studio</li>
<li>Open an existing SSIS Project or create a new one using File &gt; New &gt; Project &gt; Choose “Integration Services Project” Type under Business Intelligence template category.</li>
<li>Create Package</li>
<li>Right-click inside the Connection Managers area and click <strong>New Connection…</strong></li>
<li>From the connection type list, select the <strong>ZS-OAUTH</strong> connection type.
<div id="attachment_11825" style="width: 959px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11825" class="size-full wp-image-11825" src="https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager.png" alt="" width="949" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager.png 949w, https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager-300x141.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager-768x362.png 768w" sizes="(max-width: 949px) 100vw, 949px" /></a><p id="caption-attachment-11825" class="wp-caption-text">Create a new SSIS OAuth API Connection Manager</p></div></li>
<li>On the OAuth Connection Manager, configure the following options
<ol style="list-style-type: lower-alpha;">
<li>Select &#8220;Custom&#8221; from the Provider dropdown</li>
<li>Select OAuth2 from the OAuth version</li>
<li>Enter your Application Id and Secret Key (i.e., App Password) obtained in the previous section <a href="https://apps.dev.microsoft.com/#/appList" target="_blank" rel="noopener">from here</a>.</li>
<li>Enter the following URL in the Authorization URL<br />
<pre class="crayon-plain-tag">https://login.microsoftonline.com/common/oauth2/v2.0/authorize</pre>
</li>
<li>Use the following URL in the token URL field<br />
<pre class="crayon-plain-tag">https://login.microsoftonline.com/common/oauth2/v2.0/token</pre>
</li>
<li>Enter the following <a href="https://developer.microsoft.com/en-us/graph/docs/authorization/permission_scopes" target="_blank" rel="noopener">Graph API Scopes</a> (each scope must be entered on a new line).<br />
<pre class="crayon-plain-tag">user.read
mail.read
offline_access</pre>
<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;">NOTE: Always include <strong>the offline_access</strong> scope, which returns a refresh_token, which allows you to renew the token without going through the login process again. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">For more information about which scopes are needed, always refer to the API help page (e.g., if you want to read mail using <a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_messages" target="_blank" rel="noopener">this API,</a> then you will see it says you can use <strong>Mail.Read</strong> or <strong>Mail.ReadWrite</strong> scope).</span></div></div></li>
<li>Go to the <strong>Advanced tab</strong> and enter the following URL in the Callback/Return URL (assuming the same URL used when you registered the App in the previous section)<br />
<pre class="crayon-plain-tag">https://zappysys.com/oauth</pre>
</li>
<li>Now go back to the first tab and click Generate Token. When prompted, log in using your Personal Microsoft Account or Work Account (Office 365 or AD login)</li>
<li>After logging in, you will see the Accept option. Just click it. If things go right, then you will see the Access Token and Refresh Token fields populated.</li>
</ol>
</li>
<li>Once everything is configured, you can click <strong>Test Connection</strong> to verify the connection works.
<div class="mceTemp"></div>
<div id="attachment_11832" style="width: 713px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-OAuth-Connection-Manager-for-Office-365-REST-API-Microsoft-Graph-API.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11832" class="size-full wp-image-11832" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-OAuth-Connection-Manager-for-Office-365-REST-API-Microsoft-Graph-API.png" alt="" width="703" height="754" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-OAuth-Connection-Manager-for-Office-365-REST-API-Microsoft-Graph-API.png 703w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-OAuth-Connection-Manager-for-Office-365-REST-API-Microsoft-Graph-API-280x300.png 280w" sizes="(max-width: 703px) 100vw, 703px" /></a><p id="caption-attachment-11832" class="wp-caption-text">SSIS OAuth Connection Manager for Office 365 REST API Microsoft Graph API</p></div></li>
</ol>
<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;">NOTE: Typically, RefreshToken is long-lived, but in some cases, they may expire soon too. If that’s the case, then you can configure the above OAuth connection to change the refresh token pattern. Simply enter the token file path and re-authenticate by clicking Generate Token. After that, each time you make an API call, it will save a new refresh token in the file.</div></div>
<h3>Download the Messages Attachment Files from Outlook</h3>
<p>Let’s start with an example. We use the SSIS JSON Source and Web API Destination components to make a call to the Microsoft Graph REST API.</p>
<ol>
<li>First of all, drag and drop the <strong>Data Flow Task</strong> from the SSIS Toolbox and double-click it to edit.
<div id="attachment_11784" style="width: 485px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-Data-flow.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11784" class="size-full wp-image-11784" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-Data-flow.png" alt="" width="475" height="178" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-Data-flow.png 475w, https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-Data-flow-300x112.png 300w" sizes="(max-width: 475px) 100vw, 475px" /></a><p id="caption-attachment-11784" class="wp-caption-text">Drag and drop Data flow</p></div></li>
<li>From the SSIS toolbox, drag and drop the<strong> JSON Source</strong> onto the Data Flow Designer surface.
<div class="mceTemp"></div>
<div id="attachment_11533" style="width: 553px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11533" class="size-full wp-image-11533" src="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png" alt="" width="543" height="146" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png 543w, https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag-300x81.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></a><p id="caption-attachment-11533" class="wp-caption-text">SSIS JSON Source &#8211; Drag and Drop</p></div></li>
<li>Double-click the <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/?"><strong>JSON Source</strong></a>, then enter the following URL to invoke the Messages API call with search options to retrieve emails with attachments.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/messages?$select=sentDateTime,from,subject,hasAttachments&amp;$search="hasAttachments:True"</pre>
Set the filter to <code>$.value[*]</code> and click the preview.</p>
<div id="attachment_11831" style="width: 837px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11831" class="size-full wp-image-11831" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example.png" alt="" width="827" height="887" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example.png 827w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example-280x300.png 280w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example-768x824.png 768w" sizes="(max-width: 827px) 100vw, 827px" /></a><p id="caption-attachment-11831" class="wp-caption-text">SSIS JSON Source – Get data from Microsoft Graph API (Office 365 API – Read Mail Example)</p></div>
<p>To customize the URL with additional parameters, check <a href="https://developer.microsoft.com/en-us/graph/docs/overview/query_parameters" target="_blank" rel="noopener">this help link</a>. It’s a standard OData Protocol, so you can leverage many common OData features (e.g., use $top parameters to set pageSize. Default is 10 for List Mail, but you can include more records per response by changing it, such as <strong>…/messages?$top=50</strong>).</li>
<li> Now, let&#8217;s use Template Transform to set the URL using the message ID to make the <a href="https://docs.microsoft.com/en-us/graph/api/attachment-get?view=graph-rest-1.0&amp;tabs=http" target="_blank" rel="noopener">Get attachment API</a> call.</p><pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/messages/&lt;%id%&gt;/attachments</pre><p>
<div id="attachment_11833" style="width: 848px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11833" class="size-full wp-image-11833" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id.png" alt="" width="838" height="560" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id.png 838w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id-768x513.png 768w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id-272x182.png 272w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11833" class="wp-caption-text">SSIS Template Transform sending attachment id</p></div>
<div class="mceTemp"></div>
</li>
<li>Now we need to use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/?_gl=1*1fgshu4*_up*MQ..*_gs*MQ..&amp;gclid=CjwKCAiAzZ_NBhAEEiwAMtqKy8lyVraD40LVoEOcaJPgdN6RaL8j21-KaDKKbrh3VFlYirORdiQ3MxoCtO8QAvD_BwE&amp;gbraid=0AAAAADhWWLJ5j927a8ePIZceRs447LN9W"><strong>Web API Destination</strong></a> to make the Get Attachment API call by message ID. Select the Input column for URL as that TemplateOutput.
<div id="attachment_11834" style="width: 733px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Web-API-Destination-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Get-Attachment-Example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11834" class="size-full wp-image-11834" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Web-API-Destination-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Get-Attachment-Example.png" alt="" width="723" height="775" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Web-API-Destination-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Get-Attachment-Example.png 723w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Web-API-Destination-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Get-Attachment-Example-280x300.png 280w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-11834" class="wp-caption-text">SSIS Web API Destination – Get data from Microsoft Graph API (Office 365 API – Get Attachment Example)</p></div></li>
<li>Now, the next step is to parse the JSON Response String of the get attachment api call. For that, we need to use a <strong><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=22259122063&amp;utm_content=&amp;utm_term=&amp;gad_source=1&amp;gad_campaignid=22582753584&amp;gbraid=0AAAAADhWWLJ5j927a8ePIZceRs447LN9W&amp;gclid=CjwKCAiAzZ_NBhAEEiwAMtqKy1ZTPt9tVn9Xy9xU7z27q__H4RRoMa_SfgZg5L8maavtcr5HfzCl0RoC6_sQAvD_BwE">JSON Parser</a></strong>. Select the input as Web PAI Destination ResponseText and use the below sample JSON string to configure the metadata(Columns).<br />
<pre class="crayon-plain-tag">{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users('support%40zappysys.com')/messages('AQMkADAwATMwMAItMDkyMC0zZTg4AC0wMAItMDAKAEYAAAP_JUy')/attachments"
,"value":[{"@odata.type":"#microsoft.graph.fileAttachment","@odata.mediaContentType":"text/plain"
,"id":"AQMkADAwATMwMAItMDkyMC0zZTg4AC0wMAItMDAKAEYAAAP_JUy_27M"
,"lastModifiedDateTime":"2020-02-21T07:36:16Z"
,"name":"Test.txt","contentType":"text/plain","size":870,"isInline":false
,"contentId":null,"contentLocation":null,"contentBytes":"VGVzdCBNZXNzYWdl"}]}</pre>
<div id="attachment_11828" style="width: 1043px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11828" class="size-full wp-image-11828" src="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example.png" alt="" width="1033" height="713" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example.png 1033w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example-300x207.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example-1024x707.png 1024w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example-768x530.png 768w" sizes="(max-width: 1033px) 100vw, 1033px" /></a><p id="caption-attachment-11828" class="wp-caption-text">JSON Parser Transform &#8211; using JSON example</p></div>
<div class="mceTemp"></div>
</li>
<li> Now, in the JSON Parser, go to the Go-to columns Tab and set the <strong>contentBytes</strong> DataType to <strong>DT_IMAGE,</strong> and increase the other columns&#8217; <strong>DT_WSTR</strong> lengths by 1000 and 1500. We set contentBytes to the <strong>DT_IMAGE</strong>  datatype, which is like varbinary(MAX).
<div id="attachment_11829" style="width: 838px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11829" class="size-full wp-image-11829" src="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype.png" alt="" width="828" height="611" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype.png 828w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype-300x221.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype-768x567.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11829" class="wp-caption-text">JSON Parser Transform Columns Tab fix the datatype</p></div></li>
<li>Furthermore, in the next step, we need to use an SSIS Derived Column to set the FilePath where we want to save the attachments, and then concatenate the local file path with the attachment name column.
<div id="attachment_11830" style="width: 798px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11830" class="size-full wp-image-11830" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1.png" alt="" width="788" height="624" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1.png 788w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1-768x608.png 768w" sizes="(max-width: 788px) 100vw, 788px" /></a><p id="caption-attachment-11830" class="wp-caption-text">SSIS Derived Column: Add New Column</p></div></li>
<li>Finally, we need to use the <a href="https://docs.microsoft.com/en-us/sql/integration-services/data-flow/transformations/export-column-transformation?view=sql-server-ver15" target="_blank" rel="noopener">Export Column</a> Transform (Native) to export attachment bytes to a local file. It needs to know 2 upstream info Bytes and the target file path.
<div id="attachment_11827" style="width: 763px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/Export-Column-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11827" class="size-full wp-image-11827" src="https://zappysys.com/blog/wp-content/uploads/2020/02/Export-Column-configuration.png" alt="" width="753" height="637" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/Export-Column-configuration.png 753w, https://zappysys.com/blog/wp-content/uploads/2020/02/Export-Column-configuration-300x254.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-11827" class="wp-caption-text">Export Column configuration</p></div></li>
<li>Make sure to attach the export column to some destination (e.g., our ZS Trash Destination); the engine might remove it. At the same time, it optimizes the runtime. It may remove all transformations that don&#8217;t have a destination, such as deploying the package to SQL Server, or when you set optimize in Visual Studio.</li>
<li>That&#8217;s it, execute the package, and it will download all the email attachments.
<div id="attachment_11826" style="width: 1050px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11826" class="size-full wp-image-11826" src="https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments.png" alt="" width="1040" height="559" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments.png 1040w, https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments-300x161.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments-1024x550.png 1024w, https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments-768x413.png 768w" sizes="(max-width: 1040px) 100vw, 1040px" /></a><p id="caption-attachment-11826" class="wp-caption-text">Downloaded Mail Attachments</p></div></li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>After all, in this article, we learned how to make a Microsoft Graph API REST API call. We used the <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS JSON / REST API Connector</a> to extract data from Outlook Mail using OAuth. Made the Get attachment API call using the <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> and parsed the JSON response using the <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser</a>. And using the Native SSIS Export Column, we saved the export attachment&#8217;s bytes to a local file. To explore many other scenarios not discussed in this article, download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li style="list-style-type: none;">
<ul>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/json-source.htm" target="_blank" rel="noopener">JSON Source(REST API or File)</a></li>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-web-api-destination.htm" target="_blank" rel="noopener">Web API Destination</a></li>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-json-parser-transform.htm" target="_blank" rel="noopener">JSON Parser Transform</a></li>
<li><a href="https://docs.microsoft.com/en-us/graph/overview" target="_blank" rel="noopener">Overview of the Microsoft Graph API</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/get-office-365-mail-attachments-using-ssis/">How to Get Office 365 Mail Attachments using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Make MailPlus OAuth 1.0a REST API Call in SSIS</title>
		<link>https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 21 Sep 2019 06:44:08 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[mailplus]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1.0]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8043</guid>

					<description><![CDATA[<p>Introduction In our previous article we see How to read call REST API data in SSIS. Now in this article, we will see How to Make MailPlus OAuth 1.0a REST API Call in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call MailPlus Oauth 1.0a REST API Call [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/">How to Make MailPlus OAuth 1.0a REST API Call in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-8044 size-thumbnail alignleft" title="PayPal" src="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus-150x150.png" alt="MailPlus" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus.png 300w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous article we see <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">How to read call REST API data in SSIS</a>. Now in this article, we will see <strong>How to Make MailPlus OAuth 1.0a REST API Call in SSIS</strong> and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call MailPlus Oauth 1.0a REST API Call can be useful for any developer regardless of which programming language or tool set you use. We will also see how to configure OAuth1.0 connection.</p>
<p>We will go through the steps to make temporary lists API call which Returns a list of all available temporary lists and we load it into MS SQL Server.</p>
<p>In nutshell, this post will focus on how to Make MailPlus OAuth 1.0a REST API Call in SSIS.</p>
<p>&nbsp;</p>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:</p>
<ol>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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 Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
<li>Credentials of MailPlus API.</li>
</ol>
<h2><span id="What_is_Walmart"><span id="What_is_WordPress">What is MailPlus?</span></span></h2>
<p><a href="https://spotler.com/mailplus-spotler" target="_blank" rel="noopener">MailPlus</a>, founded in 2004, is the number one ESP (Email Service Provider) in the Netherlands. MailPlus is an award winning solution that enables companies to send out their online communication, such as newsletters, easily and professionally.</p>
<h2>Where to get the MailPlus API Key and Secret?</h2>
<p>After activation of the MailPlus REST API in a MailPlus account you can get unique Key and Secret from there. The MailPlus REST API uses Oauth 1.0a (one leg, see Oauth 1.0a (One Leg) ). A consumer key and secret are required to access your MailPlus account. These can be created in your MailPlus account. The Key and Secret are always available via the startpage of a MailPlus account. Click on the tab “MailPlus Settings” and then “MailPlus Rest API”. In MailPlus eCom an authentication is already available.</p>
<h2>Call MailPlus Oauth 1.0a <span id="Step-By-Step_8211_CallSemantics3_REST_API_using_SSIS">REST API using SSIS</span></h2>
<p>Let’s start with an example. We use SSIS JSON Source component to make the call to MailPlus API, we will read list of all available temporary lists and load into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>From the SSIS toolbox drag and drop JSON Source on the data flow designer surface.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Double click JSON Source and enter the following URL as below to get list of all available temporary lists and create the OAuth 1.0 Connection.<br />
<pre class="crayon-plain-tag">https://restapi.mailplus.nl/integrationservice-1.1.0/templist</pre>
<div id="attachment_8047" style="width: 826px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8047" class="wp-image-8047 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png" alt="MailPlus Oauth 1.0a Connection" width="816" height="906" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png 816w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection-270x300.png 270w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection-768x853.png 768w" sizes="(max-width: 816px) 100vw, 816px" /></a><p id="caption-attachment-8047" class="wp-caption-text">MailPlus Oauth 1.0a Connection</p></div></li>
<li>Finally click on Preview button to load the data.
<div id="attachment_8048" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8048" class="wp-image-8048 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png" alt="MailPlus Preview Data" width="720" height="755" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png 720w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data-286x300.png 286w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8048" class="wp-caption-text">MailPlus Preview Data</p></div></li>
<li>You can find more MailPlus API Lists here on <a href="https://restdoc.mailplus.nl/doc/" target="_blank" rel="noopener">MailPlus Interactive API Documentation link.</a></li>
<li>That&#8217;s it we are ready to load all available temporary lists in SQL Server.</li>
</ol>
<h3><span id="Load_Walmart_API_data_into_SQL_Server">Load MailPlus REST API data into SQL Server</span></h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to extract information from REST API such as MailPlus REST API using OAuth1.0 Connection and load into SQL Server. We also learned techniques like How to create OAuth1.0 Connection. To explore many other scenarios not discussed in this article download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li style="list-style-type: none;">
<ul>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/json-source.htm" target="_blank" rel="noopener">JSON Source(REST API or File)</a></li>
<li><a href="https://restdoc.mailplus.nl/doc/" target="_blank" rel="noopener">MailPlus API</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/">How to Make MailPlus OAuth 1.0a REST API Call in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to refresh Power BI dataset with REST API using SSIS</title>
		<link>https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 22 May 2019 16:06:40 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Connection Manager]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS Tasks]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[refresh]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6963</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to refresh a Power BI dataset with Power BI REST API using SSIS and ZappySys SSIS PowerPack. Power BI is a Microsoft reporting product that can get data from virtually any source and display it nicely in a report or a dashboard. Each Power BI report contains a dataset, which can be refreshed [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/">How to refresh Power BI dataset with REST API using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignleft wp-image-3951" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png" alt="Power BI Integration" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310.png 310w" sizes="(max-width: 100px) 100vw, 100px" />In this article, you will learn how to refresh a <a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">Power BI</a> dataset with <a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">Power BI REST API</a> using SSIS and <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. Power BI is a Microsoft reporting product that can get data from virtually any source and display it nicely in a report or a dashboard. Each Power BI report contains a dataset, which can be refreshed to show relevant data in the report. Power BI also has a <em>Scheduled refresh</em> capability, in case you want to refresh a dataset periodically. However, you are limited to only 8 specific times per day you can refresh a dataset (as of May 23, 2019). In the Power BI Premium license you can do it 48 times per day. But what if you need to refresh it more frequently? Or if you desire to refresh it at a non-predefined time; which is not known in advance? E.g. after an ETL process has finished? Here Power BI REST API comes into rescue and lets you refresh a dataset on demand.</p>
<p>Here are a few use cases when you may want to refresh a dataset from a SSIS package, using Power BI REST API:</p>
<ul>
<li>The need to refresh a dataset more often than Power BI allows.</li>
<li>The requirement to refresh a dataset just after some process is finished; e.g. after an ETL process.</li>
<li>The ability to have absolute control <em>when</em> to refresh <em>multiple</em> datasets. Sometimes, refreshing multiple huge datasets at once could cause memory problems in the Power BI service. So, having an orchestrated refresh would solve this problem.</li>
</ul>
<p>We will use these ZappySys SSIS PowerPack connectors/connections in this article:</p>
<div class="content_block" id="custom_post_widget-6991"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/oauth-connection/ssis-oauth-connection-manager.png" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-6984"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a></div>
</div></div>
<p>Let&#8217;s begin!</p>
<h2>Prerequisites</h2>
<ol>
<li>You have a Power BI account and you have basic Power BI skills.</li>
<li>An uploaded Power BI report to Power BI service.</li>
<li>A <a href="https://azure.microsoft.com/" data-linktype="external">Microsoft Azure</a> subscription (there is a <a href="https://azure.microsoft.com/en-us/free/" target="_blank" rel="noopener">free</a> option with a 200 USD credit).</li>
<li><a href="https://azure.microsoft.com/en-us/services/active-directory/" target="_blank" rel="noopener">Azure Active Directory</a> set up.</li>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="SQL Server Data Tools">SSDT</abbr> or <abbr title="Business Intelligence Development Studio">BIDS</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>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
</ol>
<h2>Getting started</h2>
<p>Suppose you have a simple report and you want to refresh its dataset using Power BI REST API and SSIS. So far, the dataset has not been refreshed at all:</p>
<div id="attachment_7033" style="width: 573px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7033" class="wp-image-7033 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828.png" alt="Preparing to refresh Power BI dataset using SSIS and Power BI REST API." width="563" height="235" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828.png 563w, https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828-300x125.png 300w" sizes="(max-width: 563px) 100vw, 563px" /><p id="caption-attachment-7033" class="wp-caption-text">Preparing to refresh the Power BI dataset using SSIS and Power BI REST API.</p></div>
<p>To start, create an SSIS package and follow the steps below to accomplish the goal.</p>
<h2>Step By Step &#8211; How to refresh a Power BI dataset with REST API using SSIS</h2>
<h3>Create an OAuth application</h3>
<div class="content_block" id="custom_post_widget-7035"><h4>Create an Azure Active Directory OAuth application</h4>
<ol>
 	<li>Firstly, go to <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview" target="_blank" rel="noopener">Azure Active Directory, click App Registrations</a>, and then register a new application:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-10621" src="https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider.png" alt="" width="646" height="802" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider.png 646w, https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider-242x300.png 242w" sizes="(max-width: 646px) 100vw, 646px" />Select option <em>Web</em> and enter this URL into the <em>Redirect URI</em> field:
<code>https://login.microsoftonline.com/common/oauth2/nativeclient</code></li>
 	<li>Once created, copy/paste the <em>Application (client) ID</em> into a notepad, we will need it later:
<img loading="lazy" decoding="async" class="alignnone wp-image-7041 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287.png" alt="" width="691" height="164" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287.png 691w, https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287-300x71.png 300w" sizes="(max-width: 691px) 100vw, 691px" /></li>
 	<li>Next, go to <em>Certificates &amp; secrets</em> and create a new client secret. Copy a new client secret, we will need it later:
<img loading="lazy" decoding="async" class="alignnone wp-image-7038 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459.png" alt="" width="499" height="460" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459.png 499w, https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459-300x277.png 300w" sizes="(max-width: 499px) 100vw, 499px" /></li>
 	<li>Then go to <i>Overview </i>and hit <em>Endpoints. </em>Proceed by copying the <em>Authorization</em> and <em>Token</em> URLs and paste them into a notepad; we will use them later:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-10616" src="https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2.png" alt="" width="646" height="621" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2.png 646w, https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2-300x288.png 300w" sizes="(max-width: 646px) 100vw, 646px" /></li>
</ol></div>
<h3>Create OAuth Connection Manager in SSIS package</h3>
<ol>
<li>Drag and drop <em>REST API Task</em> from SSIS Toolbox, double click, select <strong>Url from connection,</strong> and then select <strong>&lt;New ZS-OAUTH Connection&gt;</strong> item:
<div id="attachment_7096" style="width: 604px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7096" class="wp-image-7096 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109.png" alt="Creating OAuth Connection Manager to connect to Power BI OAuth Application from SSIS." width="594" height="399" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109.png 594w, https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109-272x182.png 272w" sizes="(max-width: 594px) 100vw, 594px" /><p id="caption-attachment-7096" class="wp-caption-text">Creating OAuth Connection Manager to connect to Power BI OAuth Application from SSIS.</p></div></li>
<li>Input <strong>Client ID</strong> from <em>Step 2</em> when we were creating an Azure Active Directory OAuth Application.
<div class="mceTemp"></div>
<div id="attachment_10630" style="width: 652px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10630" class="wp-image-10630 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png" alt="" width="642" height="652" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png 642w, https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1-295x300.png 295w" sizes="(max-width: 642px) 100vw, 642px" /><p id="caption-attachment-10630" class="wp-caption-text">Configuring OAuth Connection Manager to authenticate to Power BI OAuth Application using SSIS.</p></div></li>
<li>Then proceed and input the <em>Client Secret</em> from <em style="font-style: italic;">Step 3, </em><em>Create an Azure Active Directory OAuth application</em> section.</li>
<li>Please go on, and fill in <em>Authorization Url </em>and <em>Access Token Url </em>properties with values we copied in <em>Step 4</em><em style="font-style: italic;">, </em><em>Create an Azure Active Directory OAuth application</em> section.</li>
<li>In <em>Scopes / Permissions</em> field input these scopes:<br />
<code>https://analysis.windows.net/powerbi/api/Dataset.ReadWrite.All<br />
offline_access</code></li>
<li>Then go to the <em>Advanced</em> tab and in the <em>Callback/Return Url</em> field input this value:<br />
<code>https://login.microsoftonline.com/common/oauth2/nativeclient</code></p>
<div id="attachment_10631" style="width: 652px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10631" class="wp-image-10631 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png" alt="" width="642" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png 642w, https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1-300x179.png 300w" sizes="(max-width: 642px) 100vw, 642px" /><p id="caption-attachment-10631" class="wp-caption-text">Setting Callback/Return Url (Redirect URI) in OAuth Connection Manager to authenticate to Power BI OAuth Application using SSIS.</p></div></li>
<li>Then go back to the tab <em>General </em>and click the <em>Generate Token</em> button.</li>
<li>Once asked for credentials, log in with your organization user; this will generate <em>Refresh</em> and <em>Access</em> tokens.</li>
</ol>
<h3>Retrieve the ID of the Power BI dataset you want to refresh</h3>
<ol>
<li>Go to <a href="https://app.powerbi.com/groups/me/settings/datasets" target="_blank" rel="noopener">Power BI datasets</a>.</li>
<li>Then click on <strong>Datasets</strong>.</li>
<li>Proceed and click the dataset you want to refresh.</li>
<li>Finally, copy the ID of the dataset from the URL, we will use it in the next section.</li>
</ol>
<div id="attachment_7114" style="width: 723px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7114" class="wp-image-7114 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796.png" alt="Getting Power BI dataset ID to refresh it in an HTTP request to Power BI REST API." width="713" height="396" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796.png 713w, https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796-300x167.png 300w" sizes="(max-width: 713px) 100vw, 713px" /><p id="caption-attachment-7114" class="wp-caption-text">Getting Power BI dataset ID to refresh it in an HTTP request to Power BI REST API.</p></div>
<h3>Configure REST API Task to refresh a Power BI dataset</h3>
<p>We configured OAuth Connection Manager and retrieved the ID of the dataset we want to refresh, now it&#8217;s time to configure REST API Task and refresh the dataset. So do the following:</p>
<ol>
<li>Go to the <strong>SSIS package</strong> and open the <strong>REST API Task</strong> for configuration.</li>
<li>Input <em>URL</em> in such a format:<br />
<code><strong>https://api.powerbi.com/v1.0/myorg/datasets/DATASET-ID/refreshes</strong></code> Replace <em>DATASET-ID</em> with an actual ID of the dataset. E.g.:<br />
<code>https://api.powerbi.com/v1.0/myorg/datasets/a38c78fc-8c87-45e3-b961-6dcd3ac1eada/refreshes</code> <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;"><strong>NOTE</strong>: If your dataset resides in a Workspace, use this format instead:<br />
<code><strong>https://api.powerbi.com/v1.0/WORKSPACE-ID/datasets/DATASET-ID/refreshes</strong></code></div></div></li>
<li>Then set <strong>POST</strong> as <em>HTTP Request Method.</em></li>
<li>In the <em>Body</em> field, input this JSON:<br />
<code><strong>{ "notifyOption": "MailOnFailure" }</strong></code></li>
<li>Press the <em>Test Request/Response</em> button to test the request and refresh the dataset at the same time.</li>
</ol>
<div id="attachment_7117" style="width: 671px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7117" class="wp-image-7117 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis.png" alt="Configuring REST API Task to refresh Power BI dataset using Power BI REST API and SSIS." width="661" height="610" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis.png 661w, https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis-300x277.png 300w" sizes="(max-width: 661px) 100vw, 661px" /><p id="caption-attachment-7117" class="wp-caption-text">Configuring a REST API Task to refresh a Power BI dataset using Power BI REST API and SSIS.</p></div>
<h3>Run the package</h3>
<p>Hit <strong>F5</strong> and execute the package:</p>
<div id="attachment_7123" style="width: 297px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7123" class="wp-image-7123 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/160-run-SSIS-package-to-refresh-power-bi-dataset-rest-api.png" alt="Executing SSIS package and refreshing Power BI dataset." width="287" height="147" /><p id="caption-attachment-7123" class="wp-caption-text">Executing SSIS package and refreshing Power BI dataset.</p></div>
<h2>The Results</h2>
<p>Now it&#8217;s time to check the results and see if the dataset was refreshed successfully:</p>
<ol style="margin-left: 0;">
<li>Again, go to <a href="https://app.powerbi.com/groups/me/settings/datasets" target="_blank" rel="noopener">Power BI datasets</a>.</li>
<li>Then click on <strong>Datasets</strong>.</li>
<li>Click the dataset you refreshed.</li>
<li>Then click &#8220;Refresh history&#8221; to check the refresh history. We expect two manual refreshes to be there.</li>
</ol>
<div id="attachment_7124" style="width: 667px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7124" class="wp-image-7124 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api.png" alt="Results: Successful Power BI dataset refresh using Power BI REST API and SSIS." width="657" height="234" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api.png 657w, https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api-300x107.png 300w" sizes="(max-width: 657px) 100vw, 657px" /><p id="caption-attachment-7124" class="wp-caption-text">Results: Successful Power BI dataset refresh using Power BI REST API and SSIS.</p></div>
<div class="content_block" id="custom_post_widget-6976"><h2>Debugging HTTP requests</h2>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>

</div></div>
<h2><span id="Deployment_to_Production">Deployment to Production</span></h2>
<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. So 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> or 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’t face authentication related errors when a package is deployed to a production server.</p>
<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>
<h2>Conclusion</h2>
<p style="text-align: justify;">You learned how to refresh a Power BI dataset with REST API using SSIS. To accomplish the goal, firstly, we created the Azure Active Directory application and configured OAuth Connection Manager based on it. Then we retrieved the Power BI dataset ID and used it in the ZappySys SSIS PowerPack connector REST API Task. Finally, using the same REST API Task we made the HTTP request to Power BI REST API &#8220;<em>refreshes&#8221;</em> method and successfully refreshed the dataset. If you need to make a call to another <a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">Power BI REST API</a> method, then just configure the REST API Task according to the documentation (for getting data use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> instead). Finally, if you make many requests to the Power BI REST API service, make sure you check its <a href="https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations" target="_blank" rel="noopener">limitations</a>.</p>
<h2>References</h2>
<p><a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">https://powerbi.microsoft.com/en-us/</a></p>
<p><a href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdataset" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdataset</a></p>
<p><a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/rest/api/power-bi/</a></p>
<p><a href="https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations</a></p>
<p>The post <a href="https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/">How to refresh Power BI dataset with REST API using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read YouTube API data in SSIS (Videos, Channels, Playlists)</title>
		<link>https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 06 May 2019 18:06:07 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS CSV Generator Transform]]></category>
		<category><![CDATA[SSIS JSON Parser Transform]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[youtube]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6894</guid>

					<description><![CDATA[<p>Introduction In last few articles we saw how to read data from various Google Services. In this article we will see how to read YouTube API data in SSIS. This blog mainly focus on SSIS approach but steps mentioned to call Google APIs can be useful for any developer regardless which programming language or toolset [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/">How to read YouTube API data in SSIS (Videos, Channels, Playlists)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<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;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/youtube-connector/">API Connector for YouTube</a> which makes it much simpler to <strong>Read/Write YouTube Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png"><img loading="lazy" decoding="async" class=" wp-image-6904 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png" alt="" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png 400w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo-300x300.png 300w" sizes="(max-width: 100px) 100vw, 100px" /></a>In last <a href="https://zappysys.com/blog/category/google-api/">few articles</a> we saw how to read data from various Google Services. In this article we will see how to read YouTube API data in SSIS. This blog mainly focus on SSIS approach but steps mentioned to call Google APIs can be useful for any developer regardless which programming language or toolset you use.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <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>
</ol></div>
<h2>Connect to YouTube API in SSIS (OAuth Connection)</h2>
<p>Very first step to call any Google API is to create an API project for Google Service and then enable APIs you like to call in Console. In our case we need to enable YouTube API.</p>
<p><a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">Check this article</a> to learn how to create API Project and obtain Client ID and Client Secret to connect to YouTube API. For ease of use use Default Application provided by ZappySys but we still recommend using your own Custom Application  on OAuth Connection.</p>
<p>Before we try our first YouTube API example, we recommend you to get familiar with <a href="https://developers.google.com/youtube/v3/docs/" target="_blank" rel="noopener">YouTube API here</a>. Once you done with above steps you can perform the following steps to call YouTube API in SSIS.</p>
<ol>
<li>Open existing SSIS Project or Create new One in Visual Studio (i.e. SSDT)</li>
<li>Create a new SSIS Package. Right click in the Connection Manager Panel and click <strong>&#8220;New Connection&#8230;&#8221;</strong>.<br />
<img decoding="async" class="figureimage" title="SSIS Create New Connection" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-new-connection.png" alt="SSIS Create New Connection" /></li>
<li>When Dialog box opens select <strong>ZS-OAUTH</strong> connection type.
<div id="attachment_4724" style="width: 681px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4724" class="size-full wp-image-4724" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png" alt="SSIS Connection Maangers List: Select O-AUTH Connection Manager" width="671" height="549" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png 671w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager-300x245.png 300w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-4724" class="wp-caption-text">SSIS Connection Managers List: Select O-AUTH Connection Manager</p></div></li>
<li>Once OAuth UI opens, Configure Google connection like below.
<ol>
<li>Select Service Type as <strong>Google</strong></li>
<li>You can select Default App for ease of use or Select Custom Application (Enter Client Id and Secret Obtained using <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">these steps</a> )</li>
<li>In the Scope Enter below &#8211; One scope per line for calling correct YouTube API. Refer to <a href="https://developers.google.com/youtube/v3/docs/" target="_blank" rel="noopener">YouTube API documentation</a> incase you need extra permissions. For read only operation we just need below scopes. Last scope is only needed if you need to use <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">YouTube Analytics Reports</a><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/youtube
https://www.googleapis.com/auth/youtube.readonly
https://www.googleapis.com/auth/yt-analytics.readonly</pre>
</li>
</ol>
</li>
<li>Click Generate Token to obtain Refresh Token (You may see Login Prompt, and then Grant Permission Confirmation Screen)
<div id="attachment_6855" style="width: 930px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6855" class="size-full wp-image-6855" src="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png" alt="Connect to Google API using OAuth 2.0 (Youtube API Example)" width="920" height="1032" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png 920w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-267x300.png 267w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-768x861.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-913x1024.png 913w" sizes="(max-width: 920px) 100vw, 920px" /></a><p id="caption-attachment-6855" class="wp-caption-text">Connect to Google API using OAuth 2.0 (YouTube API Example)</p></div></li>
<li>Click OK to save UI.</li>
</ol>
<h2>Call YouTube REST API Example</h2>
<p>Now lets look at how to call YouTube API <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> this task is more suitable to call GET, POST, DELETE, PUT requests without parsing data in Rows and Columns. If you need to parse data and load into Database table then see next section (Use JSON Source)</p>
<ol>
<li>From SSIS Toolbox look for items starting with “ZS”. Drag and Drop <b>[ZS Rest API Task]</b> to Designer Surface.<br />
<img decoding="async" class="figureimage" title="SSIS REST Api Web Service Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="SSIS REST Api Task - Drag and Drop" /></li>
<li>Double click it to configure like below.
<ol>
<li>Select URL From Connection option</li>
<li>Select OAuth connection created in previous section.</li>
<li>Enter URL like below (For example <a href="https://developers.google.com/youtube/v3/docs/playlists/list" target="_blank" rel="noopener">get all playlists</a>). Replace xxxxxxxxxxx with your own channel ID (Its usually found in URL when you visit Youtube Channel Homepage)<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;channelId=xxxxxxxxxxxxx</pre>
</li>
<li>Click Test Request Button</li>
</ol>
</li>
<li>Here is how it looks like
<div id="attachment_6896" style="width: 854px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6896" class="size-full wp-image-6896" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png" alt="Call Youtube API in SSIS Example (Dynamic URL)" width="844" height="640" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png 844w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url-300x227.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url-768x582.png 768w" sizes="(max-width: 844px) 100vw, 844px" /></a><p id="caption-attachment-6896" class="wp-caption-text">Call Youtube API in SSIS Example (Dynamic URL)</p></div></li>
</ol>
<p>That&#8217;s it we have successfully configured Connection for YouTube API in SSIS. In the next section we will see how to use this connection and read various data from YouTube API.</p>
<h2>Read YouTube Playlists in SSIS</h2>
<p>Once we done creating OAuth Connection Manager we can move forward to read YouTube data inside Data Flow.</p>
<p>Configure SSIS JSON / REST API Source</p>
<ol>
<li>Now, Drag and Drop SSIS <b>Data Flow Task</b> from SSIS Toolbox.<br />
<img decoding="async" class="figureimage" title="SSIS Data Flow Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" /></li>
<li>Double click on the Data Flow task to see Data Flow designer surface.</li>
<li>From the SSIS toolbox drag and drop JSON Source on the dataflow designer surface.<br />
<img decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" /></li>
<li>Double click JSON Source and enter URL as below (Use variable or Hardcode Channel Id). maxResults controls how many rows you want to get in each response. Rep<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;maxResults=50&amp;channelId={{User::varChannelId}}
--OR-- 
https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;maxResults=50&amp;channelId=xxxxxxxxxxxxxxxxxxxxxx</pre>
</li>
<li>Check Use Credentials and select existing OAuth connection or Create New one</li>
<li>Select Array Filter (Items node) or type <pre class="crayon-plain-tag">$.items[*]</pre>  as below.
<div id="attachment_6900" style="width: 857px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6900" class="size-full wp-image-6900" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png" alt="Get Playlists for YouTube Channel" width="847" height="738" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png 847w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists-768x669.png 768w" sizes="(max-width: 847px) 100vw, 847px" /></a><p id="caption-attachment-6900" class="wp-caption-text">Get Playlists for YouTube Channel</p></div></li>
<li>That&#8217;s it you can now Click <strong>Preview</strong> to see sample data. In the next section we will configure Pagination to read all records if you have more than 100 rows.</li>
</ol>
<h3>Configure YouTube REST API Pagination</h3>
<p>Most REST APIs dont return data in one big response. So you have to make sure you implement looping / pagination to read more records. Luckily ZappySys supports <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/">many different Pagination Settings</a>. Here is how to configure YouTube REST API Pagination.</p>
<ol>
<li>Go to Pagination Tab found on JSON Source and select following 3 settings</li>
<li>Select Pagination Mode as <pre class="crayon-plain-tag">Response Attribute Mode</pre></li>
<li>Enter Next Link as <pre class="crayon-plain-tag">$.nextPageToken</pre></li>
<li>Enter Suffix for Next URL as <pre class="crayon-plain-tag">&amp;pageToken=&lt;%nextlink%&gt;</pre></li>
</ol>
<div id="attachment_6899" style="width: 555px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6899" class="size-full wp-image-6899" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png" alt="YouTube REST API Pagination Settings" width="545" height="246" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png 545w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination-300x135.png 300w" sizes="(max-width: 545px) 100vw, 545px" /></a><p id="caption-attachment-6899" class="wp-caption-text">YouTube REST API Pagination Settings</p></div>
<h2>Read YouTube Playlist Videos in SSIS</h2>
<p>So in previous section we saw simple API call to read all playlists from YouTube. Now lets see how to get information about <a href="https://developers.google.com/youtube/v3/docs/playlistItems/list" target="_blank" rel="noopener">Playlist Videos</a>.</p>
<p>For that everything should remain same as previous section except change URL as below. Where xxxxxxxxxxxxxxxxxxxxx is your Playlist ID obtained from Previous Call.</p><pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,id&amp;maxResults=50&amp;playlistId=xxxxxxxxxxxxxxxxxxxxx</pre><p>
<h2>Get all Videos for YouTube Channel</h2>
<p>If you want to get all video name and ID for specific channel then use below URL. Click here to <a href="https://developers.google.com/youtube/v3/docs/search/list" target="_blank" rel="noopener">read more</a>. Replace xxxxxxxxxxxxxxxxxxx with your Channel ID.</p><pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/search?channelId=xxxxxxxxxxxxxxxxxxx&amp;part=snippet,id&amp;order=date&amp;maxResults=50</pre><p>
&nbsp;</p>
<h2>Read YouTube Video Views, Likes, Dislikes (Extended Videos)</h2>
<p>Another common request from YouTube API is get Video Information such as Views, Likes, Dislikes, Comment Count etc. For that you can <a href="https://developers.google.com/youtube/v3/docs/videos/list" target="_blank" rel="noopener">use this api</a> . However the issue is this endpoint requires you to pass Comma separated Ids of Video. You can only pass 25 Ids in one requests so if you have 200 videos for which you need to get information then you have to make 8 requests (25 Ids in each Request). In below screenshot you can see we used <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler to debug web requests</a>.</p>
<p>So here is how high level process to fetch extended information for all Videos in your channel. Full <a href="https://zappysys.com/blog/wp-content/uploads/2019/05/Google_Youtube_API_Demo.zip">SSIS Package is attached here (SSIS 2012 Format)</a>.</p>
<ol>
<li>Get all videos for your channel by calling (Assuming you will paginate in below request.<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/search?channelId=xxxxxxxxxxxxxxxxxxx&amp;part=snippet,id&amp;order=date&amp;maxResults=50</pre>
</li>
<li>Build Video Id groups for 25 Ids from above result and submit requests. For example if above request returns 200 Videos then your request to fetch extended information may look like below.<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID1,ID2,ID3........ID25
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID26,ID27,ID28........ID50
........
........
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID176,ID177,ID178........ID200</pre>
</li>
<li>Parse response coming from each Request Above&#8230;. Each Response will give you details about 25 videos you requesting.</li>
</ol>
<p>Here is the flow of our complete data flow to read extended information for all videos. You can read extended information one by one too but it wont be good idea if you have many videos.</p>
<p>We have used Following Components to achieve Bulk Mode</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source (REST API Source)</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-parser-transform/" target="_blank" rel="noopener">CSV Parser Transform</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a></li>
</ul>
<div id="attachment_6901" style="width: 1306px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6901" class="size-full wp-image-6901" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png" alt="Get YouTube Video View Clicks, Likes, Dislikes (Bulk Mode for all videos)" width="1296" height="823" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png 1296w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-768x488.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-1024x650.png 1024w" sizes="(max-width: 1296px) 100vw, 1296px" /></a><p id="caption-attachment-6901" class="wp-caption-text">Get YouTube Video View Clicks, Likes, Dislikes (Bulk Mode for all videos)</p></div>
<h2>Read data from YouTube Analytics / Reporting API (Metrics, Dimensions Report)</h2>
<p>So far we have seen basic YouTube APIs to extract your Channel information. However there is another very powerful API endpoint to query custom reports from YouTube. Check <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">this YouTube Analytics API endpoint</a>. In this section we will learn how to extract useful information from YouTube using Analytics API.</p>
<h3>Step-By-Step</h3>
<p>Let&#8217;s look at an example to read total views, estimated watch time, average view duration and some other metrics by date for channel you have access.</p>
<ol>
<li>Go to Data Flow, Drag ZS JSON Source from SSIS Toolbox</li>
<li>Double click to configure.</li>
<li>Check Use Credentials. Select OAuth connection we created in previous section.</li>
<li>In the URL field, Enter Below Sample URL. Change Parameters as per your need or leave it default.<br />
For example:<br />
<strong>ids=channel==MINE</strong>   (where MINE can be replaced by other channel id or keep it as MINE to get data for your own channel)<br />
<strong>metrics</strong> (can be changed from any <a href="https://developers.google.com/youtube/analytics/metrics" target="_blank" rel="noopener">valid list here</a>)<br />
<strong>dimensions</strong> (can be changed to any valid <a href="https://developers.google.com/youtube/analytics/dimensions" target="_blank" rel="noopener">list from here</a>)<br />
<strong>startDate</strong> (Must be YYYY-MM-DD format)<br />
<strong>endDate</strong> (Must be YYYY-MM-DD format)<br />
<pre class="crayon-plain-tag">https://youtubeanalytics.googleapis.com/v2/reports?ids=channel==MINE&amp;metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained&amp;dimensions=day&amp;startDate=2019-03-01&amp;endDate=2019-04-01</pre>
</li>
<li>Change Filter to <pre class="crayon-plain-tag">$.rows[*]</pre></li>
<li>Go to <strong>2D Array Transform</strong> tab.<br />
Select Method as <pre class="crayon-plain-tag">Simple 2-dimensional array</pre>
EnterColumn Filter as  <pre class="crayon-plain-tag">$.columnHeaders[*].name</pre>
<div id="attachment_6909" style="width: 906px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6909" class="size-full wp-image-6909" src="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png" alt="YouTube Analytics API Advanced Transformation" width="896" height="270" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png 896w, https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api-768x231.png 768w" sizes="(max-width: 896px) 100vw, 896px" /></a><p id="caption-attachment-6909" class="wp-caption-text">YouTube Analytics API Advanced Transformation</p></div></li>
<li>That&#8217;s it now Preview your data. See below over all steps.
<div id="attachment_6910" style="width: 978px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6910" class="size-full wp-image-6910" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png" alt="Read data from YouTube Analytics API (Custom Reports using Dimensions, Metrics Query)" width="968" height="741" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png 968w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics-300x230.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics-768x588.png 768w" sizes="(max-width: 968px) 100vw, 968px" /></a><p id="caption-attachment-6910" class="wp-caption-text">Read data from YouTube Analytics API (Custom Reports using Dimensions, Metrics Query)</p></div></li>
</ol>
<h3>Build YouTube Analytics / Reporting API Query (API Playground)</h3>
<p>With Analytics API You can extract many interesting data. You can use Test Tool found <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">on this page to build</a> some interesting queries. Scroll to <strong>Common Use Cases</strong> section on that link. On the right side you can select Credentials Type as OAuth and click Execute.</p>
<p><a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">https://developers.google.com/youtube/analytics/reference/reports/query</a></p>
<div id="attachment_6911" style="width: 944px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6911" class="size-full wp-image-6911" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg" alt="YouTube Analytics / Reporting API Explorer (Testing API Calls)" width="934" height="688" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg 934w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder-300x221.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder-768x566.jpg 768w" sizes="(max-width: 934px) 100vw, 934px" /></a><p id="caption-attachment-6911" class="wp-caption-text">YouTube Analytics / Reporting API Explorer (Testing API Calls)</p></div>
<h2>Loading YouTube API Data into SQL Server</h2>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2>Download Sample SSIS Package</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/Google_Youtube_API_Demo.zip">SSIS Package is attached here (SSIS 2012 Format)</a>.</p>
<h2>Conclusion</h2>
<p>In this article we saw how to extract information from REST API such as YouTube REST API using OAuth 2.0. We also learned techniques like Pagination, JSON Parsing, Request Batching using multiple components to achieve full scale API integration. To explore many other scenarios not discussed in this article download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<p>The post <a href="https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/">How to read YouTube API data in SSIS (Videos, Channels, Playlists)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Load data from Exact Online into SQL Server using SSIS</title>
		<link>https://zappysys.com/blog/load-data-exact-online-sql-server-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 05 Feb 2019 13:08:51 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[exact]]></category>
		<category><![CDATA[exactonline]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6287</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to load data from Exact Online into SQL Server using SSIS. Exact Online is a popular CRM, ERP and HRM tool which also lets you manage your finances. As an example, we will use Exact Online contacts as data to load it into a SQL Server database. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/load-data-exact-online-sql-server-ssis/">Load data from Exact Online into SQL Server using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-logo-1.png"><img loading="lazy" decoding="async" class=" wp-image-6441 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-logo-1.png" alt="" width="136" height="136" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-logo-1.png 200w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-logo-1-150x150.png 150w" sizes="(max-width: 136px) 100vw, 136px" /></a>In this article, you will learn how to load data from <a href="https://www.exact.com/us/" target="_blank" rel="noopener">Exact Online</a> into SQL Server using SSIS. Exact Online is a popular CRM, ERP and HRM tool which also lets you manage your finances. As an example, we will use Exact Online contacts as data to load it into a SQL Server database. We will use <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> connector to get contacts from Exact Online and then use standard SSIS connector OLE DB Destination to load data into a table. This SSIS PowerPack connector will be used to get the data:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-6423"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/images/SSIS-PowerPack/SSIS-Json-Source-Adapter.png" alt="JSON Parser Transform" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <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>
</ol></div>
<h2>Step-by-step &#8211; Load data from Exact Online into SQL Server using SSIS</h2>
<h3>Getting started</h3>
<p>We will get these contacts and load them into a SQL Server database:</p>
<div id="attachment_6290" style="width: 418px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6290" class="wp-image-6290 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-contacts-into-sql-server-using-ssis.png" alt="" width="408" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-contacts-into-sql-server-using-ssis.png 408w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-contacts-into-sql-server-using-ssis-300x114.png 300w" sizes="(max-width: 408px) 100vw, 408px" /><p id="caption-attachment-6290" class="wp-caption-text">Loading Exact Online contacts into SQL Server</p></div>
<p>The first thing you will need to do is to create an OAuth application in Exact App Center and then we will proceed in getting the data and loading it into a SQL Server database.</p>
<h3>Create OAuth application in Exact App Center</h3>
<ol>
<li>Visit <a href="https://apps.exactonline.com/nl/en-US" target="_blank" rel="noopener">Exact App Center</a> and login:
<div id="attachment_6293" style="width: 716px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6293" class="wp-image-6293 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-login-to-create-oauth-application-and-load-data-in-ssis.png" alt="" width="706" height="224" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-login-to-create-oauth-application-and-load-data-in-ssis.png 706w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-login-to-create-oauth-application-and-load-data-in-ssis-300x95.png 300w" sizes="(max-width: 706px) 100vw, 706px" /><p id="caption-attachment-6293" class="wp-caption-text">Exact App Center login window</p></div></li>
<li>Once logged in, click on <a href="https://apps.exactonline.com/nl/en-US/Manage" target="_blank" rel="noopener">Manage my apps</a> link:
<div id="attachment_6294" style="width: 716px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6294" class="wp-image-6294 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-manage-oauth-applications-and-load-data-in-ssis.png" alt="" width="706" height="225" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-manage-oauth-applications-and-load-data-in-ssis.png 706w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-manage-oauth-applications-and-load-data-in-ssis-300x96.png 300w" sizes="(max-width: 706px) 100vw, 706px" /><p id="caption-attachment-6294" class="wp-caption-text">Exact App Center login area</p></div></li>
<li>Create a new OAuth application:
<div id="attachment_6295" style="width: 653px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6295" class="wp-image-6295 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-create-oauth-application-and-load-data-in-ssis.png" alt="" width="643" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-create-oauth-application-and-load-data-in-ssis.png 643w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-create-oauth-application-and-load-data-in-ssis-300x281.png 300w" sizes="(max-width: 643px) 100vw, 643px" /><p id="caption-attachment-6295" class="wp-caption-text">Exact Online API applications management page</p></div></li>
<li>Give it a name.</li>
<li>In <em>Redirect URI </em>field enter: <strong>https://www.zappysyscom/oauth2<br />
</strong></p>
<div id="attachment_6292" style="width: 329px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6292" class="wp-image-6292 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-registering-marketplace-rest-api-application-1.png" alt="" width="319" height="500" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-registering-marketplace-rest-api-application-1.png 319w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-registering-marketplace-rest-api-application-1-191x300.png 191w" sizes="(max-width: 319px) 100vw, 319px" /><p id="caption-attachment-6292" class="wp-caption-text">Registering Exact Online API application to load data into SQL Server</p></div></li>
<li>Hit <strong>Register</strong>.</li>
<li>Don&#8217;t close the browser, we will use App information later.</li>
</ol>
<h3>Create OAuth Connection Manager to connect to Exact Online</h3>
<ol>
<li>Create a new SSIS package.</li>
<li>Create a new OAuth Connection Manager, by right-clicking on the Connection Managers pane:
<div id="attachment_6354" style="width: 430px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6354" class="wp-image-6354 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-1.png" alt="" width="420" height="355" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-1.png 420w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-1-300x254.png 300w" sizes="(max-width: 420px) 100vw, 420px" /><p id="caption-attachment-6354" class="wp-caption-text">Creating OAuth Connection Manager to connect to Exact Online API application</p></div></li>
<li>Select <strong>ZS-OAUTH</strong> to create one:
<div id="attachment_6355" style="width: 532px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6355" class="wp-image-6355 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-2.png" alt="" width="522" height="507" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-2.png 522w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-2-300x291.png 300w" sizes="(max-width: 522px) 100vw, 522px" /><p id="caption-attachment-6355" class="wp-caption-text">Selecting ZS-OAUTH option to create OAuth Connection Manager</p></div></li>
<li>Then open your Exact App Center API application configuration we left open in the previous step. We will use that data from that window.</li>
<li>Select <strong>Custom</strong> as <em>OAuth Provider.</em></li>
<li>Select <strong>Authorization Code Grant</strong> as <em>OAuth Grant Type</em>.</li>
<li>Copy <strong>Client ID</strong> and paste it into <em>Client Id</em> field.</li>
<li>Copy <strong>Client secret</strong> and paste it into <em>Client Secret</em> field.</li>
<li>Set <em>Authorization Url</em> to <strong>https://start.exactonline.nl/api/oauth2/auth</strong>.</li>
<li>Set <em>Access Token Url</em> to <strong>https://start.exactonline.nl/api/oauth2/token</strong>.<strong><br />
</strong></p>
<div id="attachment_6353" style="width: 708px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6353" class="wp-image-6353 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-oauth-configuration-in-ssis.png" alt="" width="698" height="845" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-oauth-configuration-in-ssis.png 698w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-oauth-configuration-in-ssis-248x300.png 248w" sizes="(max-width: 698px) 100vw, 698px" /><p id="caption-attachment-6353" class="wp-caption-text">Configuring OAuth Connection Manager to access Exact Online data via API</p></div></li>
<li>Then open <em>Advanced</em> tab and copy paste <strong>Redirect URI</strong> to <em>Callback/Return Url</em> field:
<div id="attachment_6356" style="width: 602px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6356" class="wp-image-6356 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-callback-url-configuration-in-ssis-1.png" alt="" width="592" height="515" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-callback-url-configuration-in-ssis-1.png 592w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-callback-url-configuration-in-ssis-1-300x261.png 300w" sizes="(max-width: 592px) 100vw, 592px" /><p id="caption-attachment-6356" class="wp-caption-text">Configuring OAuth application Callback/Return URL</p></div></li>
<li>Then click on <em>OAuth2 Grant Options</em> tab and check option below.</li>
<li>Finally, since Exact Online refresh token keeps changing, enter a filename where to store the refresh token:
<div id="attachment_6358" style="width: 673px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6358" class="wp-image-6358 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-3-1.png" alt="" width="663" height="481" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-3-1.png 663w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-3-1-300x218.png 300w" sizes="(max-width: 663px) 100vw, 663px" /><p id="caption-attachment-6358" class="wp-caption-text">Configuring OAuth2 Grant specifics</p></div>
<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;"><strong>NOTE</strong>: Can be a non-existent file or <span style="text-decoration: underline;">must be an empty</span>, existing file.</div></div></li>
</ol>
<h3>Getting data from Exact Online</h3>
<ol>
<li>Drag and drop <em>Data Flow</em> and then <em>JSON Source</em> into it:
<div id="attachment_8028" style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8028" class="size-full wp-image-8028" src="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /><p id="caption-attachment-8028" class="wp-caption-text">Dragging and dropping Data Flow Task into Control Flow</p></div></li>
<li>Double click on <em>JSON Source</em> to modify it.</li>
<li>Check <strong>Use Credentials</strong> checkbox and select <strong>OAuth 1</strong> as your <em>Connection Manager</em>.</li>
<li>Add <em>HTTP Header</em> named <strong>Accept</strong> and set the value to <strong>application/json</strong>.</li>
<li>In <em>Array Filter</em> field enter <strong>$.d.results[*]</strong>.</li>
<li>In Enter<em> Path or Web URL</em> field enter this URL:<br />
<strong>https://start.exactonline.nl/api/v1/current/Me?$select=CurrentDivision</strong></li>
<li>Hit <strong>Preview</strong> button.</li>
<li>Copy your division number, you will need it when constructing a URL for getting contacts.
<div id="attachment_6373" style="width: 410px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6373" class="wp-image-6373 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-get-division-number.png" alt="" width="400" height="188" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-get-division-number.png 400w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-get-division-number-300x141.png 300w" sizes="(max-width: 400px) 100vw, 400px" /><p id="caption-attachment-6373" class="wp-caption-text">Getting division number</p></div></li>
<li>Now enter this URL in the field:<br />
<strong>https://start.exactonline.nl/api/v1/<span style="text-decoration: underline;">{division}</span>/crm/Contacts?$select=FirstName,LastName<br />
</strong>Replace <em>{division}</em> with your division number.</li>
</ol>
<div id="attachment_6372" style="width: 651px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6372" class="wp-image-6372 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source.png" alt="" width="641" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source.png 641w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-262x300.png 262w" sizes="(max-width: 641px) 100vw, 641px" /><p id="caption-attachment-6372" class="wp-caption-text">Configuring JSON Source to get Exact Online data and load it into SQL Server</p></div>
<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;"><strong>NOTE:</strong> Check this link to construct a URL to get other fields than <em>FirstName, Lastname </em>as well: <a href="https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=CRMContacts" target="_blank" rel="noopener">https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=CRMContacts</a>.</div></div>
<h4>Pagination</h4>
<p>To paginate through the results, perform these steps:</p>
<ol>
<li>Open <em>Pagination</em> tab.</li>
<li>In <em>Next Link/Cursor Expression</em> field enter <strong>$.d.__next</strong></li>
</ol>
<div id="attachment_6418" style="width: 712px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6418" class="wp-image-6418 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-pagination.png" alt="" width="702" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-pagination.png 702w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-pagination-300x221.png 300w" sizes="(max-width: 702px) 100vw, 702px" /><p id="caption-attachment-6418" class="wp-caption-text">Configuring pagination in JSON Source to paginate through Exact Online contacts</p></div>
<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;"><strong>NOTE:</strong> More on pagination: <a href="https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-resttips" target="_blank" rel="noopener">https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-resttips</a>.</div></div>
<h3>Loading Exact Online data into SQL Server</h3>
<ol>
<li>Drag and drop <em>OLE DB Destination</em> or similar connector.</li>
<li>Connect<em> JSON Source</em> with <em>OLE DB Destination</em>.</li>
<li>Create a new connection.</li>
<li>Click <strong>New</strong> to create a new table.</li>
<li>Hit <strong>OK</strong>.</li>
<li>Select <strong>Mappings</strong> to map the columns.</li>
<li>Hit <strong>OK</strong> to close the window.</li>
<li>Execute the package.</li>
</ol>
<div id="attachment_6419" style="width: 828px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6419" class="wp-image-6419 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-ole-db-destination.png" alt="" width="818" height="487" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-ole-db-destination.png 818w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-ole-db-destination-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-ole-db-destination-768x457.png 768w" sizes="(max-width: 818px) 100vw, 818px" /><p id="caption-attachment-6419" class="wp-caption-text">Configuring OLE DB Destination to load Exact Online data into SQL Server</p></div>
<h3>The results</h3>
<p>Once you execute the package, you should see similar results in Visual Studio and SQL Server Management Studio:</p>
<div id="attachment_6420" style="width: 366px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6420" class="wp-image-6420 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-execute-package.png" alt="" width="356" height="272" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-execute-package.png 356w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-execute-package-300x229.png 300w" sizes="(max-width: 356px) 100vw, 356px" /><p id="caption-attachment-6420" class="wp-caption-text">Executing SSIS package and loading Exact Online data  into SQL Server</p></div>
<div id="attachment_6421" style="width: 676px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6421" class="wp-image-6421 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-results.png" alt="" width="666" height="154" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-results.png 666w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-results-300x69.png 300w" sizes="(max-width: 666px) 100vw, 666px" /><p id="caption-attachment-6421" class="wp-caption-text">Successfully loading Exact Online data into SQL Server</p></div>
<p>As you see, these are the same Exact Online contacts showed in the Getting Started section.</p>
<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;"><strong>NOTE:</strong> Check more API methods you can use to get data from Exact Online: <a href="https://start.exactonline.nl/docs/HlpRestAPIResources.aspx?SourceAction=10" target="_blank" rel="noopener">https://start.exactonline.nl/docs/HlpRestAPIResources.aspx?SourceAction=10</a></div></div>
<h2>Conclusion</h2>
<p>You learned how to load data from Exact Online into SQL Server using SSIS and <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. At first, we created an Exact Online OAuth application, then created an OAuth Connection Manager based on its information and finally loaded contacts using JSON Source.</p>
<h2><strong>References</strong></h2>
<p><a href="https://apps.exactonline.com/nl/en-US" target="_blank" rel="noopener">Exact App Center</a></p>
<p><a href="https://start.exactonline.nl/docs/HlpRestAPIResources.aspx?SourceAction=10" target="_blank" rel="noopener">API methods</a></p>
<p><a href="https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=CRMContacts" target="_blank" rel="noopener">Get contacts API method</a></p>
<p><a href="https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-resttips." target="_blank" rel="noopener">Pagination</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/load-data-exact-online-sql-server-ssis/">Load data from Exact Online into SQL Server using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read Azure DevOps data in SSIS (VSTS / TFS Online) – Call REST API / Load to SQL Server</title>
		<link>https://zappysys.com/blog/read-vsts-data-ssis-call-rest-api-load-sql-server/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 18 Aug 2018 09:47:14 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[azure devops]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[TFS Online]]></category>
		<category><![CDATA[visual studio team service]]></category>
		<category><![CDATA[vsts]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4643</guid>

					<description><![CDATA[<p>Introduction In this blog, we will learn How to read data from Azure DevOps in SSIS and load into SQL Server Table. Azure DevOps was formally known as TFS Online / VSTS. In this article we will learn, how to read Issues (Work Items) using Azure DevOps API (i.e. VSTS API). In last few years Microsoft has [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-vsts-data-ssis-call-rest-api-load-sql-server/">Read Azure DevOps data in SSIS (VSTS / TFS Online) – Call REST API / Load to SQL Server</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-logo-150x150-1.png"><img loading="lazy" decoding="async" class="alignleft wp-image-4646 " src="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-logo-150x150-1-150x150.png" alt="Visual Studio Team Service Logo" width="91" height="91" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-logo-150x150-1-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-logo-150x150-1.png 300w" sizes="(max-width: 91px) 100vw, 91px" /></a></p>
<p>In this blog, we will learn <strong>How to read data from Azure DevOps in SSIS and load into SQL Server Table.</strong> Azure DevOps was formally known as TFS Online / VSTS.</p>
<p>In this article we will learn, how to read Issues (Work Items) using Azure DevOps API (i.e. VSTS API). In last few years Microsoft has changed marketing names few times for TFS Service. For example everything started with  Visual Source Safe (VSS) &gt; TFS &gt; TFS Online &gt; Visual Studio Online &gt; VSTS (Visual Studio Team Services)) and finally now its called <strong>Azure DevOps</strong>. In this article we might use terms like VSTS or TFS  Online or <strong>Azure DevOps</strong> but not to get confused its all about <strong>Calling Azure Dev Ops API.</strong></p>
<p>In this article we will try to cover few topics such as.</p>
<ul>
<li>Register an OAuth App to call REST API for <strong>Azure DevOps API (i.e. VSTS / TFS Online)</strong></li>
<li>Read all Issues (Work Items) data from VSTS with SSIS and finally</li>
<li>Create new Issue/Bug in Visual Studio Team Service Project WorkItems.</li>
<li>Authenticate and Call Azure DevOps <strong>using PAT</strong> (Personal Access Tokens) rather than OAuth 2.0</li>
</ul>
<p>We will go through the steps to read Issues data from Visual Studio Team Service and Load into SQL Server using  <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source.</a></p>
<p>In nutshell, this post will focus on how to call VSTS API using SSIS.</p>
<p>So let&#8217;s get started.</p>
<h2><span id="Requirements">Prerequisite<br />
</span></h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a></li>
</ol>
<h2><span id="Conclusion">Call Azure DevOps API Using PAT (Personal Access Token)</span></h2>
<p>There are two ways to call Azure DevOps API. You can use <a href="https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth">OAuth 2.0</a> or use <a href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate" target="_blank" rel="noopener">PAT (i.e. Personal Access Token)</a> In the next section we will see how to use OAuth 2.0 if you like more secure way to authenticate (OAuth 2.0 requires more steps).</p>
<p>Microsoft offers Static API Token (referred as PAT &#8211; Personal Access Token) which you can use like a password (it remains valid for 1 year before you have regenerate).</p>
<p>So let&#8217;s get started.</p>
<h3>Create PAT (Personal Access Token)</h3>
<ol>
<li>Visit to <pre class="crayon-plain-tag">https://dev.azure.com/YOUR_COMPANY_NAME/_usersSettings/tokens</pre> . Create Personal Access Token (i.e. PAT ) by clicking User Settings icon &gt; Personal Access Token (see below)  (<a href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&amp;tabs=preview-page" target="_blank" rel="noopener">detailed steps listed here</a> )
<div id="attachment_9224" style="width: 801px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9224" class="size-full wp-image-9224" src="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token.png" alt="Call Azure DevOps API (formally known as VSTS / TFS Online) - Create Personal Access Token (i.e. PAT)" width="791" height="559" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token.png 791w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token-300x212.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-create-pat-personal-access-token-768x543.png 768w" sizes="(max-width: 791px) 100vw, 791px" /></a><p id="caption-attachment-9224" class="wp-caption-text">Call Azure DevOps API (formally known as VSTS / TFS Online) &#8211; Create Personal Access Token (i.e. PAT)</p></div></li>
<li>On Token Configuration Screen change Expiration to maximum (i.e. one year from today)</li>
<li>Now select permission &#8211; We will call Analytics API below (but you can also check Work Items section if you need to call some other API for read / write purpose)
<div id="attachment_9225" style="width: 1201px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9225" class="wp-image-9225 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission.png" alt="Change Permission / Expiration Date for Azure DevOps PAT (Personal Access Token) - Read / Write Work Items, Call Analytics API Example" width="1191" height="837" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission.png 1191w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission-300x211.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission-768x540.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/azure-devops-api-create-pat-personal-access-token-set-permission-1024x720.png 1024w" sizes="(max-width: 1191px) 100vw, 1191px" /></a><p id="caption-attachment-9225" class="wp-caption-text">Change Permission / Expiration Date for Azure DevOps PAT (Personal Access Token) &#8211; Read / Write Work Items, Call Analytics API Example</p></div></li>
</ol>
<h3>Call Azure DevOps OData API in SSIS &#8211; Read WorkItems  Example (Analytics API Service)</h3>
<p>Now lets configure JSON Source to read WorkItems by calling  Azure DevOps Analytics API (in Previous few sections we call different set of APIs). <a href="https://docs.microsoft.com/en-us/azure/devops/report/extend-analytics/wit-analytics?view=azure-devops">Check this link</a> for more information on AzureDevOps Analytics API (its OData format).</p>
<p>For demo purpose we are calling WorkItems entity but you can read from many other entities like (Read Areas, Iterations, Projects, Teams, Tags etc). <a href="https://docs.microsoft.com/en-us/azure/devops/report/extend-analytics/data-model-analytics-service?view=azure-devops">Check this link</a> to see which Entity (i.e. Table) you can query for specific OData API version.</p>
<p>So let&#8217;s get started</p>
<ol>
<li>Go to SSIS designer and drag Data Flow Task on the Designer Surface<br />
<img decoding="async" class="figureimage" title="SSIS Data Flow Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" /></li>
<li>Then double click Data Flow and from toolbox drag ZS JSON Source<br />
<img decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" /></li>
<li>Double click JSON Source to configure like below
<ol>
<li>First change Data Format to <strong>OData</strong> (Analytics API we will call in this section is OData format)</li>
<li>Enter URL to Query data like below. Change <strong>YOUR_COMPANY_NAME</strong> with your own name. Below API URL will call Analytics will<br />
<pre class="crayon-plain-tag">https://analytics.dev.azure.com/YOUR_COMPANY_NAME/Odbc/_odata/v3.0/WorkItems?$select=WorkItemId,Title,WorkItemType,State,CreatedDate&amp;$orderby=CreatedDate desc&amp;$top=11</pre>
</li>
<li>Check Use Credentials and Select new <strong>ZS-HTTP</strong> connection (instead of OAUTH)</li>
</ol>
</li>
<li>On HTTP Connection UI Configure below
<ol>
<li>Enter Some URL &#8211; This will be ignored anyways (e.g. https://dev.azure.com )</li>
<li>Change Credentials Type to Basic (User ID / Password)</li>
<li>Enter some random word in User ID -i.e. fakeusername (this is ignored anyways but needs some non-empty value for older version of SSIS PowerPack else validation fails)</li>
<li>Enter PAT (i.e. Personal Access Token) obtained in the previous section</li>
</ol>
</li>
<li>Click OK to Save Connection UI and go back to JSON Source</li>
<li>On JSON Source, Enter or Select <strong>Array Filter</strong> as <pre class="crayon-plain-tag">$.value[*]</pre></li>
<li>Click Preview data see its working using HTTP connection method</li>
</ol>
<div id="attachment_9226" style="width: 1071px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9226" class="size-full wp-image-9226" src="https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api.png" alt="Configure JSON Source - Call Azure DevOps Api using PAT (Personal Access Token)" width="1061" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api.png 1061w, https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api-300x207.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api-768x531.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/generate-azure-devops-pat-token-call-odata-rest-api-1024x707.png 1024w" sizes="(max-width: 1061px) 100vw, 1061px" /></a><p id="caption-attachment-9226" class="wp-caption-text">Configure JSON Source &#8211; Call Azure DevOps Api using PAT (Personal Access Token)</p></div>
<p>&nbsp;</p>
<h2>Calling Azure DevOps API in SSIS using OAuth 2.0</h2>
<p>Now in this section we will see how to use more secure but little harder approach to authenticate. We will use OAuth 2.0 this time rather than static token (PAT) which we used in previous section.</p>
<p>In order to start, we will show several examples. ZappySys includes an <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> that will help you to call VSTS API, read various data from VSTS with SSIS, create a new issue on VSTS with SSIS and do many more actions using REST API. To learn more about VSTS API <a href="https://docs.microsoft.com/en-us/rest/api/vsts" rel="noopener">check this help file</a>.</p>
<h3>Create VSTS App (for OAuth 2.0 API Call)</h3>
<p>To access VSTS data using REST API call you need to create a VSTS app. Follow the mentioned steps below to register VSTS OAuth App:</p>
<ol>
<li>you can directly login to the <a href="https://app.vssps.visualstudio.com/profile/view">Visual Studio Team Service &#8211; TFS Online site</a> with your credentials, and redirect to the <a href="https://app.vsaex.visualstudio.com/app/register">Visual Studio Team Service App Registration</a> for creating an app.</li>
<li>you can open <a href="https://app.vssps.visualstudio.com/profile/view">MyApps Page</a>.
<div id="attachment_10065" style="width: 1233px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10065" class="wp-image-10065 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps.png" alt="Visual-Studio-Team-Services-Create-new-OAuth-Apps" width="1223" height="759" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps.png 1223w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps-300x186.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps-768x477.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps-1024x635.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/08/Visual-Studio-Team-Services-Create-new-OAuth-Apps-436x272.png 436w" sizes="(max-width: 1223px) 100vw, 1223px" /></a><p id="caption-attachment-10065" class="wp-caption-text">Visual Studio Team Service: My Apps</p></div>
<p>Visual Studio Team Service: My Apps[/caption]</li>
<li>Click on Create new application link, and you will be redirected to the <a href="https://app.vsaex.visualstudio.com/app/register">Visual Studio Team Service App Registration</a> Page.</li>
<li>Make sure you enter Authorization call base URL. We suggest to below call back URL if you are unsure. We will use exact same URL on OAuth connection UI (Advanced Tab)</p><pre class="crayon-plain-tag">https://zappysys.com/oauth</pre><p>
</li>
<li>
<div id="attachment_4649" style="width: 962px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4649" class="wp-image-4649 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration.png" alt="Visual Studio Team Service: New OAuth App Registration" width="952" height="760" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration.png 952w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-300x239.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-768x613.png 768w" sizes="(max-width: 952px) 100vw, 952px" /></a><p id="caption-attachment-4649" class="wp-caption-text">Visual Studio Team Service: New OAuth App Registration</p></div></li>
<li>Select the Authorization scopes as per your requirements, and click on Create Application button.<br />
For example to read Work Items or Create new Issues programmatically you can check following scope (i.e. OAuth permission).<strong>Check &#8211; Work items (full)  </strong>(i.e. vso.work_full scope)<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;">Note: The scopes selected on your registered application (below screenshot) must match the scopes entered in the ZappySys OAuth connection scopes field (see below). If they do not match exactly, an InvalidScope error can be produced.</div></div>
<strong><br />
</strong></p>
<div id="attachment_4651" style="width: 1130px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4651" class="wp-image-4651 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes.png" alt="Visual Studio Team Service: Select Authorization Scopes" width="1120" height="761" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes.png 1120w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes-768x522.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-New-OAuth-App-Registration-Select-Scopes-1024x696.png 1024w" sizes="(max-width: 1120px) 100vw, 1120px" /></a><p id="caption-attachment-4651" class="wp-caption-text">Visual Studio Team Service: Select Authorization Scopes</p></div></li>
<li>Once you are done with the Creation of an App certainly, you can edit the Application If you want to change Redirect URL or something.</li>
<li>furthermore, Go to MyApps Page and you have your App&#8217;s Lists there with App&#8217;s App ID as Client ID and App Secret as Client Secret.
<div id="attachment_10067" style="width: 1177px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10067" class="wp-image-10067 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1.png" alt="VSTS-OAuth-App-Credentials" width="1167" height="495" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1.png 1167w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1-300x127.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1-768x326.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/VSTS-OAuth-App-Credentials-1-1024x434.png 1024w" sizes="(max-width: 1167px) 100vw, 1167px" /></a><p id="caption-attachment-10067" class="wp-caption-text">Visual Studio Team Service: Your Apps with App’s Credentials</p></div></li>
</ol>
<p>finally, we are ready with an App. Let´s start with an example. In this example, we will show how to retrieve all Issues data from Visual Studio Team Service &#8211; TFS Online and create a new Issue in Visual Studio Team Service &#8211; TFS Online Work Items List under your Project with SSIS.</p>
<h3>Load VSTS data to SQL Server using SSIS JSON Source</h3>
<p>Now once you registered OAuth app in the Visual Studio Team Service &#8211; TFS Online website we can move to SSIS Part.</p>
<h4>Configure OAuth Connection Manager</h4>
<ol>
<li>Right click on Connection Managers Panel to Create New OAuth Connection, and Context Menu will appear, Select New Connection from the Context Menu.
<div id="attachment_4723" style="width: 687px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-select-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4723" class="size-full wp-image-4723" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-select-connection.png" alt="Connection Manager Panel: Select Connection" width="677" height="348" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-select-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-select-connection-300x154.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-4723" class="wp-caption-text">Connection Manager Panel: Select Connection</p></div></li>
<li>Select ZS-OAUTH Connection Manager from the Connection Managers list.
<div id="attachment_4724" style="width: 681px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4724" class="wp-image-4724 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png" alt="SSIS Connection Mangers List: Select O-AUTH Connection Manager" width="671" height="549" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png 671w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager-300x245.png 300w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-4724" class="wp-caption-text">SSIS Connection Mangers List: Select O-AUTH Connection Manager</p></div></li>
<li>Configure the new OAuth Connection for <strong>VSTS(Visual Studio Team Service &#8211; TFS Online)</strong> as below.</li>
<li>First lets enter Call back URL (Same URL you entered when you created App earlier)<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab.png"><img loading="lazy" decoding="async" class="size-full wp-image-4696" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab.png" alt="SSIS OAuth Connection Manager: Advanced Tab Configurations" width="771" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab.png 771w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab-300x271.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-Advanced-Tab-768x694.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></a>SSIS OAuth Connection Manager: Advanced Tab Configurations</li>
<li>For VSTS API you need to set the Refresh Token File Path as below because VSTS API Token&#8217;s Refresh Token keeps changing.<a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab.png"><img loading="lazy" decoding="async" class="size-full wp-image-4697" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab.png" alt="SSIS OAuth Connection Manager: OAuth2 Grant Options Tab Configurations" width="771" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab.png 771w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab-300x271.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-OAuth2-Grant-Options-Tab-768x694.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></a></li>
<li>Then configure the App on the General tab like below (i.e. OAuth Provider, Client ID, Client Secret, Scopes, etc.)<br />
Scope must be valid one <a href="https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?toc=%2Fazure%2Fdevops%2Forganizations%2Ftoc.json&amp;bc=%2Fazure%2Fdevops%2Forganizations%2Fbreadcrumb%2Ftoc.json&amp;view=azure-devops#scopes" target="_blank" rel="noopener">from this list</a> (only those scope allowed which are checked during app creation). For example during app creation you check Work items (full) then you can enter <strong>vso.work_full</strong> in scope.<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;">Note: The scopes selected on your registered application must match the scopes entered in the scopes field (below screenshot). If they do not match exactly, an InvalidScope error can be produced.</div></div><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab.png"><img loading="lazy" decoding="async" class="size-full wp-image-4695" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab.png" alt="SSIS OAuth Connection Manager: General Tab Configurations" width="771" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab.png 771w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab-300x271.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-oauth-connection-manager-for-VSTS-API-configurations-General-Tab-768x694.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></a></p>
<div class="mceTemp"></div>
</li>
<li>finally, you are done with the OAuth Configurations. Click on Generate Token button to Generate token and then click on Test Connection button and click on OK to save the connection manager configurations settings.</li>
</ol>
<h4>How to get ProjectID?</h4>
<p>If you don&#8217;t know the ProjectID, then you can also enter ProjectName in place of ProjectID in Request URL. you can also call GET Request for getting Lists of Projects. the Request URL for getting the list of Projects is:</p><pre class="crayon-plain-tag">https://{accountName}.visualstudio.com/_apis/projects?api-version=4.1</pre><p>
For this, we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a></p>
<ol>
<li>First of All, Goto Control Flow Section, Drag and Drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a> from the SSIS Toolbox.
<div id="attachment_3777" class="wp-caption aligncenter">
<div id="attachment_3777" style="width: 577px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3777" class="wp-image-3777 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png" alt="Drag and Drop REST API Task" width="567" height="297" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png 567w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin-300x157.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></a><p id="caption-attachment-3777" class="wp-caption-text">Drag and Drop REST API Task</p></div>
</div>
</li>
<li>furthermore, Double click on that Component to Edit the Configurations and Configure the task like the below-attached screesnshot.<br />
Some basic configurations need to be done in SSIS REST API Task.<br />
<strong># Request Tab: </strong></p>
<blockquote><p><strong>* </strong>Select Request URL Access Mode to Url from Connection.<br />
<strong>* </strong>Select Url Connection to your configured ZS-OAuth Connection Manager.<strong><br />
* </strong>Enter <strong>Request URL:</strong> https://zappysys.visualstudio.com/_apis/projects?api-version=4.1<br />
<strong>* </strong>Select <strong>HTTP Request Method:</strong> GET</p></blockquote>
<div id="attachment_4725" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4725" class="size-full wp-image-4725" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings.png" alt="SSIS REST API Task: Request Tab Configurations" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings.png 800w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings-300x245.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Request-Settings-768x628.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-4725" class="wp-caption-text">SSIS REST API Tsk: Request Tab Configurations</p></div>
<p>Create New Variable from Variable Menu</p>
<div id="attachment_4692" style="width: 1559px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4692" class="size-full wp-image-4692" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables.png" alt="SSIS User Variables: Create a new Variable and set Value" width="1549" height="249" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables.png 1549w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables-300x48.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables-768x123.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-set-variables-1024x165.png 1024w" sizes="(max-width: 1549px) 100vw, 1549px" /></a><p id="caption-attachment-4692" class="wp-caption-text">SSIS User Variables: Create a new Variable and set Value</p></div>
<p><strong># Response Tab: </strong></p>
<blockquote><p>* Select <strong>Response Content Type:</strong> Json<br />
* Set <strong>Response Content Filter Expression:</strong> $.value[1].id<br />
* check the checkbox of <strong>Save Response Content<br />
</strong><strong>* </strong>Set <strong>Save Mode </strong>to Save to Variable<br />
* <strong>Select your Variable:</strong> {{User::ProjectID}}</p></blockquote>
<div id="attachment_4726" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4726" class="size-full wp-image-4726" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings.png" alt="SSIS REST API Task: Response Tab Configurations" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings.png 800w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings-300x245.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-to-get-list-of-projects-VSTS-API-Response-Settings-768x628.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-4726" class="wp-caption-text">SSIS REST API Task: Response Tab Configurations</p></div></li>
<li> finally, you are done with the configurations and do Test Request/Response and your ProjectID will be saved in {{User:: ProjectID}}</li>
</ol>
<h4>Configure JSON Source Component</h4>
<ol>
<li>First of all, Create a new SSIS Project or Open Existing Project in Visual Studio  (File &gt; New &gt; Project &gt; Business Intelligence &gt; Integration Services)</li>
<li>Once SSIS Package is open, Goto Data Flow Section, Drag and Drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">ZS JSON Source Component</a> from the SSIS Toolbox.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>furthermore, Double click on that Component to Edit the Configurations. Select File path or web URL from the Access Mode drop-down.<br />
Enter Web URL like this:<br />
<pre class="crayon-plain-tag">https://{accountName}.almsearch.visualstudio.com/{project}/_apis/search/workitemsearchresults?api-version=4.1-preview.1</pre>
here, We have used 2 Parameters<strong>.</strong></p>
<p><strong>* {accountName} </strong>is the name of the Visual Studio Team Services &#8211; TFS Online account<strong>.<br />
</strong><strong>* {project} </strong>is Project ID or project name (For more See this <a href="https://docs.microsoft.com/en-us/rest/api/vsts/search/work%20item%20search%20results/fetch%20work%20item%20search%20results?view=vsts-rest-4.1">Visual Studio Team Service API Documentation for getting filtered Issues data Request API</a>)<br />
We have used Search Work Items for Fetching Paginated Work Items(Issues, Bugs)</p>
<p>You can use Variable too in your Request URL, to <strong>make URL Dynamic</strong>, See the below-attached Screenshot.<br />
To make URL dynamic first create an SSIS variable like below screenshot and then change URL to use <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">Variable Placeholder</a> like this</p><pre class="crayon-plain-tag">https://zappysys.almsearch.visualstudio.com/{{User::ProjectID}}/_apis/search/workitemsearchresults?api-version=4.1-preview.1</pre><p>
&nbsp;</li>
</ol>
<div id="attachment_4693" style="width: 892px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4693" class="size-full wp-image-4693" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url.png" alt="SSIS JSON Source Component: Enter the Request URL" width="882" height="752" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url.png 882w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url-300x256.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-enter-request-url-768x655.png 768w" sizes="(max-width: 882px) 100vw, 882px" /></a><p id="caption-attachment-4693" class="wp-caption-text">SSIS JSON Source Component: Enter the Request URL</p></div>
<h4>JSON Source Configuration for Pagination</h4>
<ol>
<li>now, we are going to set Pagination related configurations of Visual Studio Team Service &#8211; TFS Online for Getting all WorkItems with Search POST REST Request API. Here in our example,<br />
<strong><strong>Request Method: POST<br />
Body Content-Type: JSON (application/json)<br />
Request Body:<br />
</strong></strong><br />
<pre class="crayon-plain-tag">{
  "searchText": "a",
  "$skip": &lt;%page%&gt;,
  "$top": 100,
  "filters": {
    "System.TeamProject": [
      "ProductTesting"
    ]
  }
}</pre>
here, SearchText: The SearchText for filtering WorkItems based on the keywords match.<br />
<strong>$skip:</strong> Number of results to be skipped<br />
<strong>$top:</strong> Number of results to be returned.<br />
<div class="su-note"  style="border-color:#e5e54c;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:#FFFF66;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">you can take any number of the page size. for example, you can set 100 in both $skip and $top properties (I have set 10 for the Demo Purpose only)</div></div>
filters: Filters to be applied. Set it to null if there are no filters to be applied.<br />
System.TeamProject: ProjectName in which you want to do filtering of WorkItems.</p>
<div id="attachment_4698" style="width: 1174px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4698" class="size-full wp-image-4698" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab.png" alt="SSIS JSON Source Component: Configurations of Settings Tab" width="1164" height="728" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab.png 1164w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab-300x188.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab-768x480.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab-1024x640.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-settings-tab-436x272.png 436w" sizes="(max-width: 1164px) 100vw, 1164px" /></a><p id="caption-attachment-4698" class="wp-caption-text">SSIS JSON Source Component: Configurations of Settings Tab</p></div></li>
<li> You can Configure the Pagination Tab something like this:
<div id="attachment_4699" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4699" class="size-full wp-image-4699" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab.png" alt="SSIS JSON Source Component: Pagination Tab Settings" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab.png 826w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-for-VSTS-API-request-pagination-tab-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-4699" class="wp-caption-text">SSIS JSON Source Component: Pagination Tab Settings</p></div></li>
<li>furthermore, Select the Filter to set the Filter.
<div id="attachment_4700" style="width: 1093px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4700" class="size-full wp-image-4700" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request.png" alt="SSIS JSON Source Component Configurations: Select Filter" width="1083" height="729" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request.png 1083w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request-768x517.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request-1024x689.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-select-filter-for-VSTS-API-POST-Request-272x182.png 272w" sizes="(max-width: 1083px) 100vw, 1083px" /></a><p id="caption-attachment-4700" class="wp-caption-text">SSIS JSON Source Component Configurations: Select Filter</p></div></li>
<li>It seems like you are all OK with the configurations, Click on the Preview button to see the response data.
<div id="attachment_4701" style="width: 1519px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4701" class="size-full wp-image-4701" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data.png" alt="SSIS JSON Source Component: See the Preview" width="1509" height="731" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data.png 1509w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data-300x145.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data-768x372.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-json-source-VSTS-API-preview-response-data-1024x496.png 1024w" sizes="(max-width: 1509px) 100vw, 1509px" /></a><p id="caption-attachment-4701" class="wp-caption-text">SSIS JSON Source Component: See the Preview</p></div></li>
<li>finally, Click on OK button to save JSON Source settings.</li>
</ol>
<h4>Configure OLE DB Destination Component for dumping Contacts data into SQL</h4>
<ol>
<li>first of all, Drag any destination (i.e. OLEDB Destination) from your SSIS toolbox. For demo purpose, we will load Contacts data into SQL Server Table.
<div id="attachment_4335" style="width: 819px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4335" class="size-full wp-image-4335" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component.png" alt="Drag and Drop OLE DB Destination Component" width="809" height="497" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component.png 809w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-oledb-destination-component-768x472.png 768w" sizes="(max-width: 809px) 100vw, 809px" /></a><p id="caption-attachment-4335" class="wp-caption-text">Drag and Drop OLE DB Destination Component</p></div></li>
<li>Configure OLEDB Destination (Select Connection and Target Table). You can Create a new Table for the destination by clicking a NEW button next to Table drop-down.
<div id="attachment_4703" style="width: 1176px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4703" class="size-full wp-image-4703" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql.png" alt="OLE DB Destination Component - Configure for dumping WorkItems of Project from VSTS data in SQL Table" width="1166" height="772" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql.png 1166w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql-300x199.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql-768x508.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-for-dumping-workitems-list-in-sql-1024x678.png 1024w" sizes="(max-width: 1166px) 100vw, 1166px" /></a><p id="caption-attachment-4703" class="wp-caption-text">OLE DB Destination Component &#8211; Configure for dumping WorkItems of Project from VSTS data in SQL Table</p></div></li>
<li>almost you are done with the configurations, just need to configure mappings, So for that Click on the Columns Tab to configure Mappings. also, Click on OK button to Save the configurations of OLE DB Destination Component.
<div id="attachment_4704" style="width: 834px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4704" class="size-full wp-image-4704" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings.png" alt="OLE DB Destination - Column Configurations" width="824" height="718" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings.png 824w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-ole-db-destination-configure-column-mappings-768x669.png 768w" sizes="(max-width: 824px) 100vw, 824px" /></a><p id="caption-attachment-4704" class="wp-caption-text">OLE DB Destination &#8211; Column Configurations</p></div></li>
<li>furthermore, You can see the requests in <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/">Fiddler</a> to see the Paginated requests flows.
<div id="attachment_4705" style="width: 1540px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4705" class="size-full wp-image-4705" src="https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests.png" alt="Fiddler - See All The Requests" width="1530" height="649" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests.png 1530w, https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests-300x127.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests-768x326.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/see-the-fiddler-requests-1024x434.png 1024w" sizes="(max-width: 1530px) 100vw, 1530px" /></a><p id="caption-attachment-4705" class="wp-caption-text">Fiddler &#8211; See All The Requests</p></div></li>
<li>finally, Execute your package to Load Contacts data from Visual Studio Team Service &#8211; TFS Online to SQL Server.</li>
</ol>
<h2>Create a new WorkItem on Visual Studio Team Service &#8211; TFS Online (Use SSIS REST API Task)</h2>
<p>Now let&#8217;s look at one more example to call Visual Studio Team Service(VSTS) &#8211; TFS Online REST API. This time we will create a new WorkItem using REST API call in SSIS. For this, we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a></p>
<ol>
<li>First of All, Goto Control Flow Section, Drag and Drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a> from the SSIS Toolbox.
<div id="attachment_3777" style="width: 577px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3777" class="wp-image-3777 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png" alt="Drag and Drop REST API Task" width="567" height="297" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png 567w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin-300x157.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></a><p id="caption-attachment-3777" class="wp-caption-text">Drag and Drop REST API Task</p></div></li>
<li>furthermore, Double click on that Component to Edit the Configurations and Configure the task like the below-attached screesnshot.<br />
<pre class="crayon-plain-tag">::::: Request Settings :::::

* Select Request URL Access Mode to select Url from Connection.
* Select Url Connection: Select your created OAUTH Connection Manager.
* Enter Reqeust URL
      Request URL: POST https://{accountName}.visualstudio.com/{project}/_apis/wit/workitems/${type}?api-version=4.1
      here, 
      {accountName} - The name of the Visual Studio Team Services account.
      {project} - Project ID or project name
      {type} - WorkItems Type (Task, Bug, Issue, Requirement etc)
* Select HTTP Request Method as PATCH method
* Enter Request Body.
      Request Body:
      [
         {
             "op": "add",
             "path": "/fields/System.Title",
             "value": "Sample task"
         }
      ]
* Select Body Content Type: Text/Plain
*Enter Request Header:
        Content-Type: application/json-patch+json
(For more Information See this Visual Studio Team Service - TFS Online API Documentation for Creating a new WorkItem
https://docs.microsoft.com/en-us/rest/api/vsts/wit/work%20items/create?view=vsts-rest-4.1)</pre>
<div id="attachment_4707" style="width: 1068px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4707" class="size-full wp-image-4707" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API.png" alt="REST API Task: Configurations" width="1058" height="652" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API.png 1058w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-300x185.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-768x473.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-1024x631.png 1024w" sizes="(max-width: 1058px) 100vw, 1058px" /></a><p id="caption-attachment-4707" class="wp-caption-text">REST API Task: Configurations</p></div></li>
<li>So all good with the Configurations let&#8217;s do Test Request/Response by clicking on Test Request/Response button. See the below-attached request/response screen.
<div id="attachment_4708" style="width: 1274px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4708" class="size-full wp-image-4708" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response.png" alt="Create New WorkItem in VSTS Account: Do Test Request/Response" width="1264" height="671" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response.png 1264w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response-300x159.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response-768x408.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-rest-api-task-create-new-workitems-VSTS-API-test-request-response-1024x544.png 1024w" sizes="(max-width: 1264px) 100vw, 1264px" /></a><p id="caption-attachment-4708" class="wp-caption-text">Create New WorkItem in VSTS Account: Do Test Request/Response</p></div></li>
<li>finally, you have created a WorkItem in VSTS successfully using VSTS REST API and REST API Task, See in VSTS Site.
<div id="attachment_4714" style="width: 1609px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4714" class="wp-image-4714 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API.png" alt="VSTS Site: See the Newly Created WorkItem" width="1599" height="389" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API.png 1599w, https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API-300x73.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API-768x187.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/newly-created-workitem-in-workitems-list-VSTS-API-1024x249.png 1024w" sizes="(max-width: 1599px) 100vw, 1599px" /></a><p id="caption-attachment-4714" class="wp-caption-text">VSTS Site: See the Newly Created WorkItem</p></div></li>
<li>And that&#8217;s it. similarly, you can Update/Delete particular WorkItem in WorkItems List in VSTS.</li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this blog, we learned how to read Visual Studio Team Services &#8211; TFS(Team Foundation Server) Online data in SSIS, How to register an OAuth App for Visual Studio Team Service REST API, How to get all WorkItems data from Visual Studio Team Service  &#8211; TFS(Team Foundation Server) Online and create a new WorkItem on VSTS with SSIS using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">ZS JSON Source Component</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Task</a> in a very simple way. You can achieve many more functionalities with the use of both of these tools. Check our blogs/articles on <strong>REST API Task </strong><a href="https://zappysys.com/blog/tag/ssis-rest-api-task/">https://zappysys.com/blog/tag/ssis-rest-api-task/</a> and <strong>JSON Source Component </strong><a href="https://zappysys.com/blog/tag/ssis-json-source/">https://zappysys.com/blog/tag/ssis-json-source/</a> to find out what <em>these tools</em> are capable of more.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of VSTS API with our tools:</p>
<ul>
<li><a href="https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1">Visual Studio Team Service Documentation for API</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">REST API Task</a>, you can also find <a href="https://youtu.be/jPdcQlWOBZA">Tutorial Video</a> here.</li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">JSON Source Component</a>, you can also find <a href="https://youtu.be/t4fSghbSZLo">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-rest-api-web-service-task.htm">SSIS REST API Task</a> and <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=json-source.htm">JSON Source Component</a>.</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-vsts-data-ssis-call-rest-api-load-sql-server/">Read Azure DevOps data in SSIS (VSTS / TFS Online) – Call REST API / Load to SQL Server</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
