<?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 Dynamics CRM Destination Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis/components/ssis-dynamics-crm-destination/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis/components/ssis-dynamics-crm-destination/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 11 Dec 2025 13:00:52 +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 Dynamics CRM Destination Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis/components/ssis-dynamics-crm-destination/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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 fetchpriority="high" 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 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 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>SSIS PowerPack v2.9.5 released (Maintenance Release)</title>
		<link>https://zappysys.com/blog/ssis-powerpack-v2-9-5/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 25 Jun 2019 13:26:07 +0000</pubDate>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[SSIS Dynamics CRM Destination]]></category>
		<category><![CDATA[SSIS Dynamics CRM Source]]></category>
		<category><![CDATA[SSIS Excel Destination]]></category>
		<category><![CDATA[SSIS Excel Source]]></category>
		<category><![CDATA[SSIS Salesforce Source]]></category>
		<category><![CDATA[SSIS Upsert Destination]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7292</guid>

					<description><![CDATA[<p>What&#8217;s New In this release we focused on fixing some bugs with Dynamics CRM Source , Dynamics CRM Destination and Reporting Services Task. Version 2.9.6.10621 [Jun 24, 2019] New Features/Improvements NEW: Excel Source &#8211; Add option to read from any sheet by number rather than hard coded table name (e.g. $4$ , $5$ &#8230; ) Bug fixes [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-powerpack-v2-9-5/">SSIS PowerPack v2.9.5 released (Maintenance Release)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>What&#8217;s New</h2>
<p>In this release we focused on fixing some bugs with <a href="https://zappysys.com/products/ssis-powerpack/ssis-dynamics-crm-source-connector/">Dynamics CRM Source</a> , <a href="https://zappysys.com/products/ssis-powerpack/ssis-dynamics-crm-destination-connector/">Dynamics CRM Destination</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-report-generator-task/" target="_blank" rel="noopener">Reporting Services Task</a>.</p>
<h2 class="vertitle">Version 2.9.6.10621 [Jun 24, 2019]</h2>
<h3 class="versubtitle">New Features/Improvements</h3>
<ul>
<li><span class="verAdded">NEW: </span>Excel Source &#8211; Add option to read from any sheet by number rather than hard coded table name (e.g. $4$ , $5$ &#8230; )</li>
</ul>
<h3 class="versubtitle">Bug fixes</h3>
<ul>
<li><span class="verFixed">FIX: </span>Dynamics CRM Destination &#8211; Timeout property is ignored &#8211; You may get error &#8211; The request channel timed out while waiting for a reply after 00:00:59. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding</li>
<li><span class="verFixed">FIX: </span>Dynamics CRM Source &#8211; Virtual Fields not included in output or they are NULL</li>
<li><span class="verFixed">FIX: </span>General &#8211; Sometimes you may see blank OAuth Screen (If error occurred behind the scene)</li>
<li><span class="verFixed">FIX: </span>Reporting Services Task &#8211; LastStatus field not updated</li>
<li><span class="verFixed">FIX: </span>Reporting Services Task &#8211; Local report file throws dll load error at run time</li>
<li><span class="verFixed">FIX: </span>Reporting Services Task &#8211; You may get error on Save UI &#8211; Concurrency violation: the UpdateCommand affected 0 of the expected 1 records</li>
<li><span class="verFixed">FIX: </span>Salesforce Source &#8211; You may get NULL for related Object fields</li>
<li><span class="verFixed">FIX: </span>Upsert Destination &#8211; When you select all columns as Key &#8211; You may get error &#8211; Incorrect syntax near the keyword &#8216;WHEN&#8217;</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/ssis-powerpack-v2-9-5/">SSIS PowerPack v2.9.5 released (Maintenance Release)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Load data into Dynamics CRM using SSIS &#8211; Insert, Upsert, Delete, Update</title>
		<link>https://zappysys.com/blog/load-dynamics-crm-using-ssis-insert-upsert-delete-update/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 05 Jul 2018 19:20:32 +0000</pubDate>
				<category><![CDATA[SSIS Dynamics CRM Destination]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[office 365]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[upsert]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4318</guid>

					<description><![CDATA[<p>Introduction In our previous article, we talked about how to read from Dynamics CRM / Dataverse (Dynamics 365 / On-Premises CRM / PowerApp). Now let&#8217;s look at how to Load data into Dynamics CRM / Dataverse (Dynamics 365 / On-Premises CRM / PowerApp) using SSIS. We will see a few important aspects of loading data into Dynamics [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/load-dynamics-crm-using-ssis-insert-upsert-delete-update/">Load data into Dynamics CRM using SSIS &#8211; Insert, Upsert, Delete, Update</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/dynamics-crm-365-logo-300x300.png"><img loading="lazy" decoding="async" class=" wp-image-3577 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/05/dynamics-crm-365-logo-300x300.png" alt="" width="104" height="94" /></a>In our previous article, we talked about how to <a href="https://zappysys.com/blog/ssis-dynamics-crm-read-import-crm-365-onpremises/" target="_blank" rel="noopener">read from Dynamics CRM / Dataverse (Dynamics 365 / On-Premises CRM / PowerApp)</a>. Now let&#8217;s look at how to Load data into Dynamics CRM / Dataverse (Dynamics 365 / On-Premises CRM / PowerApp) using SSIS. We will see a few important aspects of loading data into Dynamics CRM / Dataverse Online (i.e. Dynamics 365) and On-premises / IFD (Internet facing hosted instance).</p>
<p>We will show you how to use <a href="https://zappysys.com/products/ssis-powerpack/ssis-dynamics-crm-destination-connector/" target="_blank" rel="noopener">SSIS Dynamics CRM Destination</a> connector for Bulk Insert, Update, Delete and Upsert Operations. This article uses Dynamics 365 Online for CRM Integration Examples but concepts are same for other types of installation (e.g. IFD or On-Premises)</p>
<h2>Requirements</h2>
<ol>
<li>Make sure you have SSIS Designer installed (i.e. <a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017" target="_blank" rel="noopener">SSDT-BI</a>)</li>
<li>Download and Installed <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> which includes an SSIS Dynamics CRM Connectors.</li>
<li>Finally, make sure you have Microsoft Dynamics CRM / Dataverse credentials handy.</li>
</ol>
<p>That&#8217;s it. So let&#8217;s get started.</p>
<h2>Video Tutorial &#8211; CRM Insert, Upsert, Delete, Update</h2>
<a href="https://zappysys.com/blog/load-dynamics-crm-using-ssis-insert-upsert-delete-update/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FfBbRzTcd3fk%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<p>&nbsp;</p>
<h2>Getting Started</h2>
<p>In this section, we will see how to perform bulk insert, update delete and upsert operations using  <a href="https://zappysys.com/products/ssis-powerpack/ssis-dynamics-crm-destination-connector/" target="_blank" rel="noopener">SSIS Dynamics CRM Destination</a></p>
<h3>Configure SSIS Dynamics CRM / Dataverse Connection</h3>
<p>The first step to read or write Dynamics CRM / Dataverse data is to make sure we have working Dynamics CRM connection in SSIS.</p>
<ol>
<li>Create new or open existing SSIS Project in Visual Studio.</li>
<li>Open SSIS Package and Go to SSIS designer.</li>
<li>
        Right click in the connection manager panel and click <strong>New connection</strong>:</p>
<p>        <div id="attachment_3560" style="width: 756px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/create-a-new-connection.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3560" class="size-full wp-image-3560" src="https://zappysys.com/blog/wp-content/uploads/2018/05/create-a-new-connection.jpg" alt="SSIS create a new connection CRM Dynamics" width="746" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/create-a-new-connection.jpg 746w, https://zappysys.com/blog/wp-content/uploads/2018/05/create-a-new-connection-300x162.jpg 300w" sizes="(max-width: 746px) 100vw, 746px" /></a><p id="caption-attachment-3560" class="wp-caption-text">Create a new SSIS Dynamics CRM / Dataverse Connection</p></div>
    </li>
<li>In the connection type selection, Select the <strong>ZS-DYNAMICS-CRM</strong> Connection.</li>
<li>
        We will use a <strong>CRM Online</strong> (Office 365) connection, <strong>region</strong>, a <strong>username</strong> and a <strong>password</strong> and select <strong>organization</strong> from the dropdown as below and then click <strong>Test connection</strong>:</p>
<p>        <div id="attachment_3559" style="width: 775px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-credentials-zs.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3559" class="size-full wp-image-3559" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-credentials-zs.jpg" alt="SSIS Dynamics CRM / Dataverse credentials" width="765" height="633" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-credentials-zs.jpg 765w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-credentials-zs-300x248.jpg 300w" sizes="(max-width: 765px) 100vw, 765px" /></a><p id="caption-attachment-3559" class="wp-caption-text">Configure Dynamics CRM / Dataverse Connection in SSIS</p></div>
    </li>
</ol>
<h3></h3>
<h3>Bulk Insert &#8211; SQL Server data Import into Dynamics CRM / Dataverse using SSIS</h3>
<p>Now, let&#8217;s see steps to do SQL Server data Import into Dynamics CRM / Dataverse using SSIS. Below steps assume you already have sample data in some SQL Server Table which will be used to create new CRM accounts. You can enter few account names you like to create in the CRM.</p>
<ol>
<li>Open SSIS Package and drag Data Flow task from Control Flow SSIS Toolbox</li>
<li>Go to data flow designer. Drag and drop OLEDB Source</li>
<li>
        Configure OLEDB Source to read from some sample data table (e.g. dbo.Accounts). If you want to be lazy and just test quickly you can use <a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-file-source-flat-file-web-api/" target="_blank" rel="noopener">ZS CSV Source</a> (Direct Value Mode) instead of OLEDB Source.<strong>Sample Data May be like below</strong><br />
<pre class="crayon-plain-tag">name,address1_city,address1_country
Flipkart,Bengaluru,India
Microsoft,seattle,USA
Nokia,Espoo,Finland</pre>
        Once you configure Source (Connection, Table Name etc.) click OK to save it.</p>
<p>        <div id="attachment_4351" style="width: 785px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-insert-accounts-to-dynamics-crm-online-365.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4351" class="size-full wp-image-4351" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-insert-accounts-to-dynamics-crm-online-365.png" alt="CSV Source - Sample Accounts for CRM Insert Demo" width="775" height="602" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-insert-accounts-to-dynamics-crm-online-365.png 775w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-insert-accounts-to-dynamics-crm-online-365-300x233.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-insert-accounts-to-dynamics-crm-online-365-768x597.png 768w" sizes="(max-width: 775px) 100vw, 775px" /></a><p id="caption-attachment-4351" class="wp-caption-text">CSV Source &#8211; Sample Accounts for CRM Insert Demo</p></div>
    </li>
<li>Drag and drop  <a href="https://zappysys.com/products/ssis-powerpack/ssis-dynamics-crm-destination-connector/" target="_blank" rel="noopener">ZS Dynamics CRM Destination</a> from the toolbox.</li>
<li>Connect Source to your Destination component.</li>
<li>Double click CRM destination to configure it.</li>
<li>
        On the Connection Managers tab, Select Dynamics CRM / Dataverse connection we created in the previous section.</p>
<p>        <div id="attachment_4353" style="width: 526px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-select-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4353" class="size-full wp-image-4353" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-select-connection.png" alt="Select Connection for Dynamics CRM / Dataverse Destination" width="516" height="286" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-select-connection.png 516w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-select-connection-300x166.png 300w" sizes="(max-width: 516px) 100vw, 516px" /></a><p id="caption-attachment-4353" class="wp-caption-text">Select Connection for Dynamics CRM / Dataverse Destination</p></div>
    </li>
<li>
        On the Component Properties Tab Select <strong>Table Name</strong>.</p>
<p>        <div id="attachment_4354" style="width: 807px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-insert-records-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4354" class="size-full wp-image-4354" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-insert-records-settings.png" alt="Select Target Table for Dynamics CRM / Dataverse Insert" width="797" height="429" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-insert-records-settings.png 797w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-insert-records-settings-300x161.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-insert-records-settings-768x413.png 768w" sizes="(max-width: 797px) 100vw, 797px" /></a><p id="caption-attachment-4354" class="wp-caption-text">Select Target Table for Dynamics CRM / Dataverse Insert</p></div>
    </li>
<li>
        On the Mapping Tab map few columns (e.g.  <strong>name</strong>, <strong>address1_city, </strong>and <strong><strong><strong>address1_country)</strong></strong></strong></p>
<p>        <div id="attachment_4355" style="width: 792px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-target-column-mappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4355" class="size-full wp-image-4355" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-target-column-mappings.png" alt="Configure Target Column Mapping for CRM Data Load" width="782" height="519" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-target-column-mappings.png 782w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-target-column-mappings-300x199.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-target-column-mappings-768x510.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-target-column-mappings-272x182.png 272w" sizes="(max-width: 782px) 100vw, 782px" /></a><p id="caption-attachment-4355" class="wp-caption-text">Configure Target Column Mapping for CRM Data Load</p></div>
    </li>
<li>Click OK to save CRM destination.</li>
<li>
        Right click in the data flow designer, click Execute Task</p>
<p>        <div id="attachment_4356" style="width: 519px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-loading-data-into-dynamics-crm-online.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4356" class="wp-image-4356 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-loading-data-into-dynamics-crm-online.png" alt="Execute SSIS Package - Import into Dynamics CRM / Dataverse using SSIS " width="509" height="224" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-loading-data-into-dynamics-crm-online.png 509w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-loading-data-into-dynamics-crm-online-300x132.png 300w" sizes="(max-width: 509px) 100vw, 509px" /></a><p id="caption-attachment-4356" class="wp-caption-text">Execute SSIS Package &#8211; Loading Data into Dynamics CRM / Dataverse from CSV / SQL Server</p></div>
    </li>
</ol>
<h3>Bulk Upsert &#8211; Update or Insert Dynamics CRM / Dataverse Records in SSIS</h3>
<p>In the previous section we saw how to Insert New records. However sometimes you want to Upsert (Insert or Update). So if record already exists Update else Insert. In order to achieve this you have to set two additional attributes. For CRM Upsert you have to perform few changes to previous steps</p>
<h4>Create Alternate Key for CRM Upsert</h4>
<p>To perform Upsert operation you can map Table&#8217;s Primary Key or Alternate Key. Primary Key usually starts with table name and ends with &#8220;id&#8221; (e.g. for account table its accountid ).</p>
<p>Many times Source system don&#8217;t have CRM Table Primary Key. In such case you may use Alternate Key in the mapping (JOIN Key). To use Alternate key for Upsert you have first define Alternate Key in CRM Portal. <a href="https://technet.microsoft.com/library/29e53691-0b18-4fde-a1d0-7490aa227898.aspx" target="_blank" rel="noopener">Check this link for exact steps</a>.</p>
<div id="attachment_4359" style="width: 1056px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-365-create-alternate-key-upsert-records-update-insert-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4359" class="size-full wp-image-4359" src="https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-365-create-alternate-key-upsert-records-update-insert-data.png" alt="Create Alternate Key for Dynamics CRM / Dataverse Online Table (Useful for Update or Upsert Operation)" width="1046" height="522" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-365-create-alternate-key-upsert-records-update-insert-data.png 1046w, https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-365-create-alternate-key-upsert-records-update-insert-data-300x150.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-365-create-alternate-key-upsert-records-update-insert-data-768x383.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-365-create-alternate-key-upsert-records-update-insert-data-1024x511.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-365-create-alternate-key-upsert-records-update-insert-data-960x480.png 960w" sizes="(max-width: 1046px) 100vw, 1046px" /></a><p id="caption-attachment-4359" class="wp-caption-text">Create Alternate Key for Dynamics CRM / Dataverse Online Table (Useful for Update or Upsert Operation)</p></div>
<h4>Configure SSIS CRM Destination for Upsert</h4>
<ol>
<li>Double click CRM destination. On the Component Properties Tab, Change Operation to <strong>UpdateOrInsert</strong></li>
<li>
        Specify <strong>UpsertKeyField</strong> to either Table&#8217;s Primary Key Column Name or Alternate Key Name.</p>
<p>        <div id="attachment_4360" style="width: 932px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-update-insert-use-alternate-key-field.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4360" class="size-full wp-image-4360" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-update-insert-use-alternate-key-field.png" alt="Dynamics CRM / Dataverse Upsert using SSIS CRM Destination (Specify Alternate Key / Primary Key)" width="922" height="740" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-update-insert-use-alternate-key-field.png 922w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-update-insert-use-alternate-key-field-300x241.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-update-insert-use-alternate-key-field-768x616.png 768w" sizes="(max-width: 922px) 100vw, 922px" /></a><p id="caption-attachment-4360" class="wp-caption-text">Dynamics CRM / Dataverse Upsert Records using SSIS CRM Destination (Specify Alternate Key / Primary Key)</p></div>
    </li>
<li>
        Now go to Mappings tab and confirm Key field is mapped.</p>
<p>        <div id="attachment_4361" style="width: 866px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-mappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4361" class="size-full wp-image-4361" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-mappings.png" alt="Configure Dynamics CRM / Dataverse Mapping for Upsert in SSIS" width="856" height="642" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-mappings.png 856w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-mappings-300x225.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-upsert-mappings-768x576.png 768w" sizes="(max-width: 856px) 100vw, 856px" /></a><p id="caption-attachment-4361" class="wp-caption-text">Configure Dynamics CRM / Dataverse Mapping for Upsert in SSIS</p></div>
    </li>
<li>Click OK and Run Package to test CRM Upsert Operation.</li>
</ol>
<p>&nbsp;</p>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">If you want to use primary key for Upsert or Update Operation and not sure correct column name then you may use <a href="//zappysys.com/products/ssis-powerpack/ssis-dynamics-crm-source-connector/" target="_blank" rel="noopener">ZappySys Dynamics CRM / Dataverse Source</a> FetchXml Query Mode and check Object Browser (Table Info Tab &gt;&gt; <strong>PrimaryIdAttribute</strong> in the grid).</p>
<p>Primary Key name usually starts with table name and ends with &#8220;id&#8221; (e.g. for account table its <strong>accountid</strong> ).</p>
<div id="attachment_4358" style="width: 602px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-find-primarykey-column.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4358" class=" wp-image-4358" src="https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-find-primarykey-column.png" alt="Find Primary Key for Dynamics CRM / Dataverse Table" width="592" height="424" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-find-primarykey-column.png 792w, https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-find-primarykey-column-300x215.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/dynamics-crm-find-primarykey-column-768x550.png 768w" sizes="(max-width: 592px) 100vw, 592px" /></a><p id="caption-attachment-4358" class="wp-caption-text">Find Primary Key for Dynamics CRM / Dataverse Table</p></div>
</div></div>
<h4>Handling Inserted / Updated Records Output</h4>
<p>Now lets look at how to detect which records got inserted and which records got Update? In Upsert Mode each record can be directed to one of the following three Outputs.</p>
<ul>
<li>Inserted Records [Blue Arrow]</li>
<li>Updated Records [Blue Arrow]</li>
<li>Records with Error [Red Arrow]</li>
</ul>
<p>You can select Red or Blue arrow coming out from CRM Destination component. Drag and drop output arrow on any down stream component.</p>
<h3>Bulk Update &#8211; Modify Dynamics CRM / Dataverse Records in SSIS</h3>
<p>If you want to do bulk Update its very same steps as Upsert Operation except you have to set <strong>Operation = Update</strong> in the properties grid. For Key field you have to set primary key or Alternate Key.</p>
<div id="attachment_4362" style="width: 482px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-update-records.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4362" class="size-full wp-image-4362" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-update-records.png" alt="Dynamics CRM / Dataverse Update in SSIS" width="472" height="474" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-update-records.png 472w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-update-records-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-update-records-300x300.png 300w" sizes="(max-width: 472px) 100vw, 472px" /></a><p id="caption-attachment-4362" class="wp-caption-text">Dynamics CRM / Dataverse Update in SSIS</p></div>
<h3>Bulk Delete &#8211; Delete Dynamics CRM / Dataverse Records in SSIS</h3>
<p>Bulk delete doesn&#8217;t require many settings. All you have to change is <strong>Operation = Delete</strong> on Component Properties Screen. On the Mapping Screen Map only one column (Primary Key). If you are not sure which one is primary key please refer to the previous section (Upsert Operation).</p>
<div id="attachment_4363" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-delete.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4363" class="size-full wp-image-4363" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-delete.png" alt="Delete records from Dynamics CRM / Dataverse Online using SSIS (Primary Key mapping for CRM Bulk Delete)" width="677" height="483" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-delete.png 677w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-delete-300x214.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-4363" class="wp-caption-text">Delete records from Dynamics CRM / Dataverse Online using SSIS (Primary Key mapping for CRM Bulk Delete)</p></div>
<p>Some times you may get below errors. If you get this error make sure you delete all child records first before deleting parent. For example if you are deleting account then make sure you have to delete leads / contacts for that account or update leads / contacts so they don&#8217;t refer to account being deleted.</p><pre class="crayon-plain-tag">Error: 0xC0047062 at Dynamics CRM / Dataverse Bulk Delete, Delete Accounts [2]: System.Exception: Exception: The object you tried to delete is associated with another object and cannot be deleted.
Error Details: 
ApiExceptionSourceKey=Plugin/Microsoft.Crm.Common.ObjectModel.AccountService</pre><p>
<h2>Error Handling</h2>
<p>Many times you want to ignore bad records and continue processing good records. In such case you can use Dynamics CRM / Dataverse Error Output. Just grad Red arrow from CRM Destination and Drop on target component. Select Redirect Option for Error , Truncation both and Click OK.</p>
<p>Once you set Error Handling your component will continue to run without failing whole data flow. Later you can review errors (if you saving to destination).</p>
<div id="attachment_4364" style="width: 863px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-configure-error-output.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4364" class="size-full wp-image-4364" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-configure-error-output.png" alt="Configure Error Handling in SSIS Dynamics CRM / Dataverse Destination" width="853" height="801" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-configure-error-output.png 853w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-configure-error-output-300x282.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-dynamics-crm-destination-configure-error-output-768x721.png 768w" sizes="(max-width: 853px) 100vw, 853px" /></a><p id="caption-attachment-4364" class="wp-caption-text">Configure Error Handling in SSIS Dynamics CRM / Dataverse Destination</p></div>
<p>&nbsp;</p>
<div id="attachment_4365" style="width: 853px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/insert-dynamics-crm-records-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4365" class="size-full wp-image-4365" src="https://zappysys.com/blog/wp-content/uploads/2018/07/insert-dynamics-crm-records-ssis.png" alt="Loading records into Dynamics CRM / Dataverse Table using SSIS . Redirect Bad rows to Error Output." width="843" height="422" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/insert-dynamics-crm-records-ssis.png 843w, https://zappysys.com/blog/wp-content/uploads/2018/07/insert-dynamics-crm-records-ssis-300x150.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/insert-dynamics-crm-records-ssis-768x384.png 768w" sizes="(max-width: 843px) 100vw, 843px" /></a><p id="caption-attachment-4365" class="wp-caption-text">Loading records into Dynamics CRM / Dataverse Table using SSIS . Redirect Bad rows to Error Output.</p></div>
<h2>Handling Special Data Types (PartyList, Lookup, PickList)</h2>
<p>Certain datatypes in CRM requires special handling. <a href="https://zappysys.zendesk.com/hc/en-us/articles/360004361833-How-to-handle-Dynamics-CRM-PartyList-Lookup-and-PickList-datatypes-in-SSIS" target="_blank" rel="noopener">Check this article</a> to learn more about how to insert data into columns with <strong>PartyList</strong>, <strong>Lookup</strong> or <strong>PickList</strong> field.</p>
<h2>Conclusion</h2>
<p>In this article, We have seen how easy it is to integrate SQL Server data with Dynamics CRM / Dataverse. Using drag and drop connector you can perform Bulk insert, update, delete and Upsert operations. Download <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> to learn more about other possible scenarios which are not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/load-dynamics-crm-using-ssis-insert-upsert-delete-update/">Load data into Dynamics CRM using SSIS &#8211; Insert, Upsert, Delete, Update</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
