<?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 Connection Manager Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis/connection-manager/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis/connection-manager/</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 Connection Manager Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis/connection-manager/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SSIS tutorial: Migrating MariaDB data to PostgreSQL</title>
		<link>https://zappysys.com/blog/ssis-tutorial-how-to-migrate-mariadb-data-to-postgresql/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 27 Feb 2026 12:01:24 +0000</pubDate>
				<category><![CDATA[SSIS PostgreSql Connection]]></category>
		<category><![CDATA[SSIS PostgreSQL Destination]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=11762</guid>

					<description><![CDATA[<p>Introduction In our previous post, we explored how to read and write PostgreSQL data using the ZappySys PostgreSQL Source and Destination connectors for SSIS. In this article, you will learn how to connect MariaDB to PostgreSQL using ZappySys SSIS PowerPack and transfer data between both systems. We will demonstrate a practical ETL pattern using ZappySys [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-tutorial-how-to-migrate-mariadb-data-to-postgresql/">SSIS tutorial: Migrating MariaDB data to PostgreSQL</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/04/ssis-PostgreSql-Destination.png"><img decoding="async" class="size-full wp-image-6816 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-Destination.png" alt="PostgreSql Destination" width="100" height="100" /></a>In our previous post, we explored how to read and write PostgreSQL data using the ZappySys <a href="https://zappysys.com/products/ssis-powerpack/ssis-postgresql-source/">PostgreSQL Source</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-postgresql-destination/">Destination</a> connectors for SSIS. In this article, you will learn how to connect MariaDB to PostgreSQL using ZappySys SSIS PowerPack and transfer data between both systems.</p>
<p>We will demonstrate a practical ETL pattern using ZappySys ODBC/JDBC connectivity to extract data from MariaDB and load it into PostgreSQL within SSIS.</p>
<h2>Prerequisites</h2>
<p>Before you begin, make sure you have the following:</p>
<ul>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Thirdly, access credentials for both MariaDB and PostgreSQL</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> and ZappySys <a href="https://zappysys.com/products/ODBC-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a></li>
</ul>
<h2>Steps</h2>
<h3>Configure MariaDB Connection Using ODBC (JDBC Bridge)</h3>
<p>Since MariaDB connectivity is handled via JDBC, we will use the <strong>ZappySys JDBC Bridge Driver</strong> to expose it as an ODBC data source.</p>
<ol>
<li>Visit the <a href="https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector">official MariaDB website</a>.</li>
<li>Download the latest <strong>MariaDB JDBC driver</strong>.</li>
<li>Save the <code inline="">.jar</code> file locally, for example: <span style="background-color: #f2f4f5; color: #222222; font-family: 'Courier 10 Pitch', Courier, monospace; font-size: 12.8px;">D:\Zappysys\drivers\mariadb-java-client-3.5.7.jar</span></li>
<li>Download and install <a href="https://zappysys.com/products/odbc-powerpack/download/"><strong>ZappySys ODBC PowerPack</strong></a> if not already installed.</li>
<li>Open <strong>ODBC Data Sources (64-bit)</strong>.
<div id="attachment_6213" style="width: 404px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-6213" class="wp-image-6213 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png" alt="" width="394" height="542" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png 394w, https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2-218x300.png 218w" sizes="(max-width: 394px) 100vw, 394px" /></a><p id="caption-attachment-6213" class="wp-caption-text">Open ODBC Data Sources</p></div></li>
<li>Create a <strong>User data source</strong> (User DSN) based on <strong>ZappySys JDBC Bridge Driver</strong>:
<div id="attachment_11767" style="width: 632px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Create-a-User-data-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11767" class="size-full wp-image-11767" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Create-a-User-data-source.png" alt="" width="622" height="517" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Create-a-User-data-source.png 622w, https://zappysys.com/blog/wp-content/uploads/2026/02/Create-a-User-data-source-300x249.png 300w" sizes="(max-width: 622px) 100vw, 622px" /></a><p id="caption-attachment-11767" class="wp-caption-text">Create a User data source</p></div></li>
<li>Configure the JDBC Connection. Fill in the connection details
<ul style="list-style-type: disc;">
<li><strong>Connection String  </strong><code>jdbc:mariadb://{host-name}:{port}/{database-name}<br />
</code></li>
<li><strong>JDBC Driver File </strong><code>D:\Zappysys\drivers\mariadb-java-client-3.5.7.jar<br />
</code></li>
<li><strong>Username </strong><code>root<br />
</code></li>
<li><strong>Password </strong><code>********<br />
</code></li>
<li><strong>Connection Parameters</strong><code>[]</code></li>
</ul>
</li>
<li>Click <strong>Test Connection</strong>. If configured correctly, you should see a success message.
<div class="mceTemp"></div>
<div id="attachment_11768" style="width: 814px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-Mariadb.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11768" class="size-full wp-image-11768" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-Mariadb.png" alt="" width="804" height="704" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-Mariadb.png 804w, https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-Mariadb-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-Mariadb-768x672.png 768w" sizes="(max-width: 804px) 100vw, 804px" /></a><p id="caption-attachment-11768" class="wp-caption-text">Zappysys JDBC &#8211; MariaDB</p></div></li>
<li>You can also use the <strong>Preview</strong> tab to select the table and execute SQL queries. For advanced SQL examples, refer to the <a href="https://zappysys.com/onlinehelp/odbc-powerpack/index.htm#page=jdbc-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">JDBC Bridge documentation</a>.
<div id="attachment_11769" style="width: 814px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-MariaDB-preview-result.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11769" class="size-full wp-image-11769" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-MariaDB-preview-result.png" alt="" width="804" height="704" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-MariaDB-preview-result.png 804w, https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-MariaDB-preview-result-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Zappysys-JDBC-MariaDB-preview-result-768x672.png 768w" sizes="(max-width: 804px) 100vw, 804px" /></a><p id="caption-attachment-11769" class="wp-caption-text">Zappysys JDBC &#8211; MariaDB preview result</p></div></li>
</ol>
<h3>Connect MariaDB to SSIS</h3>
<ol>
<li>Open <strong>Visual Studio</strong>.</li>
<li>Create a <strong>New Project</strong>.</li>
<li>Select <strong>Integration Services Project</strong>.</li>
<li>Provide a project name and location, then click <strong>OK</strong>.</li>
<li>Drag and drop a <strong>Data Flow Task</strong> from the SSIS Toolbox onto the Control Flow surface.
<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>Double-click the task to open the <strong>Data Flow Designer</strong>.</li>
<li>Drag and drop an <strong>ODBC Source</strong> component into the Data Flow.
<div id="attachment_11783" style="width: 489px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-ODBC-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11783" class="size-full wp-image-11783" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-ODBC-source.png" alt="" width="479" height="227" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-ODBC-source.png 479w, https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-ODBC-source-300x142.png 300w" sizes="(max-width: 479px) 100vw, 479px" /></a><p id="caption-attachment-11783" class="wp-caption-text">Drag and drop the ODBC source.</p></div></li>
<li>Double-click the component to configure it.</li>
<li>Click <strong>New…</strong> to create a new ODBC Connection Manager.
<div id="attachment_11772" style="width: 763px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Creating-ODBC-Connection-Manager-in-SSIS.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11772" class="size-full wp-image-11772" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Creating-ODBC-Connection-Manager-in-SSIS.png" alt="" width="753" height="685" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Creating-ODBC-Connection-Manager-in-SSIS.png 753w, https://zappysys.com/blog/wp-content/uploads/2026/02/Creating-ODBC-Connection-Manager-in-SSIS-300x273.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-11772" class="wp-caption-text">Creating an ODBC Connection Manager in SSIS</p></div></li>
<li>Select the MariaDB ODBC DSN you created earlier.</li>
<li>Click <strong>Test Connection </strong>and click <strong>OK </strong>to save the configuration.
<div id="attachment_11773" style="width: 724px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Creating-ODBC-Connection-Manager-in-SSIS-from-JDBC.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11773" class="size-full wp-image-11773" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Creating-ODBC-Connection-Manager-in-SSIS-from-JDBC.png" alt="" width="714" height="620" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Creating-ODBC-Connection-Manager-in-SSIS-from-JDBC.png 714w, https://zappysys.com/blog/wp-content/uploads/2026/02/Creating-ODBC-Connection-Manager-in-SSIS-from-JDBC-300x261.png 300w" sizes="(max-width: 714px) 100vw, 714px" /></a><p id="caption-attachment-11773" class="wp-caption-text">Creating an ODBC Connection Manager in SSIS from JDBC</p></div></li>
<li>Choose <strong>Data Access Mode: </strong>Table name or SQL command.</li>
<li>Select the desired table or enter a custom query.</li>
<li><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Click <strong>Preview</strong> to validate the data, and click <strong>OK </strong>to save the configuration.<br />
</span></span></p>
<div id="attachment_11774" style="width: 763px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Preview-ODBC-Connection-Manager-in-SSIS-from-JDBC.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11774" class="size-full wp-image-11774" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Preview-ODBC-Connection-Manager-in-SSIS-from-JDBC.png" alt="" width="753" height="637" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Preview-ODBC-Connection-Manager-in-SSIS-from-JDBC.png 753w, https://zappysys.com/blog/wp-content/uploads/2026/02/Preview-ODBC-Connection-Manager-in-SSIS-from-JDBC-300x254.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-11774" class="wp-caption-text">Preview an ODBC Connection Manager in SSIS from JDBC</p></div></li>
</ol>
<h3>Configure PostgreSQL Destination</h3>
<ol>
<li>In the Connection Manager pane, click <strong>New Connection</strong>.</li>
<li>Select <strong>ZS-POSTGRESQL</strong>.</li>
<li>Configure the connection:
<ul style="list-style-type: disc;">
<li>Host</li>
<li>Username</li>
<li>Password</li>
<li>Port</li>
<li>Database name</li>
</ul>
</li>
<li>Use the other tabs for more configuration if needed</li>
<li>Click <strong>Test Connection </strong>and Click <strong>OK</strong>.
<div id="attachment_11788" style="width: 698px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-connection-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11788" class="size-full wp-image-11788" src="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-connection-configuration.png" alt="" width="688" height="580" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-connection-configuration.png 688w, https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-connection-configuration-300x253.png 300w" sizes="(max-width: 688px) 100vw, 688px" /></a><p id="caption-attachment-11788" class="wp-caption-text">PostgreSQL connection configuration</p></div></li>
<li>Drag and drop the <a href="https://zappysys.com/products/ssis-powerpack/ssis-postgresql-destination/"><strong>PostgreSQL Destination</strong></a> component.
<div id="attachment_11785" style="width: 556px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-PostgreSQL-destination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11785" class="size-full wp-image-11785" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-PostgreSQL-destination.png" alt="" width="546" height="261" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-PostgreSQL-destination.png 546w, https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-PostgreSQL-destination-300x143.png 300w" sizes="(max-width: 546px) 100vw, 546px" /></a><p id="caption-attachment-11785" class="wp-caption-text">Drag and drop the PostgreSQL destination.</p></div></li>
<li>Connect it to the <strong>ODBC Source </strong>and double-click to configure it.</li>
<li>Select the PostgreSQL connection.
<div id="attachment_11775" style="width: 723px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Choose-the-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11775" class="size-full wp-image-11775" src="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Choose-the-connection.png" alt="" width="713" height="364" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Choose-the-connection.png 713w, https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Choose-the-connection-300x153.png 300w" sizes="(max-width: 713px) 100vw, 713px" /></a><p id="caption-attachment-11775" class="wp-caption-text">PostgreSQL Destination &#8211; Choose the connection</p></div></li>
<li>Go to the <strong>Properties</strong> tab and choose the target table.
<div id="attachment_11776" style="width: 733px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Choose-the-target-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11776" class="size-full wp-image-11776" src="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Choose-the-target-table.png" alt="" width="723" height="664" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Choose-the-target-table.png 723w, https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Choose-the-target-table-300x276.png 300w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-11776" class="wp-caption-text">PostgreSQL Destination &#8211; Choose the target table</p></div></li>
<li>Go to the <strong>Column Mappings</strong> tab and map source columns to destination columns.
<div id="attachment_11777" style="width: 723px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Map-the-columns.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11777" class="size-full wp-image-11777" src="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Map-the-columns.png" alt="" width="713" height="624" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Map-the-columns.png 713w, https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Map-the-columns-300x263.png 300w" sizes="(max-width: 713px) 100vw, 713px" /></a><p id="caption-attachment-11777" class="wp-caption-text">PostgreSQL Destination &#8211; Map the columns</p></div></li>
<li>Click <strong>OK </strong>to save the configuration.</li>
<li>Run the SSIS package. If everything is configured correctly, the data will be transferred from MariaDB to PostgreSQL.
<div id="attachment_11778" style="width: 272px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Final-result.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11778" class="size-full wp-image-11778" src="https://zappysys.com/blog/wp-content/uploads/2026/02/PostgreSQL-Destination-Final-result.png" alt="" width="262" height="246" /></a><p id="caption-attachment-11778" class="wp-caption-text">PostgreSQL Destination &#8211; Final result</p></div></li>
</ol>
<h3>Alternative Option — Using Upsert Destination</h3>
<p>An alternative destination component is the <a href="https://zappysys.com/products/ssis-powerpack/ssis-upsert-destination/">Upsert Destination</a>; you can replace it with the PostgreSQL destination. You can preview data from the element, select the options to insert or/and update, and more.</p>
<ol>
<li>Replace the PostgreSQL Destination with the <a href="https://zappysys.com/products/ssis-powerpack/ssis-upsert-destination/"><strong>Upsert Destination</strong></a>.</li>
<li>Select your PostgreSQL connection.</li>
<li>Choose the target table.</li>
<li>Choose <strong>Insert</strong> or/and <strong>Update</strong> action.n</li>
<li>Map the columns.</li>
<li>Select the primary key column(s).</li>
<li>Configure additional options under the <strong>Advanced</strong> tab if needed.
<div id="attachment_11779" style="width: 968px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-PostgreSQL-destination-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11779" class="size-full wp-image-11779" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-PostgreSQL-destination-table.png" alt="" width="958" height="569" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-PostgreSQL-destination-table.png 958w, https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-PostgreSQL-destination-table-300x178.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-PostgreSQL-destination-table-768x456.png 768w" sizes="(max-width: 958px) 100vw, 958px" /></a><p id="caption-attachment-11779" class="wp-caption-text">Upsert Destination &#8211; PostgreSQL destination table</p></div></li>
<li>Run the package to perform the upsert operation.
<div id="attachment_11780" style="width: 381px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-Final-result.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11780" class="size-full wp-image-11780" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-Final-result.png" alt="" width="371" height="283" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-Final-result.png 371w, https://zappysys.com/blog/wp-content/uploads/2026/02/Upsert-Destination-Final-result-300x229.png 300w" sizes="(max-width: 371px) 100vw, 371px" /></a><p id="caption-attachment-11780" class="wp-caption-text">Upsert Destination &#8211; Final result</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>With ZappySys SSIS PowerPack and ODBC PowerPack, connecting MariaDB to PostgreSQL becomes straightforward and reliable.</p>
<p>By configuring the ODBC/JDBC bridge for MariaDB and using the native PostgreSQL destination in SSIS, you can build a robust ETL pipeline between the two databases.</p>
<p>Explore the full capabilities of the ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> and ZappySys <a href="https://zappysys.com/products/ODBC-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a> to optimize your data integration tasks.</p>
<h1>Need Help?</h1>
<p>If you encounter any issues, our support team is here to help:</p>
<ul>
<li><strong>Live Chat</strong> — Use the chat widget (bottom-right corner of this page)</li>
<li><strong>Email</strong> — <a href="mailto:support@zappysys.com">support@zappysys.com</a></li>
<li><strong>Support Center</strong> — Support | ZappySys</li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/ssis-tutorial-how-to-migrate-mariadb-data-to-postgresql/">SSIS tutorial: Migrating MariaDB data to PostgreSQL</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<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 query salesforce data using Bulk API in SSIS</title>
		<link>https://zappysys.com/blog/query-salesforce-data-using-bulk-api-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 20 Jan 2022 19:07:09 +0000</pubDate>
				<category><![CDATA[SSIS CSV Source]]></category>
		<category><![CDATA[SSIS Salesforce API Task]]></category>
		<category><![CDATA[SSIS Salesforce Connection]]></category>
		<category><![CDATA[bulk api]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<category><![CDATA[salesforce]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9507</guid>

					<description><![CDATA[<p>Introduction In our previous post, we saw how to read Salesforce data using SSIS Salesforce Source (Which uses SOAP API under the hood). This may be slow if you have millions of rows because Salesforce Source paginates every 2000 rows, so it&#8217;s not a good option to read millions of rows to iterate on a [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/query-salesforce-data-using-bulk-api-ssis/">How to query salesforce data using Bulk API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous post, we saw how to <a href="https://zappysys.com/blog/export-data-from-salesforce-to-sql-server-using-ssis/" target="_blank" rel="noopener">read Salesforce</a> data using SSIS Salesforce Source (Which uses SOAP API under the hood). This may be slow if you have millions of rows because Salesforce Source paginates every 2000 rows, so it&#8217;s not a good option to read millions of rows to iterate on a large Salesforce dataset (Table or Query). To increase the read speed, you can use BULK API. This article explains how to read salesforce data using BULK API and increase read speed.</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>NEW Version (v5.5+)</h2>
<p>In the new version (v5.5), we have added an option to query in Bulk Mode. This means if you have millions of Salesforce object rows to read, no worries; it may be very fast in the new version. Previously, it used to take a long time because it read in batches of 2000 rows in each request. With the Bulk API, the batch size is really large.</p>
<p>Here is how to set Salesforce Bulk API Mode in SELECT query (Read operation).</p>
<ol>
<li>Install new version of SSIS PowerPack. Make sure it is v5.5 or higher.</li>
<li>Open existing Salesforce Source UI</li>
<li>Make sure you <strong>check [Use Bulk API]</strong> option like below. if you do not see this option then most likely you are using older version.<br />
-OR-<br />
Just add <strong>#bulkmode</strong> prefix in the SQL query like below, it will use Bulk API</p>
<div id="attachment_11114" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-bulk-api-option-soql-select-query.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11114" class="size-full wp-image-11114" src="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-bulk-api-option-soql-select-query.png" alt="" width="677" height="585" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-bulk-api-option-soql-select-query.png 677w, https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-bulk-api-option-soql-select-query-300x259.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-11114" class="wp-caption-text">Bulk API mode for SSIS Salesforce Source (Read Large amount of data using SOQL Query)</p></div></li>
</ol>
<h2>OLD Version</h2>
<p>If you are using an older version of SSIS Power Pack (v5.4.0 or older), you can follow the steps mentioned in the following section.</p>
<p>We will see how to query using Salesforce Bulk API in SSIS. It involves three simple steps like the one below.</p>
<ol>
<li>Call BULK API &#8211; Submit SOQL Query and receive a JobId back (Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-api-task/">SSIS Salesforce API Task</a>)<br />
<pre class="crayon-plain-tag">https://{your-instance}.salesforce.com/services/data/v50.0/jobs/query</pre>
</li>
<li>Keep checking Job Status Until Status is <strong>JobComplete</strong> (Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-api-task/">SSIS Salesforce API Task</a>)<br />
<pre class="crayon-plain-tag">https://{your-instance}.salesforce.com/services/data/v50.0/jobs/query/{{User::JobId}}</pre>
</li>
<li>Read Query Result  (Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-file-source-flat-file-web-api/" target="_blank" rel="noopener">SSIS CSV Source</a>)<br />
<pre class="crayon-plain-tag">https://{your-instance}.salesforce.com/services/data/v50.0/jobs/query/{{User::JobId}}/results</pre>
</li>
</ol>
<div id="attachment_9515" style="width: 671px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-query-bulk-api-read-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9515" class="size-full wp-image-9515" src="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-query-bulk-api-read-data.png" alt="Query Salesforce Data using Bulk API in SSIS (read using SOQL query in Bulk mode / large dataset)" width="661" height="330" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-query-bulk-api-read-data.png 661w, https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-query-bulk-api-read-data-300x150.png 300w" sizes="(max-width: 661px) 100vw, 661px" /></a><p id="caption-attachment-9515" class="wp-caption-text">Query Salesforce Data using Bulk API in SSIS (read using SOQL query in Bulk mode / large dataset)</p></div>
<p>Now, let&#8217;s look at everything in detail.</p>
<h3>Obtain Salesforce Credentials</h3>
<p>The first step to call Salesforce API is to obtain credentials (security token or OAuth ClientId /Secret)</p>
<p>Method#1 &#8211; Check <a href="https://zappysys.com/blog/export-data-from-salesforce-to-sql-server-using-ssis/#Get_Salesforce_Security_Token">this article</a> to use <strong>UserId/ Password / SecretToken</strong><br />
Method#2 &#8211; Check <a href="https://zappysys.com/blog/register-salesforce-app-obtain-client-id-secret-oauth-api-call/">this article</a> to use the <strong>OAuth</strong> Connection Option</p>
<h3>Create Salesforce Connection</h3>
<p>Once we have Salesforce Credentials, we can create a new Salesforce Connection (You can do this from Task UI or the below way)</p>
<ol>
<li>Open Visual Studio ( Assuming you already have SSIS installed along with <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack</a> )</li>
<li>Create a New SSIS Package Project.</li>
<li>Right-click on the Connection Manager panel and click on New Connection.<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>Select <strong>ZS-SALESFORCE</strong> Connection Manager from the Connection Managers list and Click on the Add Button.<br />
<img decoding="async" class="figureimage" title="SSIS Salesforce Connection Manager - ADD" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/salesforce-connection/ssis-salesforce-api-task-connection-1.png" alt="SSIS Salesforce Connection Manager - ADD" /></li>
<li>Now in Connection Manager UI, Enter your SalesForce Credentials (OAuth Client Id/. Secret &#8211;or&#8212; User Name, Password and Security Token), and leave all other properties as it is.<br />
<img decoding="async" class="figureimage" title="SSIS Salesforce Connection Manager UI " src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/salesforce-connection/ssis-salesforce-connection-manager-ui.png" alt="SSIS Salesforce Connection Manager UI " /></li>
</ol>
<h3>Call Create Job &#8211; Retrieve / Save JobId</h3>
<p>Once the connection is created, we can create our first step. Basically, we will call this API to <a href="https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/query_create_job.htm" target="_blank" rel="noopener">create Job</a> (Bulk Read)</p>
<ol>
<li>Here, in Visual Studio, drag and drop the ZS Salesforce API Task on the design surface.<img decoding="async" class="figureimage" title="SSIS Salesforce API Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/salesforce-api-task/ssis-salesforce-api-task-drag.png" alt="SSIS Salesforce API Task - Drag and Drop" /></li>
<li>Double click the Task and configure Request Settings Tab like below<br />
&#8211; Select Salesforce Connection (Created in the previous section)<br />
&#8211; Check <strong>Use direct URL</strong><br />
&#8211; Enter URL like below (Replace <strong>{your-instance}</strong> with your own instance (i.e. na9) . For more information on how to find out my<br />
salesforce instance id <a href="https://help.salesforce.com/s/articleView?id=000322728&amp;type=1">check this article</a><br />
<pre class="crayon-plain-tag">https://{your-instance}.salesforce.com/services/data/v50.0/jobs/query</pre>
&#8211; Request Method <strong>POST</strong><br />
&#8211; Enter Body like below (You can use your own <a href="https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm" target="_blank" rel="noopener">SOQL query</a>). Keep in mind SQOL must be <a href="https://www.freeformatter.com/json-escape.html" target="_blank" rel="noopener">encoded for JSON format</a>. This means the entire SQL must be in one line (replace new lines with \r\n , quotes with \&#8221; and tabs with \t)<br />
For example, to execute SELECT Id, Name FROM Accounts, you can write something like the one below in BODY.<br />
<pre class="crayon-plain-tag">{
  "operation": "query",
  "query": "SELECT Id, Name\r\nFROM Account"
}</pre>
The above is for below (with a new line)<br />
<pre class="crayon-plain-tag">SELECT Id, Name
FROM Account</pre>
<div id="attachment_9516" style="width: 690px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-call-salesforce-bulk-api-query-soql-sql.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9516" class="size-full wp-image-9516" src="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-call-salesforce-bulk-api-query-soql-sql.png" alt="Create Job - Call Bulk API to Read / Query using SOQL" width="680" height="547" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-call-salesforce-bulk-api-query-soql-sql.png 680w, https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-call-salesforce-bulk-api-query-soql-sql-300x241.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></a><p id="caption-attachment-9516" class="wp-caption-text">Create Job &#8211; Call Bulk API to Read / Query using SOQL</p></div></li>
<li>Now Click Test Request (Copy the <strong>JobId</strong> which we will use in the Variable for Designtime Testing)</li>
<li>On the Response Tab, configure it like the below.<br />
&#8211; Select Response content Type = Json<br />
&#8211; Enter <strong>$.id</strong> as the expression<br />
&#8211; Check Save response option<br />
&#8211; Select Save to Variable and click New to create a variable. Name it <strong>JobId</strong> and enter a sample <strong>JobId</strong> value (copied from the previous step)</p>
<div id="attachment_9517" style="width: 459px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-call-salesforce-bulk-api-extract-jobid-from-result.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9517" class="size-full wp-image-9517" src="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-call-salesforce-bulk-api-extract-jobid-from-result.png" alt="Extract Salesforce JobId save to SSIS Variable" width="449" height="236" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-call-salesforce-bulk-api-extract-jobid-from-result.png 449w, https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-call-salesforce-bulk-api-extract-jobid-from-result-300x158.png 300w" sizes="(max-width: 449px) 100vw, 449px" /></a><p id="caption-attachment-9517" class="wp-caption-text">Extract Salesforce JobId save to SSIS Variable</p></div></li>
</ol>
<h3>Do Status Check &#8211; Look for JobComplete</h3>
<p>Once we create a job and store JobId in the variable we have to keep <a href="https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/query_get_one_job.htm" target="_blank" rel="noopener">checking Job status</a> every X seconds. Don&#8217;t worry you don&#8217;t have to use Loop or timer control for that. ZappySys made it so simple to check such thing without Loop /Timer.</p>
<ol>
<li>Drag and drop the ZS Salesforce API Task in the design surface.<img decoding="async" class="figureimage" title="SSIS Salesforce API Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/salesforce-api-task/ssis-salesforce-api-task-drag.png" alt="SSIS Salesforce API Task - Drag and Drop" /></li>
<li>Double click and configure like below. URL will be different this time. Use variable as below and replace your instance ID<br />
<pre class="crayon-plain-tag">https://{your-instance}.salesforce.com/services/data/v50.0/jobs/query/{{User::JobId}}</pre>
<div id="attachment_9518" style="width: 720px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-api-job-status-check.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9518" class="size-full wp-image-9518" src="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-api-job-status-check.png" alt="Check Salesforce Job Status Periodically (Without Loop + Timer Controls) " width="710" height="566" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-api-job-status-check.png 710w, https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-api-job-status-check-300x239.png 300w" sizes="(max-width: 710px) 100vw, 710px" /></a><p id="caption-attachment-9518" class="wp-caption-text">Check Salesforce Job Status Periodically (Without Loop + Timer Controls)</p></div></li>
<li>Now go to the Status Check Tab and configure it, as shown below. It will keep looking for the words below in the response to decide whether it is a Success or Failure. If those words are not found, they will be checked every 5 seconds (Maximum 1200 secs).<br />
&#8211; Check Enable Status Check option<br />
&#8211; For Success Value &#8211; Enter <strong>JobComplete</strong><br />
-Check Fail task option<br />
&#8211; Enter <strong>Cancel|Failed|Abort</strong> in the text box</p>
<div id="attachment_9519" style="width: 709px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-api-job-status-check-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9519" class="size-full wp-image-9519" src="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-api-job-status-check-2.png" alt="Configure Job Status Check Loop using Salesforce API Task" width="699" height="640" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-api-job-status-check-2.png 699w, https://zappysys.com/blog/wp-content/uploads/2022/01/ssis-salesforce-api-job-status-check-2-300x275.png 300w" sizes="(max-width: 699px) 100vw, 699px" /></a><p id="caption-attachment-9519" class="wp-caption-text">Configure Job Status Check Loop using Salesforce API Task</p></div></li>
</ol>
<h2></h2>
<h3>Read data (Compressed CSV Format)</h3>
<p>Last step is <a href="https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/query_get_job_results.htm" target="_blank" rel="noopener">read the result</a> from completed Salesforce Job. Its in CSV format so we will use Advanced <a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-file-source-flat-file-web-api/" target="_blank" rel="noopener">SSIS CSV Source</a> which supports API connection to Salesforce. For that, we will use the same Salesforce API Task used before.</p>
<ol>
<li>Drag and Drop SSIS Data Flow Task 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 DataFlow task to see DataFlow designer surface.</li>
<li>Here, In Visual Studio, drag and drop the ZS CSV Source (Web API or File) in the design panel<br />
<img decoding="async" class="figureimage" title="SSIS CSV Source (Web API or File) - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/csv-source/ssis-csv-file-source-drag.png" alt="SSIS CSV Source (Web API or File) - Drag and Drop" /></li>
<li>Double click on ZS CSV Source (Web API or File) Configure it like below.<br />
&#8211; Enter URL to read result like this (You can supply OPTIONAL maxRecords parameters to control how much data comes in a single response)<br />
<pre class="crayon-plain-tag">https://{your-instance}.salesforce.com/services/data/v50.0/jobs/query/{{User::JobId}}/results
--OR--
https://{your-instance}.salesforce.com/services/data/v50.0/jobs/query/{{User::JobId}}/results?maxRecords=50000</pre>
&#8211; Check Use Credentials and select Salesforce Connection<br />
&#8211; Click Preview (assuming JobId variable has a valid completed JobId)</p>
<div id="attachment_9520" style="width: 689px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/read-salesforce-data-bulk-api-csv-result.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9520" class="size-full wp-image-9520" src="https://zappysys.com/blog/wp-content/uploads/2022/01/read-salesforce-data-bulk-api-csv-result.png" alt="Read Salesforce Bulk API Job Result - Using SSIS CSV / API Source" width="679" height="663" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/read-salesforce-data-bulk-api-csv-result.png 679w, https://zappysys.com/blog/wp-content/uploads/2022/01/read-salesforce-data-bulk-api-csv-result-300x293.png 300w" sizes="(max-width: 679px) 100vw, 679px" /></a><p id="caption-attachment-9520" class="wp-caption-text">Read Salesforce Bulk API Job Result &#8211; Using SSIS CSV / API Source</p></div></li>
<li>Now, set up Pagination as below to read all records using an automated loop. You will need <strong>VERSION Released after Jun 20, 2022</strong> to use Regular Expression feature in Header Value extractionBy default, Salesforce doesn&#8217;t send all records in response so we <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/#Method-7_REST_APIPagination_using_Cursor_Continuation_Token_from_Response_Header" target="_blank" rel="noopener">need to setup pagination</a>. In below example we are reading <strong>Sforce-Locator</strong> attribute from Response and sending it to the next URL as <strong>locator=&lt;continue-token&gt;</strong> value<br />
&#8211; Choose <strong>Response Header Contains Continue Token </strong><br />
&#8211; Enter below expression in <strong>Page Num Indicator</strong><br />
<pre class="crayon-plain-tag">locator=Sforce-Locator(^((?!null\b).)*$)</pre>
Basically, the above expression will keep looping until we find <strong>Sforce-Locator : null</strong> in the response header.</p>
<div id="attachment_9723" style="width: 872px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-bulk-query-api-pagination-read-csv-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9723" class="size-full wp-image-9723" src="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-bulk-query-api-pagination-read-csv-data.png" alt="Pagination for Salesforce Bulk Query API (Get Header Value from Sforce-Locator)" width="862" height="523" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-bulk-query-api-pagination-read-csv-data.png 862w, https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-bulk-query-api-pagination-read-csv-data-300x182.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-bulk-query-api-pagination-read-csv-data-768x466.png 768w" sizes="(max-width: 862px) 100vw, 862px" /></a><p id="caption-attachment-9723" class="wp-caption-text">Pagination for Salesforce Bulk Query API (Get Header Value from Sforce-Locator)</p></div></li>
<li>Click OK to save and now run entire package like below.</li>
</ol>
<div id="attachment_9515" style="width: 671px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-query-bulk-api-read-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9515" class="size-full wp-image-9515" src="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-query-bulk-api-read-data.png" alt="Query Salesforce Data using Bulk API in SSIS (read using SOQL query in Bulk mode / large dataset)" width="661" height="330" srcset="https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-query-bulk-api-read-data.png 661w, https://zappysys.com/blog/wp-content/uploads/2022/01/salesforce-query-bulk-api-read-data-300x150.png 300w" sizes="(max-width: 661px) 100vw, 661px" /></a><p id="caption-attachment-9515" class="wp-caption-text">Query Salesforce Data using Bulk API in SSIS (read using SOQL query in Bulk mode / large dataset)</p></div>
<h2>Conclusion</h2>
<p>In this article we saw how to use various ZappySys Components / Task to achieve complex Salesforce API calls to read Query data using Bulk API. Download <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> and try yourself and also explore 70+ other tasks /components not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/query-salesforce-data-using-bulk-api-ssis/">How to query salesforce data using Bulk API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to register Salesforce App and obtain Client ID / Secret (for API Call / OAuth)</title>
		<link>https://zappysys.com/blog/register-salesforce-app-obtain-client-id-secret-oauth-api-call/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 27 Dec 2021 20:40:45 +0000</pubDate>
				<category><![CDATA[Salesforce Driver]]></category>
		<category><![CDATA[SSIS Salesforce Connection]]></category>
		<category><![CDATA[SSIS Salesforce Destination]]></category>
		<category><![CDATA[SSIS Salesforce Source]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9482</guid>

					<description><![CDATA[<p>Introduction Using Salesforce Connection with OAuth App in SSIS / ODBC Once you have Client ID / Secret, you can use it in the Salesforce Connection in SSIS Connector / ODBC Driver for Salesforce like below (Only the new version will have OAuth option) Troubleshooting Known Issues Let&#8217;s look at some common issues with Salesforce [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/register-salesforce-app-obtain-client-id-secret-oauth-api-call/">How to register Salesforce App and obtain Client ID / Secret (for API Call / OAuth)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="content_block" id="custom_post_widget-9476">In this section, we will discuss how to register OAuth App to call Salesforce API using Client ID / Secret rather than using your User Id / Password.

Once you follow these steps below to register your Salesforce App (OAuth App), at the end you will get a Client ID (sometimes referred to as App Id) and Client Secret (or App Secret). These two pieces can be used later on to call Salesforce API using OAuth.

So let's get started.
<h3>Register Salesforce App (OAuth)</h3>
<ol>
 	<li>Login into your account and go to <strong><em>Setup</em> </strong>as shown below (click on gear icon at the top right corner):
<img loading="lazy" decoding="async" src="https://zappysys.zendesk.com/attachments/token/7D9Rx9qHJswkt28sC5vTggrNT/?name=inline-1178316509.png" alt="Accessing Salesforce Setup to create an OAuth App" width="342" height="233" data-original-height="233" data-original-width="342" /></li>
 	<li>Then in the search bar input "app" and open <strong><em>App Manager</em></strong>:
<img loading="lazy" decoding="async" src="https://zappysys.zendesk.com/attachments/token/DTjFQpyDw4NViKdJyhyFkO1ng/?name=inline1698967483.png" alt="Searching Salesforce App Manager to create an OAuth App" width="689" height="364" data-original-height="364" data-original-width="689" /></li>
 	<li>Then click <strong><em>New Connected App</em></strong> to create a new OAuth App:
<strong>NOTE:</strong> In some version, it may say <strong><strong>New External Client App
</strong></strong>
<p data-start="1271" data-end="1309">Look for one of the following buttons:</p>

<ul data-start="1310" data-end="1395">
 	<li data-start="1310" data-end="1348">
<p data-start="1312" data-end="1348"><strong data-start="1312" data-end="1333">New Connected App</strong> (Classic name)</p>
</li>
 	<li data-start="1349" data-end="1395">
<p data-start="1351" data-end="1395"><strong data-start="1351" data-end="1378">New External Client App</strong> (Lightning name)</p>
</li>
</ul>
<img loading="lazy" decoding="async" src="https://zappysys.zendesk.com/attachments/token/eD6OrA9TqfRuM5N41Vqd7nrvb/?name=inline684283902.png" alt="Creating a Salesforce App to get data via ODBC driver" width="867" height="327" data-original-height="327" data-original-width="867" /></li>
 	<li>Give your App a name and:
- Enable OAuth Settings
- Set callback URL to following two URLs (one in each line)
<strong><em>https://login.salesforce.com/services/oauth2/success
</em></strong><em><strong>https://zappysys.com/oauth</strong></em>
- Add an OAuth scope you want or simply add "<strong><em>Full access</em></strong>".
- Add "<strong><em>Perform requests on your behalf at any time (offline_token)</em></strong>" scope to get a refresh token so that you don't have to re-authenticate each time requesting an access token:<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource.png"><img loading="lazy" decoding="async" class="wp-image-4267 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource.png" alt="Configuring Salesforce App OAuth settings to get data via ODBC driver" width="1041" height="700" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource.png 1041w, https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource-768x516.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource-1024x689.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource-272x182.png 272w" sizes="(max-width: 1041px) 100vw, 1041px" /></a>

<span style="text-decoration: underline; color: #800000;"><strong>IMPORTANT:</strong></span> You can use "<strong>Access and manage your data (api)</strong>" if you do not like to grant full permission to this app but make sure you request same permission from the caller app too  (Example on ZappySys Salesforce Connection UI -&gt; Advanced Tab -&gt; Set scope as "<strong>api offline_access</strong>" rather than "<strong>full offline_access</strong>"</li>
 	<li>Click "Save".</li>
</ol>
<h3>Get Client Id and Client Secret for Salesforce Connected App</h3>
Once the App is created, we need to find out the App Id / Secret so we can use it for API calls.
<ol>
 	<li>Go to App Manager</li>
 	<li>Find out the recently created App and click View (click on the small arrow to the right)
<a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9477" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings.png" alt="" width="1029" height="413" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings.png 1029w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings-300x120.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings-768x308.png 768w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings-1024x411.png 1024w" sizes="(max-width: 1029px) 100vw, 1029px" /></a></li>
 	<li>Once App page is loaded you can Copy <strong>Consumer Key</strong> and <strong>Consumer Secret</strong> (click on reveal to see). Also copy anyone Call back URL (We will need this for OAuth Connection &gt; Advanced Tab &gt; Call Back URL or Redirect URL property depending on which ZappySys Product / Driver you are using)
<a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9478" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl.png" alt="" width="974" height="554" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl.png 974w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl-300x171.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl-768x437.png 768w" sizes="(max-width: 974px) 100vw, 974px" /></a></li>
 	<li>That's it, you can now use these 3 pieces to ZappySys <strong>OAuth connection UI</strong> or on <strong>Salesforce Connection UI</strong> (new version with OAuth support). The above screenshot shows where to enter these 3 pieces in the New Salesforce Connection. For the OAuth Connection, the redirect URL goes to the Advanced Tab &gt; Callback URL textbox.</li>
</ol>
<h3>Get Client Id and Secret for Salesforce External Client App</h3>
If you created a new App by clicking on the <strong>New External Client App</strong> button, then your App may not be visible in the App Manager Screen. In that case, find it below way.

[caption id="attachment_11637" align="alignnone" width="1222"]<a href="https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-11637" src="https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret.jpg" alt="" width="1222" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret.jpg 1222w, https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret-300x180.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret-1024x614.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret-768x461.jpg 768w" sizes="(max-width: 1222px) 100vw, 1222px" /></a> Get Client Id, Client Secret - For New External Client App[/caption]
<h3>Enable Client Credentials Grant (Non-Interactive Run-As)</h3>
If you like to enable Non-Interactive mode, just like UserId / Password Authentication, but without actually passing a real UserId or Password on the Connection UI, then you can enable Client Credentials Flow as below.

<strong>NOTE:</strong> Only the New version of ZappySys Salesforce Connection supports Client Credentials Grant. <span style="text-decoration: underline;"><strong>Version released after Nov 1, 2025 supports this grant type</strong></span>.

[caption id="attachment_11639" align="alignnone" width="419"]<a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-client-credentials-grant-runas.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-11639" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-client-credentials-grant-runas.jpg" alt="" width="419" height="480" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-client-credentials-grant-runas.jpg 419w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-client-credentials-grant-runas-262x300.jpg 262w" sizes="(max-width: 419px) 100vw, 419px" /></a> Enable Salesforce Client Credentials Grant (Run As)[/caption]
<h3>(OPTIONAL) Configure Salesforce OAuth refresh token validity</h3>
By default, Salesforce Refresh Token doesn't expire once you generate. If you want to change the default behavior, follow these steps.
<ol>
 	<li>Go to "<strong>Manage Connected Apps</strong>" menu item and press on your App name:<img loading="lazy" decoding="async" class="wp-image-4298 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-oauth-app-policy-management-2.png" alt="Finding Salesforce App to configure its policies" width="660" height="410" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-oauth-app-policy-management-2.png 660w, https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-oauth-app-policy-management-2-300x186.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-oauth-app-policy-management-2-436x272.png 436w" sizes="(max-width: 660px) 100vw, 660px" /></li>
 	<li>Click "Edit Policies" to configure refresh token validity:
<img loading="lazy" decoding="async" class="wp-image-4271 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/edit-salesforce-connected-app-policies.png" alt="Editing Salesforce App OAuth refresh token issuing policy" width="680" height="391" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/edit-salesforce-connected-app-policies.png 680w, https://zappysys.com/blog/wp-content/uploads/2018/06/edit-salesforce-connected-app-policies-300x173.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></li>
 	<li>Set "<strong>All users may self-authorize</strong>" and "<strong>Refresh token is valid until revoked</strong>" options:<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png"><img loading="lazy" decoding="async" class="wp-image-4273 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png" alt="Making Salesforce App OAuth refresh token to never expire" width="870" height="498" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png 870w, https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1-300x172.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1-768x440.png 768w" sizes="(max-width: 870px) 100vw, 870px" /></a></li>
 	<li>Click "Save".</li>
</ol>
<h3></h3></div>
<h2>Using Salesforce Connection with OAuth App in SSIS / ODBC</h2>
<p>Once you have Client ID / Secret, you can use it in the Salesforce Connection in SSIS Connector / ODBC Driver for Salesforce like below (Only the new version will have OAuth option)</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-connection-using-oauth-app-clientid-secret.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9513" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-connection-using-oauth-app-clientid-secret.png" alt="" width="604" height="383" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-connection-using-oauth-app-clientid-secret.png 604w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-connection-using-oauth-app-clientid-secret-300x190.png 300w" sizes="(max-width: 604px) 100vw, 604px" /></a></p>
<h2>Troubleshooting Known Issues</h2>
<p>Let&#8217;s look at some common issues with Salesforce Connection and how to fix them.</p>
<h3>OAuth Error: Missing Required Code Challenge</h3>
<p>When you click Generate Token button, you may get an error like the one below.</p>
<div id="attachment_11066" style="width: 767px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-pkce-verfier-error-missing-required-code-challenge.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11066" class="size-full wp-image-11066" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-pkce-verfier-error-missing-required-code-challenge.png" alt="Salesforce OAuth Generate Token Error - Missing Required Code Challenge" width="757" height="571" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-pkce-verfier-error-missing-required-code-challenge.png 757w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-pkce-verfier-error-missing-required-code-challenge-300x226.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></a><p id="caption-attachment-11066" class="wp-caption-text">Salesforce OAuth Generate Token Error &#8211; Missing Required Code Challenge</p></div>
<p><strong>Solution</strong></p>
<p>Here is how to fix it.</p>
<p>For Salesforce Connection UI: Go to Advanced Tab =&gt; Check Enable PKCE Code Verifier option<br />
&#8211;OR&#8211;<br />
For OAuth Connection UI: Go to OAuth2 Grant Options Tab =&gt; Check Enable Code Verifier Option</p>
<div id="attachment_11067" style="width: 1384px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11067" class="size-full wp-image-11067" src="https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option.png" alt="Enable PKCE code verifier option - OAuth Connection for Salesforce" width="1374" height="637" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option.png 1374w, https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option-300x139.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option-1024x475.png 1024w, https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option-768x356.png 768w" sizes="(max-width: 1374px) 100vw, 1374px" /></a><p id="caption-attachment-11067" class="wp-caption-text">Enable PKCE code verifier option &#8211; OAuth Connection for Salesforce.</p></div>
<p>The post <a href="https://zappysys.com/blog/register-salesforce-app-obtain-client-id-secret-oauth-api-call/">How to register Salesforce App and obtain Client ID / Secret (for API Call / OAuth)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to register App for Dynamics CRM 365 / CDS / Dataverse API (Azure AD / OAuth)</title>
		<link>https://zappysys.com/blog/register-app-dynamics-crm-365-cds-dataverse-api-azure-ad-oauth/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 29 Nov 2021 21:20:53 +0000</pubDate>
				<category><![CDATA[SSIS Dynamics CRM Connection]]></category>
		<category><![CDATA[SSIS Dynamics CRM Destination]]></category>
		<category><![CDATA[SSIS Dynamics CRM Source]]></category>
		<category><![CDATA[d365]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[Microsoft Dynamics 365]]></category>
		<category><![CDATA[oauth]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9444</guid>

					<description><![CDATA[<p>Introduction In this article, we will show you step by step approach on how to register an Azure AD (Active Directory) app to access Dynamics CRM 365 API (also same for CDS / Dataverse API). You might have heard that Microsoft is deprecating an older way of authenticating (i.e. User ID / Password-based WS-Trust Authentication) [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/register-app-dynamics-crm-365-cds-dataverse-api-azure-ad-oauth/">How to register App for Dynamics CRM 365 / CDS / Dataverse API (Azure AD / OAuth)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we will show you step by step approach on how to register an Azure AD (Active Directory) app to access Dynamics CRM 365 API (also same for CDS / Dataverse API). You might have heard that <a href="https://zappysys.zendesk.com/hc/en-us/articles/5258505448347">Microsoft is deprecating</a> an older way of authenticating (i.e. User ID / Password-based <strong>WS-Trust</strong> Authentication) on <strong>April 2022</strong>. You must update your jobs / code to use OAuth 2.0 by April 2022 for any CRM related API calls.</p>
<p>In other words rather than User Id / password now you can use more secure way by using <strong>OAuth</strong> rather than WS-Trust.</p>
<p>Going forward Microsoft wants you to use OAuth Token rather than user name/password to call Dynamics CRM 365 API programmatically.</p>
<p><a href="https://docs.microsoft.com/en-us/power-platform/important-changes-coming#deprecation-of-office365-authentication-type-and-organizationserviceproxy-class-for-connecting-to-dataverse" target="_blank" rel="noopener">Here is the official link which describes the dates for WS-Trust sunset</a></p>
<h2>Register App for CRM / CDS / Dataverse in Azure / Active Directory</h2>
<p>The first step is to register your app in Azure Portal under Active Directory using the below steps.</p>
<ol>
<li>Ask your Active Directory Admin to login to Azure Portal and navigate to &gt; <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview" target="_blank" rel="noopener"><strong>Active Directory</strong></a> Blade.<br />
OR<br />
You can access it by searching &#8220;<strong>Azure Active directory</strong>&#8221; like below.</p>
<div id="attachment_9445" style="width: 403px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9445" class="size-full wp-image-9445" src="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory.png" alt="Open Azure Active Directory" width="393" height="224" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory.png 393w, https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-300x171.png 300w" sizes="(max-width: 393px) 100vw, 393px" /></a><p id="caption-attachment-9445" class="wp-caption-text">Open Azure Active Directory</p></div></li>
<li>Now click on the <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps" target="_blank" rel="noopener"><strong>App Registrations</strong></a> icon and click <strong><strong>New App Registration<br />
</strong></strong></p>
<div id="attachment_9446" style="width: 535px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-new-app-registration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9446" class="size-full wp-image-9446" src="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-new-app-registration.png" alt="New App Registrations under Azure Active Directory" width="525" height="275" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-new-app-registration.png 525w, https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-new-app-registration-300x157.png 300w" sizes="(max-width: 525px) 100vw, 525px" /></a><p id="caption-attachment-9446" class="wp-caption-text">New App Registrations under Azure Active Directory</p></div></li>
<li>Now next step is to give your <strong>App name</strong> to identify easily. Select App is used for your Org only option (Default) and last enter <strong>Redirect URL</strong> as below (This URL is used for 3-legged Authorization Code Grant only). We prefer you enter a URL which is OAuth friendly (If you don&#8217;t know one Use <pre class="crayon-plain-tag">https://zappysys.com/oauth</pre>  this is <strong>recommended</strong> URL if you working with ZappySys Products)
<div id="attachment_9447" style="width: 563px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/register-azure-active-directory-app-with-redirect-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9447" class="size-full wp-image-9447" src="https://zappysys.com/blog/wp-content/uploads/2021/11/register-azure-active-directory-app-with-redirect-url.png" alt="Azure AD App Registration - Single / Multi Tenant with Redirect URl (i.e. Call back)" width="553" height="708" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/register-azure-active-directory-app-with-redirect-url.png 553w, https://zappysys.com/blog/wp-content/uploads/2021/11/register-azure-active-directory-app-with-redirect-url-234x300.png 234w" sizes="(max-width: 553px) 100vw, 553px" /></a><p id="caption-attachment-9447" class="wp-caption-text">Azure AD App Registration &#8211; Single / Multi-Tenant with Redirect URL (i.e. Call back)</p></div>
<p>&nbsp;</li>
<li>Now once App is created you can find the Application (Client) Id from overview page
<div id="attachment_10130" style="width: 633px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-find-application-client-id-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10130" class="wp-image-10130 size-full" src="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-find-application-client-id-1.png" alt="azure-ad-app-find-application-client-id" width="623" height="360" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-find-application-client-id-1.png 623w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-find-application-client-id-1-300x173.png 300w" sizes="(max-width: 623px) 100vw, 623px" /></a><p id="caption-attachment-10130" class="wp-caption-text">Azure AD App &#8211; Find Application / Client Id on overview page</p></div></li>
</ol>
<h2>Add API Permissions for the App</h2>
<p>Once App is created we need to Add Permission. Basically, we will set which style of APIs can be called by this App and what Actions can be performed.<br />
<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;">For Apps specific to CRM / CDS / Dataverse API, actual app permissions are controlled by User Roles. Check later in this article how to associate one or more Roles to this AD App so it can perform certation actions via API call</div></div>
<ol>
<li>To add API Permissions for this AD App click on <strong>API Permissions</strong> and then click on <strong>Add Permission</strong>
<div id="attachment_9449" style="width: 439px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-add-api-permission.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9449" class="size-full wp-image-9449" src="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-add-api-permission.png" alt="Add API Permissions for Azure AD App" width="429" height="517" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-add-api-permission.png 429w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-add-api-permission-249x300.png 249w" sizes="(max-width: 429px) 100vw, 429px" /></a><p id="caption-attachment-9449" class="wp-caption-text">Add API Permissions for Azure AD App</p></div></li>
<li>Find the Dynamics CRM icon and click on it
<div id="attachment_9450" style="width: 669px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9450" class="size-full wp-image-9450" src="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm.png" alt="Add API Permission for Dynamics CRM API access (Azure AD App)" width="659" height="709" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm.png 659w, https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-279x300.png 279w" sizes="(max-width: 659px) 100vw, 659px" /></a><p id="caption-attachment-9450" class="wp-caption-text">Add API Permission for Dynamics CRM API access (Azure AD App)</p></div></li>
<li>Now you will see just one permission for Dynamics CRM (user_impersonation). As we said earlier for Dynamics CRM API security is controlled by User Roles in CRM Portal itself which will see in the next section. For now, just choose <strong>Delegated Permissions</strong>,  check <strong>user_impersonation</strong> and click <strong>Add Permissions</strong>
<div id="attachment_9451" style="width: 661px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-step2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9451" class="size-full wp-image-9451" src="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-step2.png" alt="Select API Permissions for Dynamics CRM App (Azure AD App)" width="651" height="608" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-step2.png 651w, https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-step2-300x280.png 300w" sizes="(max-width: 651px) 100vw, 651px" /></a><p id="caption-attachment-9451" class="wp-caption-text">Select API Permissions for Dynamics CRM App (Azure AD App)</p></div></li>
<li>Now the last step in Adding API permissions is Grant Admin Consent. If you are logged in as an Azure AD User with the correct admin role then no worries else you have to ask your Azure AD admin to consent for you so this App can be used to read/write data from CRM.</li>
</ol>
<h2>Create Client Secret</h2>
<p>Once App is created next step is to generate a Client Secret. Perform the following steps to create a secret that you can use when you call API</p>
<ol>
<li>Click on Certificates and Secrets and then New Secret
<div id="attachment_9453" style="width: 1008px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9453" class="size-full wp-image-9453" src="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret.png" alt="Azure AD App Create Client Secret / Set Name, Expiration Date" width="998" height="540" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret.png 998w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret-300x162.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret-768x416.png 768w" sizes="(max-width: 998px) 100vw, 998px" /></a><p id="caption-attachment-9453" class="wp-caption-text">Azure AD App Create Client Secret / Set Name, Expiration Date</p></div></li>
<li>Enter Name for Secret (You can give some friendly name if you create multiple secrets to control multiple processes). For example SecretForTesting, SecretForProduction etc.Select a longer expiration date (i.e. 24 months) if you don&#8217;t like to change secret often in production jobs else choose shorter expiration (i.e. 6 Months or Custom).</li>
<li>Once you Create a Secret make sure you copy it to a secure location. Once the page is closed it won&#8217;t appear again.
<div id="attachment_9454" style="width: 639px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-copy-client-secret-after-create.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9454" class="size-full wp-image-9454" src="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-copy-client-secret-after-create.png" alt="Copy Client Secret for Azure AD App" width="629" height="233" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-copy-client-secret-after-create.png 629w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-copy-client-secret-after-create-300x111.png 300w" sizes="(max-width: 629px) 100vw, 629px" /></a><p id="caption-attachment-9454" class="wp-caption-text">Copy Client Secret for Azure AD App</p></div></li>
</ol>
<h2>Associate App User / Set Roles in CRM 365 / Dataverse Environment</h2>
<p>Once we have App Id and Client Secret we can go to CRM Portal to add our App as a valid CRM User. And the last step will be to attach some role(s) to App User (See Next section).</p>
<h3>Method-1 (New way)</h3>
<p>Here are the steps to configure User / Security Roles in New account. Below steps will give you access to Dataverse Entities via API Call. To see all Dataverse Entity you can log in to <a href="https://make.powerapps.com/" target="_blank" rel="noopener">https://make.powerapps.com/</a> and click <strong>Tables</strong></p>
<ol>
<li>Click on the below link to login to new portal to manage CRM /Dataverse environment<br />
<a href="https://admin.powerplatform.microsoft.com/environments" target="_blank" rel="noopener">https://admin.powerplatform.microsoft.com/environments</a></li>
<li>Create an Application User <a href="https://docs.microsoft.com/en-us/power-platform/admin/manage-application-users?WT.mc_id=ppac_inproduct_settings">using these steps</a> (When prompted choose the same App we created in the previous section)</li>
<li>Now Go to App Users Screen and Edit Security Roles using the below steps
<div id="attachment_9579" style="width: 698px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-environments.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9579" class="size-full wp-image-9579" src="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-environments.png" alt="See available CRM 365 Online / Datavese Environments" width="688" height="345" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-environments.png 688w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-environments-300x150.png 300w" sizes="(max-width: 688px) 100vw, 688px" /></a><p id="caption-attachment-9579" class="wp-caption-text">See available CRM 365 Online / Datavese Environments</p></div>
<div id="attachment_9580" style="width: 955px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9580" class="size-full wp-image-9580" src="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users.png" alt="See available CRM 365 Online / Datavese Application Users" width="945" height="530" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users.png 945w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users-300x168.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users-768x431.png 768w" sizes="(max-width: 945px) 100vw, 945px" /></a><p id="caption-attachment-9580" class="wp-caption-text">See available CRM 365 Online / Datavese Application Users</p></div>
<div id="attachment_9581" style="width: 1375px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9581" class="size-full wp-image-9581" src="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles.png" alt="Edit Security Roles for CRM 365 Online / Datavese Application Users" width="1365" height="581" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles.png 1365w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles-300x128.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles-768x327.png 768w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles-1024x436.png 1024w" sizes="(max-width: 1365px) 100vw, 1365px" /></a><p id="caption-attachment-9581" class="wp-caption-text">Edit Security Roles for CRM 365 Online / Datavese Application Users</p></div></li>
</ol>
<h3>Method-2 (Legacy)</h3>
<p>If you prefer to use an older interface (and it&#8217;s still available to you) then you can use the below steps to perform the same thing we described in the previous section.</p>
<p>NOTE: Microsoft may soon retire the older interface and force to use the previous way only.</p>
<ol>
<li>To Add our Azure AD App as CRM Application user goto your CRM Portal. Click on <strong>Gear icon</strong> for Settings &gt; <strong>Advanced Settings</strong>
<div id="attachment_9456" style="width: 605px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9456" class="size-full wp-image-9456" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-settings.png" alt="Dynamics CRM Advanced Settings" width="595" height="344" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-settings.png 595w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-settings-300x173.png 300w" sizes="(max-width: 595px) 100vw, 595px" /></a><p id="caption-attachment-9456" class="wp-caption-text">Dynamics CRM Advanced Settings</p></div></li>
<li>Click on Settings dropdown &gt; <strong>Security</strong> (Under System Column)
<div id="attachment_9457" style="width: 826px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9457" class="size-full wp-image-9457" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings.png" alt="Dynamics CRM Security Settings (Under Advanced Settings - System)" width="816" height="438" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings.png 816w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings-300x161.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings-768x412.png 768w" sizes="(max-width: 816px) 100vw, 816px" /></a><p id="caption-attachment-9457" class="wp-caption-text">Dynamics CRM Security Settings (Under Advanced Settings &#8211; System)</p></div></li>
<li>On the security, screen click on the <strong><strong>Users icon<br />
</strong></strong></p>
<div id="attachment_9458" style="width: 396px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-users.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9458" class="size-full wp-image-9458" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-users.png" alt="Manage Dynamics CRM Users / Roles (Add, Edit, Delete)" width="386" height="269" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-users.png 386w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-users-300x209.png 300w" sizes="(max-width: 386px) 100vw, 386px" /></a><p id="caption-attachment-9458" class="wp-caption-text">Manage Dynamics CRM Users (Add, Edit, Delete)</p></div></li>
<li>Once User Screen shows up click on the User Type <strong>Dropdown</strong> and choose <strong>Application Users</strong> and click <strong>New</strong>
<div id="attachment_9455" style="width: 425px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-365-add-new-application-user.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9455" class="size-full wp-image-9455" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-365-add-new-application-user.png" alt="Add new Application User in Dynamics CRM" width="415" height="305" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-365-add-new-application-user.png 415w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-365-add-new-application-user-300x220.png 300w" sizes="(max-width: 415px) 100vw, 415px" /></a><p id="caption-attachment-9455" class="wp-caption-text">Add new Application User in Dynamics CRM</p></div></li>
<li>Once User screen shows up. Enter your <strong>Application Id</strong> (obtained from the Azure AD App &gt; Overview screen &#8211; app created earlier). <strong>Click Save</strong> and you will notice all other fields auto populates.
<div id="attachment_10132" style="width: 681px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/create-dynamics-crm-application-user-link-azure-ad-app-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10132" class="wp-image-10132 size-full" src="https://zappysys.com/blog/wp-content/uploads/2021/11/create-dynamics-crm-application-user-link-azure-ad-app-1.png" alt="create-dynamics-crm-application-user-link-azure-ad-app" width="671" height="835" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/create-dynamics-crm-application-user-link-azure-ad-app-1.png 671w, https://zappysys.com/blog/wp-content/uploads/2021/11/create-dynamics-crm-application-user-link-azure-ad-app-1-241x300.png 241w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-10132" class="wp-caption-text">Adding Azure AD App as Dynamics CRM 365 &#8211; Application User</p></div></li>
<li>And the last step is to Attach some CRM Role to the new Application User.<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;">For demo purposes we will choose &#8220;System Admin&#8221; but for production use, you should grant correct permission carefully. There are many inbuilt roles you can choose from.</div></div>
<div id="attachment_10133" style="width: 893px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10133" class="wp-image-10133 size-full" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1.png" alt="dynamics-crm-manage-application-user-roles" width="883" height="766" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1.png 883w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1-300x260.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1-768x666.png 768w" sizes="(max-width: 883px) 100vw, 883px" /></a><p id="caption-attachment-10133" class="wp-caption-text">Associate Security Role(s) for Dynamics CRM Application User</p></div></li>
</ol>
<h2></h2>
<h2>Find your Organization Id for CRM / Dataverse API calls</h2>
<p>Now find your Org Id before we can call CRM / Dataverse APIs in the next section.</p>
<p>To find your Org Id you can perform the following steps.</p>
<p><strong>Method-1 (New way &#8211; Dataverse Portal)</strong></p>
<ol>
<li>Go to <a href="https://admin.powerplatform.microsoft.com/" target="_blank" rel="noopener">https://admin.powerplatform.microsoft.com/</a></li>
<li>Click on the Environment you like to access</li>
<li>On the Details, page copy your Org Id from the Environment URL For example URL might look like below&#8230; You just need to copy the first part (Use this on CRM Connection &gt; Organization Field)<br />
<span style="text-decoration: underline;"><strong>org8640f7e7</strong></span>.crm.dynamics.com</p>
<div id="attachment_10134" style="width: 752px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/microsoft-dataverse-crm-api-get-organization-id-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10134" class="wp-image-10134 size-full" src="https://zappysys.com/blog/wp-content/uploads/2021/11/microsoft-dataverse-crm-api-get-organization-id-1.png" alt="microsoft-dataverse-crm-api-get-organization-id" width="742" height="424" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/microsoft-dataverse-crm-api-get-organization-id-1.png 742w, https://zappysys.com/blog/wp-content/uploads/2021/11/microsoft-dataverse-crm-api-get-organization-id-1-300x171.png 300w" sizes="(max-width: 742px) 100vw, 742px" /></a><p id="caption-attachment-10134" class="wp-caption-text">How to find Organization Id for Microsoft Dataverse / CDS / CRM 365 API calls</p></div></li>
</ol>
<p><strong>Method-2 (Old way)</strong></p>
<p>Another way to find your Organization Id is from CRM Portal</p>
<p>If you have multiple environments (i.e. Prod, Sandbox) then each environment might have its own unique URL)</p>
<ol>
<li>To find your API Service URL, Click on <strong>Gear Icon</strong></li>
<li>Choose <strong>Advanced Settings</strong></li>
<li>Click down arrow on <strong>Settings</strong></li>
<li>Click <strong>Customization</strong></li>
<li>Click <strong>Developer Resource</strong> Link</li>
<li>On this page now you can see various URLs. For examples used in this article, we need to get is <strong>Service Root URL</strong> for <strong><strong>Web API</strong></strong>
<div id="attachment_10125" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10125" class="wp-image-10125 size-large" src="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-1024x626.png" alt="dynamics-crm-find-organization-url-soap-web-api" width="720" height="440" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-1024x626.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-300x183.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-768x469.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1.png 1028w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-10125" class="wp-caption-text">How to Find Organization Id / Web API URL / SOAP API Service URL (Unique Environment Instance URL)</p></div></li>
</ol>
<h2>Using Client ID (i.e. App Id) and Client Secret to Call Dynamics CRM 365 API / CDS / Dataverse</h2>
<p>That&#8217;s it now we are ready to use this App Id and Client Secret to make CRM API calls.</p>
<p>To confirm if it&#8217;s working you can create a Dynamics CRM Connection (using <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> ). Choose OAuth option on <a href="https://zappysys.com/blog/ssis-dynamics-crm-read-import-crm-365-onpremises/" target="_blank" rel="noopener">Dynamics CRM Connection</a></p>
<div id="attachment_9543" style="width: 899px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9543" class="size-full wp-image-9543" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api.png" alt="Connect to Dynamics CRM / Dataverse / PowerApps API using OAuth (Client ID /Secret)" width="889" height="646" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api.png 889w, https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api-300x218.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api-768x558.png 768w" sizes="(max-width: 889px) 100vw, 889px" /></a><p id="caption-attachment-9543" class="wp-caption-text">Connect to Dynamics CRM / Dataverse / PowerApps API using OAuth (Client ID /Secret)</p></div>
<h2>Conclusion</h2>
<p>In this article, we saw how to Register Azure AD App to call various Microsoft APIs (for this article we focused mainly on Dynamics CRM 365 API only)</p>
<p>The post <a href="https://zappysys.com/blog/register-app-dynamics-crm-365-cds-dataverse-api-azure-ad-oauth/">How to register App for Dynamics CRM 365 / CDS / Dataverse API (Azure AD / OAuth)</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 read Salesforce Metadata in SSIS using REST API (JSON Source)</title>
		<link>https://zappysys.com/blog/read-salesforce-metadata-ssis-using-rest-api-json-source/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 18 May 2020 16:13:07 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS Salesforce Connection]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[salesforce]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8909</guid>

					<description><![CDATA[<p>Introduction In our previous posts we saw how to read and write Salesforce Data using SSIS. In this post we will see how to read Salesforce Metadata in SSIS using JSON Source. Step-By-Step In this section you will learn how to use ZappySys JSON Source Adapter to extract data from Salesforce REST API (JSON Format). You [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-salesforce-metadata-ssis-using-rest-api-json-source/">How to read Salesforce Metadata in SSIS using REST API (JSON Source)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous posts we saw how to <a href="https://zappysys.com/blog/export-data-from-salesforce-to-sql-server-using-ssis/" target="_blank" rel="noopener">read</a> and <a href="https://zappysys.com/blog/loading-data-salesforce-using-ssis-bulk-insert-update-delete/" target="_blank" rel="noopener">write</a> Salesforce Data using SSIS. In this post we will see how to read Salesforce Metadata in SSIS using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a>.</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-By-Step</h2>
<p>In this section you will learn how to use ZappySys JSON Source Adapter to extract data from Salesforce REST API (JSON Format). You can call pretty much Any REST API to fetch data from salesforce but our example for this post would be read metadata (i.e. table list) from salesforce (we will call <a href="https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_basic_info.htm" target="_blank" rel="noopener">sobjects</a> to get all table information) .</p>
<p>So lets get started.</p>
<ol>
<li>In case you missed the previous section, You need to <b>Download and Install</b> SSIS <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack.</a></li>
<li>Once you finished first step, Open Visual Studio and Create New SSIS Package Project.</li>
<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 Data Flow 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>Now double click JSON Source enter any valid REST API URL like below. Make sure you used correct instance name. Using wrong instance name might slow down connection or fail your request. If you are not sure then just login to salesforce portal using credentials you like to use and observe browser URL.. It will have instance number.<br />
<pre class="crayon-plain-tag">https://na34.salesforce.com/services/data/v20.0/sobjects/Account/describe/</pre>
</li>
<li>Check Use Connection and select New <strong>ZS-Salesforce</strong> Connection from the list.
<div id="attachment_8918" style="width: 602px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/create-ssis-rest-api-connection-connect-http-oauth-salesforce.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8918" class="size-full wp-image-8918" src="https://zappysys.com/blog/wp-content/uploads/2018/07/create-ssis-rest-api-connection-connect-http-oauth-salesforce.png" alt="Create new REST API Connection in SSIS (For JSON, XML or CSV Source)" width="592" height="215" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/create-ssis-rest-api-connection-connect-http-oauth-salesforce.png 592w, https://zappysys.com/blog/wp-content/uploads/2018/07/create-ssis-rest-api-connection-connect-http-oauth-salesforce-300x109.png 300w" sizes="(max-width: 592px) 100vw, 592px" /></a><p id="caption-attachment-8918" class="wp-caption-text">Create new REST API Connection in SSIS (For JSON, XML or CSV Source)</p></div></li>
<li>Configure your salesforce connection<br />
<img decoding="async" class="figureimage" title="SSIS Salesforce Connection Manager UI " src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/salesforce-connection/ssis-salesforce-connection-manager-ui.png" alt="SSIS Salesforce Connection Manager UI " /></li>
<li>Select or type filter. For example in this case you will type <pre class="crayon-plain-tag">$.sobjects[*]</pre></li>
<li>Click OK to Save UI and attach your source to some target like OLEDB Destination and run your data flow to test.</li>
<li>Here is full UI after all configurations.
<div id="attachment_10310" style="width: 909px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10310" class="wp-image-10310 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list.png" alt="ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list" width="899" height="792" srcset="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list.png 899w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list-300x264.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-call-rest-api-get-metadata-eg-table-field-list-768x677.png 768w" sizes="(max-width: 899px) 100vw, 899px" /></a><p id="caption-attachment-10310" class="wp-caption-text">Read Salesforce Metadata in SSIS (Get Table List Example &#8211; SOObject REST API Call)</p></div></li>
</ol>
<h2>How to read Salesforce Table Fields Metadata</h2>
<p>If you have need to read fields and its information for tables then use below steps</p>
<ol>
<li>Use almost identical steps as previous section. Except two things. Our URL and Filter would be different.</li>
<li>Configure your API URL as below<br />
<pre class="crayon-plain-tag">https://YOUR-INSTANCE.salesforce.com/services/data/v20.0/sobjects/YOUR-TABLE/describe/</pre>
<strong>Example:</strong><br />
<pre class="crayon-plain-tag">https://demo.salesforce.com/services/data/v20.0/sobjects/Account/describe/</pre>
</li>
<li>Configure Filter as a <pre class="crayon-plain-tag">$.fields[*]</pre></li>
</ol>
<div id="attachment_10311" style="width: 902px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10311" class="wp-image-10311 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1.png" alt="ssis-salesforce-get-table-fields-metadata-1" width="892" height="757" srcset="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1.png 892w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1-300x255.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-salesforce-get-table-fields-metadata-1-768x652.png 768w" sizes="(max-width: 892px) 100vw, 892px" /></a><p id="caption-attachment-10311" class="wp-caption-text">Get Salesforce Table Fields Metadata using REST API call in SSIS</p></div>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-salesforce-metadata-ssis-using-rest-api-json-source/">How to read Salesforce Metadata in SSIS using REST API (JSON Source)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to connect to MongoDB Atlas Replica Set Cluster in SSIS</title>
		<link>https://zappysys.com/blog/connect-mongodb-atlas-ssis-replicaset/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 12 May 2020 17:41:27 +0000</pubDate>
				<category><![CDATA[SSIS MongoDB Connection]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[MongoDB]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8888</guid>

					<description><![CDATA[<p>Introduction In our previous post, we discovered how to read and write MongoDB data using ZappySys MongoDB Source and Destination SSIS connectors. However, it was all about connecting to the on-premises hosted version of MongoDB. In this post, we will focus on connecting specifically to the Replica Set Cluster in MongoDB Atlas (a cloud database service by MongoDB). After [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/connect-mongodb-atlas-ssis-replicaset/">How to connect to MongoDB Atlas Replica Set Cluster in SSIS</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="size-full wp-image-2115 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2017/08/mongodb-logo.png" alt="" width="88" height="88" />In our previous post, we discovered how to read and write MongoDB data using <a href="https://zappysys.com/products/ssis-powerpack/ssis-mongodb-source/" target="_blank" rel="noopener">ZappySys MongoDB Source</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-mongodb-destination/" target="_blank" rel="noopener">Destination</a> SSIS connectors. However, it was all about connecting to the on-premises hosted version of MongoDB. In this post, we will focus on connecting specifically to the <em>Replica Set Cluster </em>in <a href="https://www.mongodb.com/atlas/database" target="_blank" rel="noopener"><em>MongoDB Atlas</em></a> (a cloud database service by MongoDB). After you complete the steps listed below, you will be able to get and push data using the same MongoDB SSIS connectors, but this time — in MongoDB Atlas. Let&#8217;s not waste our precious time and begin!</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>MongoDB Atlas connection setup in SSIS</h2>
<p>In this article, we are going to demonstrate how to create the <em>MongoDB Connection Manager, </em>which is used by <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-executesql-task/">MongoDB ExecuteSQL Task</a>, <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-source/">MongoDB Source,</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-destination/">MongoDB Destination</a> SSIS connectors. Let&#8217;s start by following these simple steps:</p>
<ol style="margin-left: 1.5em;">
<li>First, <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download and install SSIS PowerPack</a>.</li>
<li>Once you installed SSIS PowerPack, open Visual Studio, and create a new SSIS project with a new SSIS package.</li>
<li>Then open the created package and right-click on the <em>Connection Managers</em> panel to create a new MongoDB connection. When a context menu appears, select the <em>New Connection&#8230;</em> menu item:<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>Next, select the <em>ZS-MONGODB</em> option from the connection manager list and click <em>Add&#8230;</em> button:<br />
<img decoding="async" class="figureimage" title="MongoDB Storage Connection" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/mongodb-connection/ssis-mongodb-executesql-task-connection.png" alt="MongoDB Connection" /></li>
<li>This will open the <em>MongoDB Connection Manager</em> configuration window. For now, let&#8217;s leave it open, and first go to your <a href="https://cloud.mongodb.com/" target="_blank" rel="noopener">MongoDB Atlas account</a> to get all MongoDB Atlas Cluster instance information for <em>MongoDB Connection Manager </em>configuration<em>.</em></li>
<li>Once you are on the MongoDB Atlas landing page, continue by selecting the cluster you want to connect to (<a href="https://docs.mongodb.com/guides/cloud/connectionstring/" target="_blank" rel="noopener">make sure you white-list your IP first</a>). After the window appears, select the <em>Compass</em> option:
<div id="attachment_10417" style="width: 753px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/connect-mongodb-atlas-ssis-replicaset/01-mongodb-atlas-select-shell-option-to-connect-to-ssis-3/#main" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10417" class="wp-image-10417 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/05/01-MongoDB-Atlas-select-shell-option-to-connect-to-SSIS-2.png" alt="" width="743" height="473" srcset="https://zappysys.com/blog/wp-content/uploads/2020/05/01-MongoDB-Atlas-select-shell-option-to-connect-to-SSIS-2.png 743w, https://zappysys.com/blog/wp-content/uploads/2020/05/01-MongoDB-Atlas-select-shell-option-to-connect-to-SSIS-2-300x191.png 300w" sizes="(max-width: 743px) 100vw, 743px" /></a><p id="caption-attachment-10417" class="wp-caption-text">Connecting to MongoDB Atlas Replica Set Cluster</p></div></li>
<li>Then proceed by simply copying and pasting the configuration information into the <em>MongoDB Connection Manager </em>we left to rest for a while. Move on by filling in your database credentials and the database you are connecting to. Also, don&#8217;t forget to enable SSL. Just patiently follow the numbers in orange circles below and you will be done faster than you think!
<div id="attachment_10415" style="width: 843px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/connect-mongodb-atlas-ssis-replicaset/02-mongodb-atlas-copy-the-connection-string-to-use-in-ssis-or-odbc-3/#main" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10415" class="wp-image-10415 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/05/02-MongoDB-Atlas-copy-the-connection-string-to-use-in-SSIS-or-ODBC-2.png" alt="" width="833" height="1289" srcset="https://zappysys.com/blog/wp-content/uploads/2020/05/02-MongoDB-Atlas-copy-the-connection-string-to-use-in-SSIS-or-ODBC-2.png 833w, https://zappysys.com/blog/wp-content/uploads/2020/05/02-MongoDB-Atlas-copy-the-connection-string-to-use-in-SSIS-or-ODBC-2-194x300.png 194w, https://zappysys.com/blog/wp-content/uploads/2020/05/02-MongoDB-Atlas-copy-the-connection-string-to-use-in-SSIS-or-ODBC-2-768x1188.png 768w, https://zappysys.com/blog/wp-content/uploads/2020/05/02-MongoDB-Atlas-copy-the-connection-string-to-use-in-SSIS-or-ODBC-2-662x1024.png 662w" sizes="(max-width: 833px) 100vw, 833px" /></a><p id="caption-attachment-10415" class="wp-caption-text">Configuring MongoDB Atlas connection in SSIS by setting the host, user name, password, and database options</p></div>
<div id="attachment_8892" style="width: 616px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8892" class="wp-image-8892 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-mongodb-atlas-connection-replicaset-options.png" alt="Specify Replica Set Name" width="606" height="295" srcset="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-mongodb-atlas-connection-replicaset-options.png 606w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-mongodb-atlas-connection-replicaset-options-300x146.png 300w" sizes="(max-width: 606px) 100vw, 606px" /><p id="caption-attachment-8892" class="wp-caption-text">Specifying MongoDB connection string options (i.e. <em>replicaSet</em> and <em>authSource</em> options)</p></div>
<div id="attachment_8891" style="width: 614px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8891" class="wp-image-8891 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-mongodb-enable-ssl-encrypt.png" alt="Enable SSL Connection - Required for MongoDB Atlas (Encrypted Data Transfer)" width="604" height="511" srcset="https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-mongodb-enable-ssl-encrypt.png 604w, https://zappysys.com/blog/wp-content/uploads/2020/05/ssis-mongodb-enable-ssl-encrypt-300x254.png 300w" sizes="(max-width: 604px) 100vw, 604px" /><p id="caption-attachment-8891" class="wp-caption-text">Enabling SSL Connection in MongoDB Connection Manager in SSIS (for encrypted data transfer)</p></div></li>
<li>Finally, press the <em>Test Connection</em> button to test the connection. If the test is successful, you can move on and start performing data operations on the MongoDB collections.</li>
</ol>
<p>That&#8217;s it — you can now use the <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-executesql-task/">MongoDB ExecuteSQL Task</a>, <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-source/">MongoDB Source,</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-destination/">MongoDB Destination</a> as described in the below articles:</p>
<ul>
<li><a href="https://zappysys.com/blog/call-mongodb-javascript-using-ssis-execute-sql-task/" target="_blank" rel="noopener">How to call MongoDB JavaScript using SSIS<br />
</a></li>
<li><a title="Permalink to Read MongoDB data from array (extract nested sub documents)" href="https://zappysys.com/blog/read-mongodb-data-from-array-extract-nested-sub-documents/" target="_blank" rel="bookmark noopener">How to read MongoDB data from an array (extract nested subdocuments)</a></li>
<li><a title="Permalink to How to write MongoDB Aggregation Queries in SSIS (Group By)" href="https://zappysys.com/blog/aggregate-mongodb-data-using-group-by-query-in-ssis/" target="_blank" rel="bookmark noopener">How to write MongoDB Aggregation Queries in SSIS (Group By)</a></li>
<li><a title="Permalink to SSIS – Loading data into MongoDB (Upsert, Delete, Update)" href="https://zappysys.com/blog/ssis-loading-data-into-mongodb-upsert-update-delete-insert/" target="_blank" rel="bookmark noopener">How to load SQL data into MongoDB (Insert, Upsert, Delete, Update)</a></li>
<li><a title="Permalink to Update MongoDB Array Items using SSIS" href="https://zappysys.com/blog/update-mongodb-array-items-using-ssis/" target="_blank" rel="bookmark noopener">How to update MongoDB Array Items using SSIS</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/connect-mongodb-atlas-ssis-replicaset/">How to connect to MongoDB Atlas Replica Set Cluster in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
