<?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 XML File Destination Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis/components/ssis-xml-file-destination/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis/components/ssis-xml-file-destination/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 19 Mar 2025 13:31:46 +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 XML File Destination Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis/components/ssis-xml-file-destination/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Calling SharePoint 365 REST API in SSIS</title>
		<link>https://zappysys.com/blog/sharepoint-365-rest-api-ssis-read-list-write-create/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Mon, 28 May 2018 21:56:14 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON File Destination]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS XML File Destination]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=3674</guid>

					<description><![CDATA[<p>Introduction to REST API with SharePoint in SSIS Using REST API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint 365 is a nice Microsoft application in the Cloud used to share documents and collaborate with the company. You can have schedules, projects, documents and more shared using a Web platform. In addition, [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/sharepoint-365-rest-api-ssis-read-list-write-create/">Calling SharePoint 365 REST API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction to REST API with SharePoint in SSIS</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/sharepoint-connector/ssis">API Connector for SharePoint Online</a> which makes it much simpler to <strong>Read/Write SharePoint 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><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg"><img decoding="async" class="alignleft wp-image-3731 " src="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg" alt="icon SharePoint" width="86" height="86" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg 150w, https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg 225w" sizes="(max-width: 86px) 100vw, 86px" /></a>Using REST API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint 365 is a nice Microsoft application in the Cloud used to share documents and collaborate with the company. You can have schedules, projects, documents and more shared using a Web platform.</p>
<p>In addition, it is a very useful tool that your company may need. It is also possible to automate, administer task using Rest API.<br />
This article, we will learn how to create REST API queries to SharePoint 365 using the Microsoft Graph API using SSIS. To learn about other <a href="https://zappysys.com/blog/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel/" target="_blank" rel="noopener">Office 365 REST API in SSIS check this article</a> (Outlook, Onedrive, mail, Excel API).</p>
<p>Also, we will show our ZappySys SSIS PowerPack that includes very powerful tools to export SharePoint data from REST API to any other source.<br />
<div class="su-table su-table-alternate">
<table width="300">
<tbody>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener"><br />
<img decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="REST API Web Service Task SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener">SSIS REST API Web Service Task<br />
</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 58px" width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/SSIS-Json-Source-Adapter.png" alt="JSON Source (File, REST API, OData Connector) SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" rel="noopener">SSIS JSON Source (File, REST API, OData Connector)</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 58px" width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-destination-connector/" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-file-destination/ssis-json-file-destination.png" alt="JSON File Destination (Create JSON File) SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-destination-connector/" rel="noopener">SSIS JSON File Destination (Create JSON File)<br />
</a></td>
</tr>
</tbody>
</table>
</div>
<h2>Requirements to REST API with SharePoint</h2>
<ol>
<li>First, you will need SSDT installed.</li>
<li>Second, SSIS PowerPack installed.</li>
<li>An Office 365 Account with SharePoint 365</li>
</ol>
<h2>Getting started</h2>
<p>Microsoft included the Microsoft Graph to easily create API queries to different Microsoft components like OneDrive, Excel, Insights, Microsoft Team, Planner and more.</p>
<p>The Microsoft Graph is a gateway to access to 365 Data in an integrated platform. Let’s start with the Microsoft Graph Explorer and do some REST API queries to understand how to use REST API in SharePoint.</p>
<h3>Microsoft Graph Explorer to SharePoint introduction</h3>
<p>The best way to learn REST API with SharePoint 365 is to use the Graph Explorer. You can run API queries using the Graph Explorer and get your data. Here we will show how.</p>
<ol>
<li>First, we will go to the <a href="https://developer.microsoft.com/en-us/graph/graph-explorer">Graph Explorer</a> and sign-in with your Office 365 Account.</li>
<li>Secondly, in Run Query, you can specify your query, which will show SharePoint information.
<div id="attachment_10091" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10091" class="wp-image-10091 size-large" title="Graph Explorer" src="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1-1024x428.jpg" alt="graph api explorer" width="720" height="301" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1-1024x428.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1-300x125.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1-768x321.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1.jpg 1348w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-10091" class="wp-caption-text">Graph Explorer</p></div></li>
<li>Let start with this link:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/sites/root/lists</pre>
</li>
<li>This shows properties about site resources. The response of the query is in JSON format:
<div id="attachment_3695" style="width: 732px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3695" class="size-full wp-image-3695" src="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results.jpg" alt="graph api microsoft json results" width="722" height="299" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results.jpg 722w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results-300x124.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results-720x299.jpg 720w" sizes="(max-width: 722px) 100vw, 722px" /></a><p id="caption-attachment-3695" class="wp-caption-text">Graph API Microsoft JSON results</p></div></li>
<li>Also, it is possible to enable examples for SharePoint Sites, SharePoint Lists, and other Microsoft technologies:
<div id="attachment_3696" style="width: 435px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-enable-api-applicatins.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3696" class="size-full wp-image-3696" src="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-enable-api-applicatins.jpg" alt="microsoft graph api enable api applicatins" width="425" height="450" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-enable-api-applicatins.jpg 425w, https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-enable-api-applicatins-283x300.jpg 283w" sizes="(max-width: 425px) 100vw, 425px" /></a><p id="caption-attachment-3696" class="wp-caption-text">Graph API Applications</p></div></li>
</ol>
<h3>Create an OAuth connection to REST API with SharePoint in SSIS</h3>
<ol>
<li style="list-style-type: none;">
<ol>
<li>First, to get the Data from the Microsoft Graph, we will sign in to create an application in the <a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/app-registration-portal-training-guide">Azure Portal app registration.</a></li>
<li>Secondly, create a Microsoft Application. It will provide you an Application ID and a Password. For detailed steps about how to create a Microsoft Application, check <a href="https://zappysys.com/blog/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel/">our article related</a>.
<div id="attachment_3701" style="width: 1310px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3701" class="size-full wp-image-3701" src="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password.jpg" alt="microsoft graph api application id password" width="1300" height="467" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password.jpg 1300w, https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password-300x108.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password-768x276.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password-1024x368.jpg 1024w" sizes="(max-width: 1300px) 100vw, 1300px" /></a><p id="caption-attachment-3701" class="wp-caption-text">Microsoft Graph API application id password</p></div></li>
<li>Once that the application is created, go to SSDT or Visual Studio and create a new connection.
<div id="attachment_3704" style="width: 419px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oauth-connection.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3704" class="size-full wp-image-3704" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oauth-connection.jpg" alt=" oauth connection ssis" width="409" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oauth-connection.jpg 409w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oauth-connection-276x300.jpg 276w" sizes="(max-width: 409px) 100vw, 409px" /></a><p id="caption-attachment-3704" class="wp-caption-text">SSIS OAuth connection</p></div></li>
<li>Select the ZS-OAuth connection. Once selected, enter the Client ID (the Microsoft Graph Application ID), the client secret (application password).</li>
<li>Add the Authorization URL is the following:<br />
<pre class="crayon-plain-tag">https://login.microsoftonline.com/common/oauth2/v2.0/authorize</pre>
</li>
<li>Also, include the Access token URL is the following:<br />
<pre class="crayon-plain-tag">https://login.microsoftonline.com/common/oauth2/v2.0/token</pre>
</li>
<li>The following permissions were applied in the example: User.Read<br />
<pre class="crayon-plain-tag">offline_access
Sites.ReadWrite.all
Sites.Manage.All
Sites.FullControl.All</pre>
<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> It is advised to include <strong>offline_access</strong> scope in order to get a Refresh Token and to be free of any token restrictions.</div></div></li>
<li>Once that the properties are entered, press the Generate token button:
<div id="attachment_3706" style="width: 781px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3706" class="wp-image-3706 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api.jpg" alt="oauth graph API with REST API with SharePoint in SSIS" width="771" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api.jpg 771w, https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api-300x271.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api-768x694.jpg 768w" sizes="(max-width: 771px) 100vw, 771px" /></a><p id="caption-attachment-3706" class="wp-caption-text">SSIS OAuth with REST API with SharePoint in SSIS</p></div></li>
</ol>
</li>
</ol>
<h3>How to call SharePoint API in SSIS</h3>
<ol>
<li>Once that your OAuth Connection is created, we can use it in a REST API task. This task is included with the ZappySys SSIS PowerPack:
<div id="attachment_3707" style="width: 304px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3707" class="size-full wp-image-3707" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task.jpg" alt=" rest api ssis task" width="294" height="199" /></a><p id="caption-attachment-3707" class="wp-caption-text">SSIS REST API task</p></div></li>
<li>Secondly, in the REST API Task, select the option URL from connection and select the OAuth connection created before. We will first use the following URL to see the list of site properties:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/sites/root/lists</pre>
</li>
<li>Also, press Test request/Response button to get the results of the query:
<div id="attachment_3708" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3708" class="size-full wp-image-3708" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call.jpg" alt="ssis sharepoint rest api call" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call-300x245.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call-768x628.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-3708" class="wp-caption-text">SSIS SharePoint rest API call</p></div></li>
<li>The response will be in JSON format:
<div id="attachment_3710" style="width: 759px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/rest-api-ssis-sharepoint-365-response.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3710" class="size-full wp-image-3710" src="https://zappysys.com/blog/wp-content/uploads/2018/05/rest-api-ssis-sharepoint-365-response.jpg" alt="rest api ssis sharepoint 365 response" width="749" height="534" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/rest-api-ssis-sharepoint-365-response.jpg 749w, https://zappysys.com/blog/wp-content/uploads/2018/05/rest-api-ssis-sharepoint-365-response-300x214.jpg 300w" sizes="(max-width: 749px) 100vw, 749px" /></a><p id="caption-attachment-3710" class="wp-caption-text">REST API SSIS Sharepoint 365 response</p></div></li>
<li>Also, it is possible to store the results in a file or a variable:
<div id="attachment_3711" style="width: 808px" class="wp-caption alignleft"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3711" class="wp-image-3711 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file.jpg" alt="SSIS save API SharePoint response to file REST API with SharePoint" width="798" height="658" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file.jpg 798w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file-300x247.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file-768x633.jpg 768w" sizes="(max-width: 798px) 100vw, 798px" /></a><p id="caption-attachment-3711" class="wp-caption-text">SSIS save API SharePoint response to a file REST API with SharePoint</p></div></li>
<li>In Addition, you can run the following query to enumerate all the sites:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites?select=siteCollection,webUrl&amp;filter=siteCollection/root%20ne%20null</pre>
</li>
<li>Also, to show the information on a specific site, the following query will be used:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/sites/site-id</pre>
</li>
<li>For example, if you site id is zappysys.sharepoint.com the URL would be the following:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/sites/zappysys.sharepoint.com</pre>
</li>
<li>To enumerate sites, the following example can be useful:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites?select=siteCollection,webUrl&amp;filter=siteCollection/root%20ne%20null</pre>
</li>
<li>Also, to enumerate lists, you can use the following URL:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists</pre>
</li>
</ol>
<h3>How to read SharePoint lists in SSIS using REST API</h3>
<p>We will learn how to show SharePoint lists using rest API.</p>
<p>In addition, you can get the list ids using this query:</p><pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/list</pre><p>
<div id="attachment_3743" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3743" class="wp-image-3743 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list.jpg" alt="SSIS SharePoint list API" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list-300x245.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list-768x628.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-3743" class="wp-caption-text">SharePoint list API</p></div>
<h3>How to read data from a Sharepoint List</h3>
<ol>
<li>To get the list of ithems form a list use the following query:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists/mylist/items/</pre>
</li>
<li>Finally, to get metadata from a list, you can use the following query. To learn more how to import Sharepoint List into SQL Server <a href="https://zappysys.com/blog/loading-data-from-rest-api-to-sql-server-in-ssis/" target="_blank" rel="noopener">use JSON / REST API Source</a>.</li>
</ol>
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists/fcf5fa2b-ceeb-4c9b-80e5-7bedd455fc9b</pre>
<div id="attachment_3742" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3742" class="size-full wp-image-3742" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list.jpg" alt=" sharepoint ssismetadata list" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list-300x245.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list-768x628.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-3742" class="wp-caption-text">SSIS Sharepoint metadata list</p></div>
<h3>How to create a SharePoint list item in SSIS using REST API (POST Method)</h3>
<p>It is also possible to POST data using REST API. In the next example, we will create a new list in SharePoint 365 using REST API.</p>
<ol>
<li>First, in SSDT, use the REST API Task used previously and specify the following URL:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists/mynewlist/items/</pre>
Where zappys.sharepoint.com is the site id and mynewlist is a new list created. Also, in the HTTP Request Method, use the POST method.</li>
<li>In addition, go to the Body Request, we will create a widget. We will use the following JSON data and make sure to select JSON (application/json) in the body:<br />
<pre class="crayon-plain-tag">{
"fields": {
"Title": "Widget"
}
}</pre>
<div id="attachment_3718" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3718" class="wp-image-3718 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item.jpg" alt="Post SharePoint REST API" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item-300x245.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item-768x628.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-3718" class="wp-caption-text">SharePoint Post REST API</p></div></li>
<li>Finally, if everything is successful, you will be able to see the new item created:
<div id="attachment_3719" style="width: 712px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-list-created-post.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3719" class="wp-image-3719 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-list-created-post.jpg" alt="sharepoint ssis list created post " width="702" height="381" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-list-created-post.jpg 702w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-list-created-post-300x163.jpg 300w" sizes="(max-width: 702px) 100vw, 702px" /></a><p id="caption-attachment-3719" class="wp-caption-text">SSIS SharePoint list created with a POST</p></div></li>
</ol>
<h3>How to export SharePoint API response results to a file</h3>
<p>We have a nice task named JSON Source used to get data from REST API or a JSON file and export to any source the results like SQL Server, Excel, a flat file, etc.<br />
In this example, we will export data from the JSON Source to a JSON file using the JSON Destination Task.</p>
<ol>
<li>First of all, we will use the Data Flow. Drag and drop the data flow to the design pane and double click to go to the Data Flow tab:
<div id="attachment_3721" style="width: 328px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3721" class="wp-image-3721 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-1.jpg" alt=" Data Flow SSIS" width="318" height="95" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-1.jpg 318w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-1-300x90.jpg 300w" sizes="(max-width: 318px) 100vw, 318px" /></a><p id="caption-attachment-3721" class="wp-caption-text">SSIS Data Flow</p></div></li>
<li>Secondly, in the Data Flow tab, drag and drop the JSON Source, the JSON Destination and join them:
<div id="attachment_3722" style="width: 540px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-to-json-destinatin.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3722" class="wp-image-3722 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-to-json-destinatin.jpg" alt=" json source to json destination ssis" width="530" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-to-json-destinatin.jpg 530w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-to-json-destinatin-300x217.jpg 300w" sizes="(max-width: 530px) 100vw, 530px" /></a><p id="caption-attachment-3722" class="wp-caption-text">SSIS JSON source to JSON destination</p></div></li>
<li>In addition, in the JSON Source, we will check the option Use Credentials and select the OAuth connection created and used before.</li>
<li>Enter Path or Web URL, we will use the following URL:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists</pre>
</li>
<li>Also, We will use the following filter:<br />
<pre class="crayon-plain-tag">$.value[*].list</pre>
<div id="attachment_3724" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3724" class="wp-image-3724 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint.jpg" alt=" json ssis source REST API with SharePoint in SSIS" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint.jpg 826w, https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint-300x266.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint-768x682.jpg 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-3724" class="wp-caption-text">SSIS JSON Source REST API with SharePoint in SSIS</p></div></li>
<li>In addition, go to JSON Destination task, select mappings and right click on add elements:
<div id="attachment_3725" style="width: 884px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3725" class="wp-image-3725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination.jpg" alt="json destination ssis" width="874" height="700" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination.jpg 874w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination-300x240.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination-768x615.jpg 768w" sizes="(max-width: 874px) 100vw, 874px" /></a><p id="caption-attachment-3725" class="wp-caption-text">SSIS JSON Destination</p></div></li>
<li>Also, select the attributes:
<div id="attachment_3727" style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-add-attributes.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3727" class="wp-image-3727 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-add-attributes.jpg" alt=" add attributes ssis" width="395" height="438" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-add-attributes.jpg 395w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-add-attributes-271x300.jpg 271w" sizes="(max-width: 395px) 100vw, 395px" /></a><p id="caption-attachment-3727" class="wp-caption-text">SSIS add attributes</p></div></li>
<li>Finally, run the package to export the data.</li>
</ol>
<h2>Conclusion about REST API with SharePoint in SSIS</h2>
<p>To conclude, we can say that SharePoint 365 is a very popular application to share documents and information. With REST API it is possible to get data properties and administer SharePoint. We used the REST API, JSON Source to get and send information. If you want to try yourself, you can download our tools <a href="https://zappysys.com/products/ssis-powerpack/download/">here.</a></p>
<h2>References</h2>
<ul>
<li><a href="https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user">Get access on behalf of a user</a></li>
<li><a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/sharepoint">Working with SharePoint sites in Microsoft Graph</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/">About SSIS PowerPack</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/sharepoint-365-rest-api-ssis-read-list-write-create/">Calling SharePoint 365 REST API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
