{"id":7004,"date":"2019-05-25T10:28:13","date_gmt":"2019-05-25T10:28:13","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=7004"},"modified":"2023-08-27T09:12:46","modified_gmt":"2023-08-27T09:12:46","slug":"read-microsoft-dynamics-365-odata-api-data-ssis","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/","title":{"rendered":"How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API)"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3577 size-thumbnail alignleft\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300-150x150.png\" alt=\"\" width=\"150\" height=\"150\" \/><\/a>In our previous article, we talked about\u00a0how to\u00a0<a href=\"https:\/\/zappysys.com\/blog\/ssis-dynamics-crm-read-import-crm-365-onpremises\/\" target=\"_blank\" rel=\"noopener\">read from Dynamics CRM<\/a>\u00a0using easy to use\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-dynamics-crm-source-connector\/\" target=\"_blank\" rel=\"noopener\">SSIS Dynamics CRM Source connector<\/a>. In this post, you will learn how to use <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\" target=\"_blank\" rel=\"noopener\">SSIS JSON Source (for REST API)<\/a>\u00a0instead of CRM Source. Using SSIS JSON Source you can read virtually any REST API or JSON file data including Dynamics CRM \/ Dataverse. For this article, our goal is to learn <strong>How to read Microsoft Dynamics 365 data using Web API (OData API) in SSIS.<\/strong>\u00a0We will use drag and drop approach without any coding.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Why use Web API (OAuth) for Dynamics 365 CRM?<\/strong><\/h2>\n<p>Microsoft has announced depreciation of older CRM API (SOAP API with WS-Trust Authentication) which means they are no longer going to support the older style of authentication so no option but to switch to newer authentication \/ API.<\/p>\n<p>In the older approach (SOAP API with WS-Trust Authentication) you must pass your User Name and Password to authenticate, also if MFA \/ 2FA (Multi-Factored Auth) is turned on by organization policy you cannot use your user id \/ password in API call. In new authentication (i.e. OAuth) you have to use Client Id and Client Secret only.<\/p>\n<p>Now let&#8217;s look at the step by step approach to call Dynamics 365 REST API.<\/p>\n<h2>Step-1 : Register Dynamics CRM \/ Dataverse App obtain App Id \/ Client Secret<\/h2>\n<p>The very first step to access Microsoft Dynamics CRM 365 API is to obtain Application Id (also referred as Client Id)\u00a0 and Client Secret. We will use this information later in this article (on OAuth connection UI).<\/p>\n<ol>\n<li><a href=\"https:\/\/zappysys.com\/blog\/register-app-dynamics-crm-365-cds-dataverse-api-azure-ad-oauth\/\" target=\"_blank\" rel=\"noopener\">Register Dynamics CRM \/ Dataverse App With Azure<\/a>\u00a0and get the credential (App Id, Client Secret).<\/li>\n<\/ol>\n<h2><\/h2>\n<h2>Step-2 :\u00a0Read Microsoft Dynamics 365 API data in SSIS using JSON Source<\/h2>\n<p>Let&#8217;s start with an example. We use SSIS JSON Source Task to make calls to Microsoft Dynamics 365 API, we will load Dynamics 365 Leads data to SQL Server.<\/p>\n<p>Please refer to this link for more information:\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customer-engagement\/web-api\/about?view=dynamics-ce-odata-9\" target=\"_blank\" rel=\"noopener\">Microsoft Dynamics 365 Web API Reference<\/a><\/p>\n<h3>Find out API Url for your environment (organization url)<\/h3>\n<p>Once we are done with the creation of the Azure AD app to obtain App Id \/Secret out next step is to find out the base API URL for your organization \/ environment.<\/p>\n<p>If you have multiple environments (i.e. Prod, Sandbox) then each environment might have its own unique URL)<\/p>\n<ol>\n<li>To find your API Service URL, Click on <strong>Gear Icon<\/strong><\/li>\n<li>Choose <strong>Advanced Settings<\/strong><\/li>\n<li>Click down arrow on <strong>Settings<\/strong><\/li>\n<li>Click <strong>Customization<\/strong><\/li>\n<li>Click <strong>Developer Resource<\/strong> Link<\/li>\n<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>Web API<\/strong><\/li>\n<\/ol>\n<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\"><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>\n<p>&nbsp;<\/p>\n<h3>Create SSIS Data Flow to read data from Dynamics CRM \/ Dataverse<\/h3>\n<ol>\n<li>\n        First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.<img class=\"yoast-text-mark\" \/><\/p>\n<p>        <div id=\"attachment_7934\" style=\"width: 470px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-drag-drop-data-flow-task.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7934\" class=\"wp-image-7934 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-drag-drop-data-flow-task.png\" alt=\"Drag and Drop SSIS Data Flow Task from SSIS Toolbox\" width=\"460\" height=\"155\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-drag-drop-data-flow-task.png 460w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-drag-drop-data-flow-task-300x101.png 300w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><p id=\"caption-attachment-7934\" class=\"wp-caption-text\">Drag and Drop SSIS Data Flow Task from SSIS Toolbox<\/p><\/div>\n    <\/li>\n<li>\n        Furthermore, Drag and Drop JSON Source(REST API and File) File Task from the SSIS Toolbox.<img class=\"yoast-text-mark\" \/><\/p>\n<p>        <div id=\"attachment_3766\" style=\"width: 604px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-json-source-for-getting-basic-profile-from-linkedin.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3766\" class=\"size-full wp-image-3766\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-json-source-for-getting-basic-profile-from-linkedin.png\" alt=\"Drag and Drop JSON Source Component\" width=\"594\" height=\"268\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/><\/a><p id=\"caption-attachment-3766\" class=\"wp-caption-text\">Drag and Drop JSON Source Component<\/p><\/div>\n    <\/li>\n<\/ol>\n<h3><\/h3>\n<h3>Create OAuth Connection for Dynamics CRM \/ Dataverse<\/h3>\n<p>Now lets look at how to create and configure OAuth connection to call Web API for Dynamics CRM \/ Dataverse<\/p>\n<ol>\n<li>\n        Check Use Credentials Option and select a\u00a0new ZS-OAuth Connection from the drop-down.<\/p>\n<p>        <div id=\"attachment_7689\" style=\"width: 730px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-check-use-credentials-select-connection.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7689\" class=\"wp-image-7689 size-medium_large\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-check-use-credentials-select-connection-768x593.png\" alt=\"Check Use Credentials \" width=\"720\" height=\"556\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-check-use-credentials-select-connection-768x593.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-check-use-credentials-select-connection-300x232.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-check-use-credentials-select-connection.png 823w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a><p id=\"caption-attachment-7689\" class=\"wp-caption-text\">Check Use Credentials<\/p><\/div>\n    <\/li>\n<li>\n        Once OAuth Connection UI opens up. Configure like below on General Tab.<br \/>\n        Change OAuth Version to <strong>OAuth2<\/strong><br \/>\n        Change Grant Type to <strong>Client Credentials<\/strong><br \/>\n        Enter <strong>Client Id<\/strong> (Azure AD App Id) (Obtained in the Previous Section)<br \/>\n        Enter <strong>Client Secret<\/strong> (Obtained in the Previous Section)<br \/>\n        Enter <strong>Token URL<\/strong> (see below)<\/p>\n<div id=\"attachment_10127\" style=\"width: 616px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-oauth-client-credentials-grant-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10127\" class=\"wp-image-10127 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-oauth-client-credentials-grant-1.png\" alt=\"azure-ad-app-oauth-client-credentials-grant\" width=\"606\" height=\"351\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-oauth-client-credentials-grant-1.png 606w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-oauth-client-credentials-grant-1-300x174.png 300w\" sizes=\"(max-width: 606px) 100vw, 606px\" \/><\/a><p id=\"caption-attachment-10127\" class=\"wp-caption-text\">Configure OAuth Connection for Azure AD App &#8211; Client Credentials Grant (Tenant Specific Token EndPoints)<\/p><\/div>\n<p>        <span style=\"text-decoration: underline;\"><strong>For Client Credentials Grant<\/strong><\/span><br \/>\n        Enter Token URL as\u00a0<strong>https:\/\/login.microsoftonline.com\/<span style=\"color: #0000ff;\">&lt;your-tenant-id&gt;<\/span>\/oauth2\/token<\/strong><br \/>\n        (You can find Tenant ID on the Overview page of your Azure AD App)<\/p>\n<p>        <span style=\"text-decoration: underline;\"><strong>For Default Grant (3-legged &#8211; requires User Login Prompt)<\/strong><\/span><br \/>\n        Enter Auth URL as <strong>https:\/\/login.microsoftonline.com\/common\/oauth2\/authorize<\/strong><br \/>\n        Enter Token\u00a0 URL as <strong><strong>https:\/\/login.microsoftonline.com\/common\/oauth2\/token<\/strong><\/strong><\/p>\n<p>        &nbsp;<\/p>\n<div id=\"attachment_10128\" style=\"width: 858px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-token-url-with-tenant-id-oauth-v1-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10128\" class=\"wp-image-10128 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-token-url-with-tenant-id-oauth-v1-1.png\" alt=\"azure-ad-app-token-url-with-tenant-id-oauth-v1\" width=\"848\" height=\"448\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-token-url-with-tenant-id-oauth-v1-1.png 848w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-token-url-with-tenant-id-oauth-v1-1-300x158.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-token-url-with-tenant-id-oauth-v1-1-768x406.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/azure-ad-app-token-url-with-tenant-id-oauth-v1-1-720x380.png 720w\" sizes=\"(max-width: 848px) 100vw, 848px\" \/><\/a><p id=\"caption-attachment-10128\" class=\"wp-caption-text\">Where to find Token Endpoint with Tenant ID in the URL (Azure AD App)<\/p><\/div>\n<p>        &nbsp;\n    <\/li>\n<li>\n        Now go to Advanced Tab and configure like belowEnter <strong>Extra Attribute for \/auth<\/strong> as\u00a0\u00a0<span class=\"lang:default highlight:0 decode:true crayon-inline\">resource=https:\/\/&lt;your-instance-id&gt;.api.&lt;your-crm-region&gt;.dynamics.com<\/span><\/p>\n<p>        <div id=\"attachment_9471\" style=\"width: 595px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/resource-dyanmics-crm-connection-for-cleint-cred-token.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9471\" class=\"size-full wp-image-9471\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/resource-dyanmics-crm-connection-for-cleint-cred-token.png\" alt=\"Client Credentials Grant for Dynamics CRM \/ Dataverse - API Access (Azure AD App \/ OAuth)\" width=\"585\" height=\"254\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/resource-dyanmics-crm-connection-for-cleint-cred-token.png 585w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/resource-dyanmics-crm-connection-for-cleint-cred-token-300x130.png 300w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-9471\" class=\"wp-caption-text\">Client Credentials Grant for Dynamics CRM \/ Dataverse &#8211; API Access (Azure AD App \/ OAuth)<\/p><\/div>\n    <\/li>\n<li>Click OK to Save connection.<\/li>\n<\/ol>\n<h3>Get all Accounts, Contacts, and Leads using Dynamics 365 API<\/h3>\n<p>Now let&#8217;s configure API URL from where you like to read data.<\/p>\n<p>For example, if you just use the root URL then it will list all possible entries<\/p>\n<p>Root URL: <span class=\"lang:default highlight:0 decode:true crayon-inline\">https:\/\/{{organization-uri}}\/api\/data\/v9.1\/<\/span><\/p>\n<ol>\n<li>Double click on the Component to Edit the Configurations.<\/li>\n<li>Change Data Format to\u00a0<strong>OData<\/strong>.<\/li>\n<li>\n        In the Web URL Field, you can enter any valid URL for Web API. Please refer to this link of <a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customer-engagement\/web-api\/account?view=dynamics-ce-odata-9\" target=\"_blank\" rel=\"noopener\">Dynamics 365 Rest API<\/a> for more information.<strong>Example Data URLs<\/strong><\/p>\n<pre class=\"lang:default decode:true\">https:\/\/{{organization-uri}}\/api\/data\/v9.1\/\r\nhttps:\/\/{{organization-uri}}\/api\/data\/v9.1\/accounts\r\nhttps:\/\/{{organization-uri}}\/api\/data\/v9.1\/contacts\r\nhttps:\/\/{{organization-uri}}\/api\/data\/v9.1\/leads<\/pre>\n<p>        Here, replace\u00a0<strong>{{organization-uri}} <\/strong>in URL to your Microsoft Dynamics 365 site domain name (Example\u00a0<strong><span style=\"text-decoration: underline;\">zappy6.api.crm.dynamics.com<\/span><\/strong>\u00a0Dynamics 365 URL)<strong>.<\/strong><\/p>\n<p>        <div id=\"attachment_7211\" style=\"width: 730px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-D365-API-set-url-json-source.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7211\" class=\"wp-image-7211 size-medium_large\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-D365-API-set-url-json-source-768x682.png\" alt=\"Set URL in JSON Source\" width=\"720\" height=\"639\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-D365-API-set-url-json-source-768x682.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-D365-API-set-url-json-source-300x266.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-D365-API-set-url-json-source.png 826w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a><p id=\"caption-attachment-7211\" class=\"wp-caption-text\">Set URL in JSON Source<\/p><\/div>\n    <\/li>\n<\/ol>\n<h3>Preview \/ Query Dynamics 365 Data<\/h3>\n<ol>\n<li>Now select Array filter as <span class=\"lang:default highlight:0 decode:true crayon-inline\">$.value[*]<\/span>\u00a0 (Click <strong>Select Filter<\/strong> Button &#8211; Choose value node)<\/li>\n<li>\n        Click on the Preview button to get the data.<\/p>\n<p>        <div id=\"attachment_7687\" style=\"width: 730px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-json-source-preview-dynamic-crm.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7687\" class=\"wp-image-7687 size-medium_large\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-json-source-preview-dynamic-crm-768x631.png\" alt=\"Preview Data\" width=\"720\" height=\"592\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-json-source-preview-dynamic-crm-768x631.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-json-source-preview-dynamic-crm-300x246.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/05\/ssis-json-source-preview-dynamic-crm.png 891w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a><p id=\"caption-attachment-7687\" class=\"wp-caption-text\">Preview Data<\/p><\/div>\n    <\/li>\n<li>Finally, click OK to save JSON Source settings.<\/li>\n<li>That\u2019s it we are ready to load Dynamics 365 API data to SQL Server.<\/li>\n<\/ol>\n<h3>Load Microsoft Dynamics 365 API data into SQL Server<\/h3>\n<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>\r\n<h3>Step 1: Add Upsert Destination to Data Flow<\/h3>\r\n<ol>\r\n<li>Drag and drop the <strong>Upsert Destination<\/strong> component from the SSIS Toolbox.<\/li>\r\n<li>Connect your source component (e.g., JSON \/ REST \/ Other Source) to the Upsert Destination.<\/li>\r\n<\/ol>\r\n<div class=\"wp-caption aligncenter\">\r\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-data-flow-drag-drop-upsert-destination.png\">\r\n<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>\r\n<p class=\"wp-caption-text\">SSIS - Data Flow - Drang and Drop Upsert Destination Component<\/p>\r\n<\/div>\r\n<h3>Step 2: Configure Target Connection<\/h3>\r\n<ol>\r\n<li>Double-click the <strong>Upsert Destination<\/strong> component to open the configuration window.<\/li>\r\n<li>Under <strong>Connection<\/strong>, select an existing target connection or click <strong>NEW<\/strong> to create a new connection.\r\n<ul>\r\n<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ol>\r\n<h3>Step 3: Select or Create Target Table<\/h3>\r\n<ol>\r\n<li>In the <strong>Target Table<\/strong> dropdown, select the table where you want to load data.<\/li>\r\n<li>Optionally, click <strong>NEW<\/strong> to create a new table based on the source columns.<\/li>\r\n<\/ol>\r\n<div class=\"wp-caption aligncenter\">\r\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/09\/upsert-destination-configuration.png\">\r\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full\" alt=\"\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/09\/upsert-destination-configuration.png\" \/><\/a>\r\n<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>\r\n<\/div>\r\n<h3>Step 4: Map Columns<\/h3>\r\n<ol>\r\n<li>Go to the <strong>Mappings<\/strong> tab.<\/li>\r\n<li>Click <strong>Auto Map<\/strong> to map source columns to target columns by name.<\/li>\r\n<li>Ensure you <strong>check the Primary key column(s)<\/strong> that will determine whether a record is inserted or updated.<\/li>\r\n<li>You can manually adjust the mappings if necessary.<\/li>\r\n<\/ol>\r\n <div class=\"wp-caption aligncenter\">\r\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/09\/upsert-destination-key.png\">\r\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full\" alt=\"\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/09\/upsert-destination-key.png\" \/><\/a>\r\n<p class=\"wp-caption-text\">SSIS Upsert Destination - Columns Mappings<\/p>\r\n<\/div>\r\n<h3>Step 5: Save Settings<\/h3>\r\n<ul>\r\n<li>Click <strong>OK<\/strong> to save the Upsert Destination configuration.<\/li>\r\n<\/ul>\r\n<h3>Step 6: Optional: Add Logging or Analysis<\/h3>\r\n<ul>\r\n<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.<\/li>\r\n<\/ul>\r\n<h3>Step 7: Execute the Package<\/h3>\r\n<ul>\r\n<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.<\/li>\r\n<\/ul>\r\n<div class=\"wp-caption aligncenter\">\r\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/12\/ssis-upsert-destination-execute.png\">\r\n<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>\r\n<p class=\"wp-caption-text\">SSIS Upsert Destination Execution<\/p>\r\n<\/div><\/div>\n<h2><span id=\"Conclusion\">Conclusion<\/span><\/h2>\n<p>In this post you have seen how to Read Microsoft Dynamics 365 API data in SSIS. We used\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\" target=\"_blank\" rel=\"noopener\">JSON Source Component<\/a>\u00a0to call Dynamics 365 REST API and load data into SQL server. You can\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\">download SSIS PowerPack here<\/a>\u00a0to try many other scenarios not discussed in this blog along with 70+ other components.<\/p>\n<h2><span id=\"References\">References<\/span><\/h2>\n<p>Finally, you can use the following links for more information about the use of Dynamics 365 REST API with our tools:<\/p>\n<ul>\n<li><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\" target=\"_blank\" rel=\"noopener\">JSON Source<\/a>, you can also find\u00a0<a href=\"https:\/\/youtu.be\/t4fSghbSZLo\" target=\"_blank\" rel=\"noopener\">Tutorial Video<\/a>\u00a0here.<\/li>\n<li><strong>Help File:<\/strong>\u00a0Documentation of\u00a0<a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/index.htm#page=json-source.htm\" target=\"_blank\" rel=\"noopener\">SSIS Json Source<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customer-engagement\/web-api\/about?view=dynamics-ce-odata-9\" target=\"_blank\" rel=\"noopener\">Microsoft Dynamics CRM Web API Reference<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customer-engagement\/web-api\/entitytypes?view=dynamics-ce-odata-9\" target=\"_blank\" rel=\"noopener\">Dynamics 365 Web API EntityType Reference<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In our previous article, we talked about\u00a0how to\u00a0read from Dynamics CRM\u00a0using easy to use\u00a0SSIS Dynamics CRM Source connector. In this post, you will learn how to use SSIS JSON Source (for REST API)\u00a0instead of CRM Source. Using SSIS JSON Source you can read virtually any REST API or JSON file data including Dynamics CRM [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":3577,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[488,489,352,6,492,60,25,26,12],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API) | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"How to read Microsoft Dynamics 365 OData API data in SSIS using REST API Call. We will use\u00a0SSIS JSON\/REST API Source\u00a0to extract data from MS Dynamics CRM.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API) | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"How to read Microsoft Dynamics 365 OData API data in SSIS using REST API Call. We will use\u00a0SSIS JSON\/REST API Source\u00a0to extract data from MS Dynamics CRM.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2019-05-25T10:28:13+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2023-08-27T09:12:46+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"300\" \/>\r\n\t<meta property=\"og:image:height\" content=\"270\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/\",\"url\":\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/\",\"name\":\"How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API) | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png\",\"datePublished\":\"2019-05-25T10:28:13+00:00\",\"dateModified\":\"2023-08-27T09:12:46+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35\"},\"description\":\"How to read Microsoft Dynamics 365 OData API data in SSIS using REST API Call. We will use\u00a0SSIS JSON\/REST API Source\u00a0to extract data from MS Dynamics CRM.\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png\",\"width\":300,\"height\":270},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/076a738938c19d459fbfe125c759a0ea?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/076a738938c19d459fbfe125c759a0ea?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"url\":\"https:\/\/zappysys.com\/blog\/author\/hshah\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API) | ZappySys Blog","description":"How to read Microsoft Dynamics 365 OData API data in SSIS using REST API Call. We will use\u00a0SSIS JSON\/REST API Source\u00a0to extract data from MS Dynamics CRM.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/","og_locale":"en_US","og_type":"article","og_title":"How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API) | ZappySys Blog","og_description":"How to read Microsoft Dynamics 365 OData API data in SSIS using REST API Call. We will use\u00a0SSIS JSON\/REST API Source\u00a0to extract data from MS Dynamics CRM.","og_url":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/","og_site_name":"ZappySys Blog","article_published_time":"2019-05-25T10:28:13+00:00","article_modified_time":"2023-08-27T09:12:46+00:00","og_image":[{"width":300,"height":270,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ZappySys","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/","url":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/","name":"How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API) | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png","datePublished":"2019-05-25T10:28:13+00:00","dateModified":"2023-08-27T09:12:46+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35"},"description":"How to read Microsoft Dynamics 365 OData API data in SSIS using REST API Call. We will use\u00a0SSIS JSON\/REST API Source\u00a0to extract data from MS Dynamics CRM.","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/dynamics-crm-365-logo-300x300.png","width":300,"height":270},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/read-microsoft-dynamics-365-odata-api-data-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to read Microsoft Dynamics 365 OData API data in SSIS (CRM Web API)"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/076a738938c19d459fbfe125c759a0ea?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/076a738938c19d459fbfe125c759a0ea?s=96&d=mm&r=g","caption":"ZappySys"},"url":"https:\/\/zappysys.com\/blog\/author\/hshah\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/7004"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=7004"}],"version-history":[{"count":37,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/7004\/revisions"}],"predecessor-version":[{"id":10251,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/7004\/revisions\/10251"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/3577"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=7004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=7004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=7004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}