<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Arpita's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/arpita/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/arpita/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:17:33 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Include DESCRIPTION field from Close Opportunity in an email when opportunity is closed as lost/won</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/include-description-field-from-close-opportunity-in-an-email-when-opportunity-is-closed-as-lostwon</link>
      <pubDate>Thu, 13 Aug 2015 03:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2015/08/13/include-description-field-from-close-opportunity-in-an-email-when-opportunity-is-closed-as-lostwon/</guid>
      <description><![CDATA[I recently got a requirement from one of our clients where every time they close an...]]></description>
      <content:encoded><![CDATA[<p>I recently got a requirement from one of our clients where every time they close an opportunity&nbsp; as LOST&nbsp; they wanted to send an email through a workflow and include the description of why the opportunity was lost.</p>
<p>&nbsp;See below where we are closing an opportunity as LOST .</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5127.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5127.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5127.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5127.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp; Now, when we close it , it pops us with a separate window for close opportunity as shown below:-</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/2816.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/2816.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/2816.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/2816.2.png" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;</p>
<p>We were trying to achieve this with out of the box workflow feature in CRM and every time we receive an email the description used to come as NULL. Soon, we isolated that the description field where we enter the data when an opportunity is lost, &nbsp;is not the same &ldquo;description&rdquo; field that you see in Opportunity entity record form and add in your OOB workflow.</p>
<p>This description field is stored in ActivityPointerBase and not opportunity base and the entity we refer here is CLOSE OPPORTUNITY.</p>
<p>Researched and tried few things further and it was confirmed that this is not possible through OOB workflows to fetch this description field that you fill when an opportunity is lost .</p>
<p>We need to develop a custom plugin to achieve this requirement.</p>
<p>This is because the Opportunity entity has a 1:N relationship with the Opportunity Close entity, and you cannot access the 'N'&nbsp; (related) records through the workflow.</p>
<p>&nbsp;<span style="text-decoration: underline;"><strong>SOLUTION</strong></span></p>
<ul>
<li>Thus, we created a very simple logic as how we can achieve this. Most of you must have had already achieved it but thought of sharing it on public forum so that it can help everyone.</li>
<li>Firstly, we need to add one extra field to the Opportunity Entity &ndash;say&nbsp; new_closingdescription.</li>
<li>The Close Description field is to be added to the &ldquo;Closed Opportunities&rdquo; or &ldquo;Won Opportunities&rdquo; or &ldquo;Lost Opportunities&rdquo; views when you want to test if your code worked.</li>
<li>Note that these fields do not need to be present on the Opportunity form.</li>
<li>Next we need to create a simple plug-in which will run on "post-create" of an "Opportunity Close" record to copy the data from the Opportunity Close to the related Opportunity record.</li>
<li>I have tested it in CRM 2013 and it works fine</li>
<li>If you want to make it work for CRM 2015&nbsp; make sure you add the dlls from CRM 2015 SDK as in my case I have added CRM 2013 SDK</li>
<li>Below is the code for the plugin :-</li>
</ul>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;using System;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;using System.ServiceModel;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;using Microsoft.Xrm.Sdk;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;using Microsoft.Xrm.Sdk.Query;</p>
<p>&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;namespace Microsoft.Mervynr.OpportunityClose</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public class OptyClose: IPlugin</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;void IPlugin.Execute(IServiceProvider serviceProvider)</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IOrganizationService service = factory.CreateOrganizationService(context.UserId);&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Entity entity = (Entity)context.InputParameters["Target"];</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var description = entity.GetAttributeValue&lt;string&gt;("description");</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var opportunityId = ((EntityReference)entity.Attributes["opportunityid"]).Id;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Entity opportunity = service.Retrieve("opportunity", opportunityId, new ColumnSet(new string[] { "new_closingdescription" }));&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;opportunity["new_closingdescription"] = description;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;service.Update(opportunity);</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7317.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7317.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7317.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7317.3.png" alt="" border="0" /></a></p>
<p>I have also attached my complete solution in this blog , if you would like to directly exact the dll and the field name created is new_closingdescription</p>
<p>I hope this blog as well helps others who are trying to achieve this and are not developers so that you can directly use this dll , register it in CRM and start working :)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/63/49/50/Plug-ins.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-63-49-50/Plug_2D00_ins.zip">Plug-ins.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Export Duplicate Detection Rules from one organization and import to another organization in CRM 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/export-duplicate-detection-rules-from-one-organization-and-import-to-another-organization-in-crm-2013</link>
      <pubDate>Wed, 15 Oct 2014 08:40:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2014/10/15/export-duplicate-detection-rules-from-one-organization-and-import-to-another-organization-in-crm-2013/</guid>
      <description><![CDATA[Till now we did not have any inbuilt supported way of exporting the duplicate detection rules from...]]></description>
      <content:encoded><![CDATA[<p>Till now we did not have any inbuilt supported way of exporting the duplicate detection rules from one CRM organization to another in same or different deployment.&nbsp;&nbsp;</p>
<p>Now, with latest release of CRM 2013 SDK Microsoft has provided a tool to achieve this and by which we will be able to export and import the duplicate detection&nbsp;rules using <strong>DataMigrationUtility.exe</strong></p>
<p>We do not have any functionality in CRM in UI to export the duplicate detection rule or create a solution for it.&nbsp;&nbsp;</p>
<ul>
<li>Download the CRM 2013 SDK&nbsp;from following link :-&nbsp;&nbsp;</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://www.microsoft.com/en-in/download/details.aspx?id=40321">https://www.microsoft.com/en-in/download/details.aspx?id=40321</a>&nbsp;</p>
<ul>
<li>Extract it and then go to&nbsp;tools folder&nbsp;&nbsp;</li>
<li>Remember the duplicate&nbsp;detection rules have to be unpublished before the export.&nbsp;</li>
<li>We will see a folder "<strong>CRM Configuration Migration</strong>". Open <strong>DataMIgrationUtility.exe&nbsp;</strong>tool.</li>
</ul>
<p>&nbsp;</p>
<p>Now follow below steps:&nbsp;&nbsp;</p>
<ol>
<li value="1">Disable all&nbsp;duplicate detection rules from the organization you would like to export&nbsp;the duplicate detection rules from.</li>
<li>Next, open the&nbsp;tool you will see below screen:-&nbsp;</li>
</ol>
<p>&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/1803.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/1803.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/1803.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/1803.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<ol>
<li value="3">Click on&nbsp;Create Schema and then continue, it will give us a login page. Make sure&nbsp; we check on "Display list of available organizations"</li>
</ol>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7418.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7418.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7418.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7418.2.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;</p>
<ol>
<li value="4">Now based&nbsp;on your deployment select enter the details and login. Once it gets&nbsp;connected to the deployment we can select the organization we would like&nbsp;to export the rules from.</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3618.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3618.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3618.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3618.3.png" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;</p>
<ol>
<li value="5">Once we select an&nbsp;organization it will ask us to select the solution and the Entity .</li>
<li>Then in drop down select&nbsp; Entity as "DUPLICATE&nbsp;DETECTION RULES".&nbsp;&nbsp;</li>
</ol>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/0218.4.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/0218.4.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/0218.4.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/0218.4.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li value="7">Next, select all&nbsp;and say add fields and add entity</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3515.5.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3515.5.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3515.5.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3515.5.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<ol>
<li value="8">Similarly, add "Duplicate Rule Condition" as well &nbsp;in SELECT Entity drop down and select all and say ADD Fields. Now, you should finally see like this:-</li>
</ol>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3302.Untitled%20picture.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3302.Untitled-picture.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3302.Untitled%20picture.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3302.Untitled-picture.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Then click on&nbsp;SAVE and then it asks you would you like to export the data--&gt; Say YES&nbsp;and then you see below:-</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5543.6.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5543.6.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5543.6.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5543.6.jpg" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;</p>
<ol>
<li value="9">Save it in some&nbsp;location&nbsp;</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/2500.7.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/2500.7.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/2500.7.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/2500.7.jpg" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;</p>
<ol>
<li value="10">And say EXPORT</li>
</ol>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/1007.8.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/1007.8.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/1007.8.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/1007.8.jpg" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;&nbsp;</p>
<ol>
<li value="11">Next it will show&nbsp;you progress as follows :-</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/0003.9.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/0003.9.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/0003.9.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/0003.9.jpg" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;&nbsp;</p>
<ol>
<li value="12">It will notify&nbsp;once it is complete. This way we will get the schema file exported that we&nbsp;can import in any organization and get the duplicate detection rules.</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/6683.10.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/6683.10.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/6683.10.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/6683.10.jpg" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>IMPORT</strong></span></p>
<p>Now, once we have the schema file we can import it to any other organization&nbsp; :-&nbsp;&nbsp;</p>
<p>Open tool again , select display all organization and login Select the organization we want to import duplicate rules in :-</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8831.11.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8831.11.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8831.11.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8831.11.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/2134.12.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/2134.12.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/2134.12.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/2134.12.jpg" alt="" border="0" /></a></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8737.13.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8737.13.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8737.13.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8737.13.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5707.14.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5707.14.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5707.14.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5707.14.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Hope this helps all CRM users who were waiting for this feature in CRM for a long time!</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Issues while Integrating SOAPUI tool with Dynamics CRM 2013 | "HTTP Error 401 – Unauthorized: Access is denied"</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/issues-while-integrating-soapui-tool-with-dynamics-crm-2013-http-error-401-unauthorized-access-is-denied</link>
      <pubDate>Sat, 27 Sep 2014 02:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2014/09/27/issues-while-integrating-soapui-tool-with-dynamics-crm-2013-http-error-401-unauthorized-access-is-denied/</guid>
      <description><![CDATA[What is SOAP UI?
SOAPUI tool is a third party tool. It is a quick simple tool to allow you to start...]]></description>
      <content:encoded><![CDATA[<p><strong>What is SOAP UI?</strong></p>
<p>SOAPUI tool is a third party tool. It is a quick simple tool to allow you to start testing your SOAP calls with very little effort. I have seen our Microsoft Dynamics CRM users using this a lot and recently I worked with one of my partners where he was using this tool all fine in CRM 2011 until he started using CRM 2013 and tested this tool and it failed with different errors.</p>
<p>I tried looking for information around this tool with regards to Dynamics CRM but found very few blogs and information around it. This is not a Microsoft built tool neither we(Microsoft) support it but I thought sharing by experience on this tool would be worth writing as it might help many of you who are using this tool and if they come across these error. Most of the articles talk about how to use it and all its steps but none mention about the issue you would face while connecting it for the first time.</p>
<p><strong>How it works ?</strong></p>
<p>To start with we grab the CRM .wsdl from our CRM application, which can be downloaded from the &lsquo;Organization Service&rsquo; link under Settings---&gt; Customizations ---&gt; Developer Resources. Once we have this we should be ready to create a new SOAP UI project, by consuming the .wsdl we just&nbsp; downloaded.</p>
<p>Open SOAP UI, and select &lsquo;New Project&rsquo; from the File menu. In the &lsquo;New SOAP Project window&rsquo;, add a project name and open the organization.wsdl you just downloaded.&nbsp;&nbsp;</p>
<p>In this tool&nbsp; you will need to create the 3 headers that will be included when using Client side code. We can do this by expanding the Headers section on the bottom of the screen, and then by clicking on the &lsquo;+&rsquo; icon to add each of the following headers. (For this call, I have taken example of&nbsp; EXECUTE, so we will use &lsquo;Execute&rsquo; as our action, but this would change depending on the action we want to use)&nbsp;</p>
<p style="color: #141412; font-family: Calibri; font-size: 11pt; margin-top: 0pt; margin-bottom: 18pt;"><span style="font-weight: bold;">Headers:</span></p>
<p style="margin-top: 0pt; margin-bottom: 18pt;"><span style="color: #141412; font-family: Calibri; font-size: 11pt; font-weight: bold;">SOAPAction</span><span style="color: #141412; font-family: Calibri; font-size: 11pt;">: (e.g. </span><span style="font-family: Calibri; font-size: 11pt;"><a href="https://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute">https://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute</a>&nbsp;</span><span style="font-family: Calibri; font-size: 11pt;">as we are using execute method</span><span style="color: #141412; font-family: Calibri; font-size: 11pt;">)</span></p>
<p style="color: #141412; font-family: Calibri; font-size: 11pt; margin-top: 0pt; margin-bottom: 18pt;"><span style="font-weight: bold;">Content-type</span><span style="font-size: 11pt;">: text/xml; charset=utf-8</span></p>
<p style="color: #141412; font-family: Calibri; font-size: 11pt; margin-top: 0pt; margin-bottom: 18pt;"><span style="font-size: 11pt;"><span>Accept</span><span>: application/xml,&nbsp;text/xml, */*</span><br /></span></p>
<p style="color: #141412; font-family: Calibri; font-size: 11pt; margin-top: 0pt; margin-bottom: 18pt;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7345.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7345.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7345.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7345.1.png" alt="" border="0" /></a></p>
<p>Then we also choose the Auth for it to connect to CRM server. We have 3 options in here&nbsp; Kerberos, NTLM, Basic. It works fine with NTLM and I have tested it successfully. Things to Remember while using this tool :-</p>
<ul type="disc">
<li><span>This tool does not work with&nbsp;IFD and works on Windows Authentication as far as from what I found during&nbsp;my research.</span></li>
</ul>
<div>
<ul type="disc">
<li>Then URL that we use in this URL, we add &ldquo;/web&rdquo; to the end.&nbsp; If you forget this step, you will most likely get the following error: &nbsp;&nbsp;</li>
</ul>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &ldquo;The server cannot service the request because the media type is unsupported.&rdquo;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g..&nbsp;<a href="https://%3cservernameport%3e">https://&lt;servername:port&gt;/&lt;orgname&gt;/XRMServices/2011/Organization.svc/web</a></p>
</div>
<ul type="disc">
<li><span>Ideally it should work with Kerberos Authentication but I have seen it successful only in NTLM protocol for windows authentication.</span></li>
</ul>
<p>We can use any way to get the SOAP request XML (using Soap Logger etc in CRM SDK).<span style="color: #141412; font-family: Calibri; font-size: 11pt;">&nbsp;</span>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3542.soap4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3542.soap4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3542.soap4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3542.soap4.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>ISSUE</strong></span></p>
<p style="color: #141412; font-family: Calibri; font-size: 11pt; margin-top: 0pt; margin-bottom: 18pt;"><span style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">So, once we pasted&nbsp;</span><span style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">the xml for SOAP request in SOAP UI tool for Dynamics CRM 2013 the SOAP&nbsp;</span><span style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">response XML returned following error to us:-</span><span style="font-size: 11pt;">&nbsp;</span></p>
<p><span style="color: #ff0000;">"HTTP Error 401 &ndash; Unauthorized: Access is denied"<span style="font-family: Calibri; font-size: 11pt;">&nbsp;</span></span></p>
<p><span style="text-decoration: underline;"><strong>DETAILS and ANALYSIS DONE to&nbsp;FIND THE ROOT CAUSE</strong></span></p>
<p style="color: #141412; font-family: Calibri; font-size: 11pt; margin-top: 0pt; margin-bottom: 18pt;">&nbsp;<span style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">We searched various&nbsp;</span><span style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">forum and blogs and found many are complaining </span><span style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">about the same error they are hitting using this tool with CRM 2013.</span><span style="font-size: 11pt;">&nbsp;</span></p>
<p>Note: This blog just&nbsp;mentions my experience on this error and its resolution. This does not mean&nbsp;this would match with very user and every CRM deployment<span style="color: #141412; font-family: Calibri; font-size: 11pt;">&nbsp;</span></p>
<p>We looked at every&nbsp;possible place related to authentication and very setting in our server for&nbsp;authentication, SPN, Kerberos, user password name etc was all good!</p>
<p style="color: #141412; font-family: Calibri; font-size: 11pt; margin-top: 0pt; margin-bottom: 18pt;">&nbsp;<span style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">Finally after&nbsp;</span><span style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">collecting multiple traces and analysis of NETMON logs we found below:-&nbsp;</span><span style="font-size: 11pt;">&nbsp;</span></p>
<ul>
<li>We did test using&nbsp;both kerberos and NTLM authentication to connect to CRM 2013, we found that&nbsp;SOAPUI application is not responding to credential challenge (NTLM) by&nbsp;server and thus IIS rejects the request.</li>
<li lang="en-IN">Ntlm authentication failed because SOAPUI seems to be using Ntlm v1 w\o any encryption which is not&nbsp;default and not recommended. It seems Server hosting CRM 2013 is not&nbsp;configured to respond to Ntlm v1 w\o encryption security and thus&nbsp;authentication fails.<span style="color: #141412; font-family: Calibri; font-size: 11pt;">&nbsp;</span></li>
</ul>
<div>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- Http: Request, POST /CRMOrgTest/XRMServices/2011/Organization.svc/web , Using NTLM Authorization</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Command: POST</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + URI: /CRMOrgTest/XRMServices/2011/Organization.svc/web</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + SOAPAction:&nbsp; <a href="https://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute">https://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute</a></p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UserAgent:&nbsp; Apache-HttpClient/4.1.1 (java 1.5)</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - Authorization: NTLM</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - Authorization:&nbsp; NTLM TlRMTVNTUAABAAAAATIAAAMAAwAgAAAACAAIACMAAABDVFNQQzE5NDk2OQ==</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - NTHTNtlmAuthorization:</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Scheme: NTLM</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - NLMP: NTLM NEGOTIATE MESSAGE, Workstation Domain: CTS, Workstation Name: PC194969</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageType: Negotiate Message (0x00000001)</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ NegotiateFlags: 0x00003201 (NTLM v1No encryption, No Sign or Seal)</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ DomainNameFields: Length: 3, Offset: 32</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ WorkstationFields: Length: 8, Offset: 35</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WorkstationDomain: CTS</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WorkstationName: PC194969</p>
<p lang="en-IN">&nbsp;</p>
<ul>
<li>Kerberos authentication failed because SOAP UI didn&rsquo;t respond to credential challenge at all, not sure why! SOAP UI team should look into this and give us some pointers. We checked in network traces and received. We do see that&nbsp;<span>&nbsp;</span><span>&lt;&lt;&lt;&lt; Server responds with 401 telling client that it requires credentials and it includes authentication types supported!!,&nbsp;<span>&nbsp;</span><span>&lt;&lt;&lt;&lt; Next request from Client doesn&rsquo;t includes Authentication header i.e. credentials are not sent by it, BAD!!</span></span></li>
</ul>
<div>
<ul type="disc">
<li lang="en-IN"><span>&nbsp;</span><span>So, logs confirmed that we need to see something from&nbsp;</span><span>SOAP UI tool itself who is causing failure by either using not allowed authentication protocol or not responding to authentication challenge </span><span>. To confirm that, we used WCF test client to access /</span><span>CRMOrgTest</span><span>/XRMServices/2011/Organization.svc/web endpoint. We found that WCFTestClient was able to pass security successfully! So, it&rsquo;s confirmed that CRM 2013 Organization.svc/web endpoint is not in fault here!!</span></li>
</ul>
<div>
<ul type="disc">
<li lang="en-IN">Then, we worked on a question &ldquo;Why SOAPUI is able to connect to CRM 2011 Organization.svc/web endpoint?&rdquo;. Well, based on the network logs for Ntlm, it seems server hosting CRM 2011 allows Ntlm v1 w\o encryption.</li>
</ul>
<ul type="disc">
<li lang="en-IN"><span>We did some research to find what configuration on system should allow Ntlm v1 w\o encryption. We found that following security policies could control the </span>behavior</li>
</ul>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1.&nbsp; Network security: LAN Manager authentication level:</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;This security setting determines which challenge/response authentication protocol is used for network</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;logons. This choice affects the level of authentication protocol used by clients, the level of session security</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;negotiated</p>
<p lang="en-IN"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2.</span><span>&nbsp; </span><span>Network security: Minimum session security for NTLM SSP based (including secure RPC) clients: </span></p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; This security setting allows a client to require the negotiation of 128-bit encryption and/or NTLMv2 session</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;security. These values are dependent on the LAN Manager Authentication Level security setting value.</p>
<p lang="en-IN"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3.</span><span>&nbsp; </span><span>Network security: Minimum session security for NTLM SSP based (including secure RPC) servers:</span></p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; This security setting allows a server to require the negotiation of 128-bit encryption and/or NTLMv2 session</p>
<p lang="en-IN">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; security. These values are dependent on the LAN Manager Authentication Level security setting value.</p>
<ul>
<li>&nbsp; We compared the above security policies on servers hosting CRM 2013 and CRM 2011 and found that Policy# (2) and Policy# (3) above were different on both servers. CRM 2011 machine had set them to Minimum security which will allow Ntlm authentication w\o encryption!&nbsp;</li>
</ul>
<ul type="disc">
<li lang="en-IN"><span>&nbsp;This confirms why we see different behavior with SOAPUI connecting to CRM 2011 and CRM 2013 Organization.svc/web endpoint.</span></li>
</ul>
<p lang="en-IN">&nbsp;</p>
</div>
<p><span style="text-decoration: underline;"><strong>RESOLUTION</strong></span></p>
<p><span style="color: #ff0000;">&nbsp;The temporary resolution we used after checking in netmon traces is not a supported one and we should not edit this local security policy to make it work. SOAP UI tool team should look into it and see why it is failing until we do below steps. Microsoft do not support this tool neither&nbsp;recommend to perform below changes.&nbsp;</span></p>
<ul type="disc">
<li>On the Server opened "Local Security Policy"</li>
</ul>
<div>
<ul type="disc">
<li>After matching security policies on both servers (hosting CRM 2011 and CRM 2013) and made below configuration changes on CRM 2013 server that we had in &nbsp;CRM 2011 server for testing the issue got fixed. i.e.</li>
</ul>
<div><ol>
<li><span>Opened Local Policies--&gt; Security Policies</span></li>
<li lang="en-IN"><span>Double clicked Network security: Minimum session security for NTLM SSP based (including secure RPC) clients: &nbsp;uncheck "Require 128-bit encryption"</span></li>
<li lang="en-IN"><span>Double clicked Network security: Minimum session security for NTLM SSP based (including secure RPC) servers: uncheck "Require 128-bit encryption"</span></li>
</ol></div>
</div>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5353.soap2.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5353.soap2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5353.soap2.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5353.soap2.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
</div>
<div>
<p lang="en-IN">&nbsp;</p>
<p lang="en-IN">&nbsp;</p>
<p lang="en-IN">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5428.soap3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5428.soap3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5428.soap3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5428.soap3.png" alt="" border="0" /></a></p>
<p lang="en-IN">&nbsp;</p>
</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Unable to Run CRM 2011 and CRM 2013 reports 'Sys' is undefined</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/unable-to-run-crm-2011-and-crm-2013-reports-sys-is-undefined</link>
      <pubDate>Wed, 24 Sep 2014 01:32:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2014/09/24/unable-to-run-crm-2011-and-crm-2013-reports-sys-is-undefined/</guid>
      <description><![CDATA[As a continuation of one of the unique issues on CRM Reports which I have described in one of my old...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: arial,helvetica,sans-serif;">As a continuation of one of the unique issues on CRM Reports which I have described in one of my old blogs <a href="https://blogs.msdn.com/b/arpita/archive/2012/07/21/microsoft-dynamics-crm-2011-unable-to-run-any-reports-due-to-missing-security-role-in-default-organization.aspx">https://blogs.msdn.com/b/arpita/archive/2012/07/21/microsoft-dynamics-crm-2011-unable-to-run-any-reports-due-to-missing-security-role-in-default-organization.aspx</a>, I was surprised to see another cause of this issue which pops up with exactly same error message.&nbsp;&nbsp;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">If you see fiddler traces it fails exactly on these page WebResource.axd, ScriptResource.axd, Reserved.ReportViewerWebControl.axd as it used to in my last post.</span></p>
<p><span style="font-family: arial,helvetica,sans-serif; text-decoration: underline;"><strong>ISSUE&nbsp;</strong></span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">In CRM UI when we try and run the report from CRM we receive script error as follows:-</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">Webpage error details</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">User Agent:</span><br /><span style="font-family: arial,helvetica,sans-serif;">Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">Timestamp: Fri, 5 Sep 2014 08:33:26 UTC</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;Message: Syntax error</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;Line: 1</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">Char: 1</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">Code: 0</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">URI: <a href="https://dynamics-app.mj.niksun.com/WebResource.axd?d=iTejnrBKj_lSxgH0zeqXUg7Hf6yGNH32DYgpUMJdCFrzVOMOGoL5TGoYlOLTxN6gYISiqx1NtzBzhEaJIQ9rW94zTEzTYfuoQUCQsrTOQnM1&amp;t=634933840637882419">https://dynamics-app.mj.niksun.com/WebResource.axd?d=iTejnrBKj_lSxgH0zeqXUg7Hf6yGNH32DYgpUMJdCFrzVOMOGoL5TGoYlOLTxN6gYISiqx1NtzBzhEaJIQ9rW94zTEzTYfuoQUCQsrTOQnM1&amp;t=634933840637882419</a></span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">Message: 'Sys' is undefined</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">Line: 54</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">Char: 1</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">Code: 0</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">URI: <a href="https://dynamics-app.mj.niksun.com/NiksunDynamicsCRM/CRMReports/rsviewer/reportviewer.aspx">https://dynamics-app.mj.niksun.com/NiksunDynamicsCRM/CRMReports/rsviewer/reportviewer.aspx</a></span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">We also see that all the images in the report are missing, in case you do not get the script error pop up.&nbsp;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8880.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8880.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8880.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8880.1.png" alt="" width="697" height="363" border="0" /></a></span></p>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif;">I worked on this for hours together, ruled out all the possibilities of this script issue which I had mentioned in my previous blog but nothing helped. We checked all permissions for service accounts, all SPNs were good, made sure it is not IE issue, collected reporting and platform traces but none of these traces logged any errors which made my work even more difficult.&nbsp;&nbsp;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">After collecting all kinds of possible traces I was able to isolate this issue and crack it and hence decided to share my experience with you all who would come across this issue on CRM Reports.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif;"><strong><span style="text-decoration: underline;">RESOLUTION&nbsp;</span></strong>&nbsp;</span></p>
<ul>
<li><span style="font-family: arial,helvetica,sans-serif;">Updating the CRM web.config&nbsp;file is not supported but still we have seen many of us are not aware of&nbsp;this and we end up editing it and start facing all sorts of unexpected&nbsp;issues.&nbsp;</span></li>
<li><span style="font-family: arial,helvetica,sans-serif;">We have various modules in it. One of the modules is &lt;httpRedirect&gt;. If you see our out of the&nbsp;box web.config file you won't find it in system.webserver unless we have&nbsp;done any changes in IIS in httpRedirect ,module.&nbsp;</span></li>
<li><span style="font-family: arial,helvetica,sans-serif;">We found that someone had manually updated the web.config file of CRM website as follows:-</span></li>
</ul>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7002.Capture.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7002.Capture.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7002.Capture.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7002.Capture.JPG" alt="" width="750" height="98" border="0" /></a>&nbsp;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As the clarity of the screenshot is not good, please see below from CRM web.config file:-</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;httpRedirect enabled="true" destination=<a href="https://crm.contoso.com/AbcCRM/main.aspx">https://crm.contoso.com/AbcCRM/main.aspx#</a> exactDestination="false" childOnly="true" /&gt;&nbsp;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &lt;httpErrors&gt;&nbsp;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &lt;remove statusCode="403" subStatusCode="-1" /&gt;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &lt;error statusCode="403" subStatusCode="-1" path=<a href="https://dynamics-app.mj.niksun.com">https://crm.contoso.com</a> responseMode="Redirect" /&gt;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;/httpErrors&gt;</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;urlCompression doDynamicCompression="true" /&gt;</span></p>
<p>&nbsp;&nbsp;</p>
<ul>
<li><span style="font-family: arial,helvetica,sans-serif;">After we removed it&nbsp;completely after comparing it with default working CRM web,config file&nbsp; and did IISRESET on CRM we&nbsp;were able to run all reports with no issue.&nbsp;&nbsp;</span></li>
</ul>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note: Editing Web.config file of crm is not supported and can cause unexpected behaviors in CRM like this&nbsp;</span></p>
<ul>
<li><span style="font-family: arial,helvetica,sans-serif;">Sometime this kind of&nbsp;scenarios become so complicated that it does not catch in crm plat traces&nbsp;too and hence becoming time consuming.&nbsp;&nbsp;</span></li>
</ul>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif; text-decoration: underline;"><strong>ADDITIONAL CAUSES OF THIS ISSUE</strong>&nbsp;</span></p>
<ul>
<li><span style="font-family: arial,helvetica,sans-serif;">In IIS we have httpRedirect&nbsp;and UrlRewrite modules.</span></li>
<li><span style="font-family: arial,helvetica,sans-serif;">Please open it for Dynamics&nbsp;CRM website , if you see any custom rules in any of these for CRM, this can cause scripts error like this too on CRM reports.&nbsp;</span></li>
<li><span style="font-family: arial,helvetica,sans-serif;">By default in UrlRewrite we&nbsp;should see three rules for CRM(do not touch them). If you see any other&nbsp;custom rules apart from these three default rules please remove them and&nbsp;do an IISRESET to see if the issue gets resolved.</span></li>
</ul>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/4743.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/4743.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/4743.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/4743.3.png" alt="" width="653" height="143" border="0" /></a>&nbsp;</span></p>
<p>&nbsp;</p>
<ul>
<li><span style="font-family: arial,helvetica,sans-serif;">By default httpRedirect in&nbsp;IIS looks like this for CRM website.&nbsp;</span></li>
</ul>
<p><span style="font-family: arial,helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8512.4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8512.4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8512.4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8512.4.png" alt="" border="0" /></a></span></p>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif;">Hope this blog will help many of us if&nbsp;we come across this issue on Report!&nbsp;</span></p>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif;">This blog was continuation of below blog with&nbsp;same error different cause:-</span></p>
<p><span style="font-family: arial,helvetica,sans-serif;"><a href="https://blogs.msdn.com/b/arpita/archive/2012/07/21/microsoft-dynamics-crm-2011-unable-to-run-any-reports-due-to-missing-security-role-in-default-organization.aspx">https://blogs.msdn.com/b/arpita/archive/2012/07/21/microsoft-dynamics-crm-2011-unable-to-run-any-reports-due-to-missing-security-role-in-default-organization.aspx</a></span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/56/01/60/1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-56-01-60/1.png">1.png</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Reading Pane for any CRM Entity displays Outlook Contact Card in Outlook Client for CRM</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/reading-pane-for-any-crm-entity-displays-outlook-contact-card-in-outlook-client-for-crm</link>
      <pubDate>Wed, 13 Aug 2014 05:39:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2014/08/13/reading-pane-for-any-crm-entity-displays-outlook-contact-card-in-outlook-client-for-crm/</guid>
      <description><![CDATA[In this article, I am covering the issues and scenarios we face with Dynamics CRM functionality when...]]></description>
      <content:encoded><![CDATA[<p>In this article, I am covering the issues and scenarios we face with Dynamics CRM functionality when an older version of Outlook is un-installed and a user upgrades or installs newer version of outlook again in same machine.&nbsp;</p>
<p>As we all know CRM for outlook client is widely used by CRM users which gives them ease to access CRM directly in their Outlook, it is very important that we know if we have remnant of older version of Office Outlook it creates issues with certain CRM functionalities.&nbsp;&nbsp;</p>
<p>For instance&nbsp; if you have&nbsp; recently upgraded from Outlook 2007 to Outlook 2013 32 bit or 64 bit.&nbsp;&nbsp;</p>
<p>Recently, I saw a unique issue that occurs if Outlook 2007 remnants are left in your machine. We see that the CRM Reading pane in outlook client for CRM is showing only contact preview for all entity records.&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/4505.C1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/4505.C1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/4505.C1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/4505.C1.png" alt="" width="547" height="306" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>We click on accounts or contacts or leads but it opens your contact card from outlook in the reading instead of showing the actual record.&nbsp;&nbsp;</p>
<p>We made sure that we uninstalled Outlook 2007 using a usual method of uninstall from control panel add and remove programs. Tried looking at various option how it is related to our reading pane issue.&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong>How to go about Troubleshooting such Issues</strong></span></p>
<p>&nbsp;&nbsp;</p>
<ul>
<li>I would advise everyone that&nbsp;first we should always start with checking Microsoft Office Interop&nbsp;Assembly in control panel "add and remove programs" for any kind&nbsp;of issue or any unexpected behavior in CRM.&nbsp;</li>
<li>Next, I wanted to make sure&nbsp;if we see any errors in Outlook while navigation in CRM section. So I&nbsp;enabled UI errors&nbsp;&nbsp;</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File &gt; Options &gt; Advanced and in the Developers section check the 'Show add-in user interface errors' then restart.&nbsp; &nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;There were no errors.&nbsp;</p>
<ul>
<li>Next try following steps&nbsp;which is basic step everyone follows using, but still worth mentioning in&nbsp;this blog&nbsp;</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1. Uninstall The Microsoft Dynamics CRM 2011/2013 Client from Control panel.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2. Delete MSCRM folder from C:\Users\Your username\AppData\local\Microsoft\MSCRM</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.&nbsp;Perform similar step for C:\Users\Your username\AppData\local\Microsoft\MSCRM and delete MSCRM folder if it exist.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 4.&nbsp;Uninstall Office 2007 Completely.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;5. Uninstall Office 2010</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;6. Install Office 2010.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; 7. Install Microsoft Dynamics CRM 2011/2013 Client.</p>
<p>&nbsp;</p>
<ul>
<li>Then researched on registry&nbsp;keys that get added when we install Outlook. We found that whenever we&nbsp;install any version of Outlook we get following registry key added :-&nbsp;</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; [HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.3]</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; "PrimaryInteropAssemblyName"="Microsoft.Office.Interop.Outlook, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;This corresponds to Office 2007.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;If the user is using Office 2010, they will need to be using the following:&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.4]</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; "PrimaryInteropAssemblyName"="Microsoft.Office.Interop.Outlook,Version=14.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"@="Microsoft Outlook 14.0 Object Library</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/0537.c2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/0537.c2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/0537.c2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/0537.c2.png" alt="" width="571" height="277" border="0" /></a></p>
<p>&nbsp;</p>
<ul>
<li>So, based on Outlook versions&nbsp;it would different in different environment as below:-</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;9.2 Outlook 2003</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.3 Outlook 2007</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 9.4 Outlook 2010</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 9.5 Outlook 2013</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Of course&nbsp; there are various other keys which get added with install of Outlook but this was one of the registries which was causing issue with CRM.&nbsp;&nbsp;</p>
<ul>
<li>We checked that we had&nbsp;Outlook 2013 where we had issue with Reading pane showing us Contact card&nbsp;and even after uninstalling Outlook 2007 it had this registry and it&nbsp; wasn&rsquo;t&nbsp; removed during its&nbsp;uninstallation.&nbsp;</li>
<li>Thus we made sure we have&nbsp;required permission to rename or delete the Outlook 2007 registry key 9.3&nbsp;to 9.3_old so that it does not refer to this anymore.&nbsp;Thus, we renamed it&nbsp;&nbsp;</li>
<li>Restarted the Outlook and&nbsp;checked the issue&nbsp;was resolved&nbsp;</li>
</ul>
<p>&nbsp;</p>
<p><strong><span style="font-size: medium;">Additional Information&nbsp;</span></strong></p>
<p>In certain scenario you might get an error while deleting or renaming this key&nbsp;</p>
<p>"Cannot delete 9.3. Error while deleting key"</p>
<p>&nbsp;For this you can follow below kb :-</p>
<p>&nbsp;<a href="https://support.microsoft.com/kb/2021860">https://support.microsoft.com/kb/2021860</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Using Microsoft Dynamics CRM 2011 outlook client with Microsoft Dynamics CRM 2013 organization.</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/using-microsoft-dynamics-crm-2011-outlook-client-with-microsoft-dynamics-crm-2013-organization</link>
      <pubDate>Fri, 08 Nov 2013 01:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2013/11/08/using-microsoft-dynamics-crm-2011-outlook-client-with-microsoft-dynamics-crm-2013-organization/</guid>
      <description><![CDATA[I see there is lot of confusion around a question if CRM 2013 work with existing CRM 2011 outlook...]]></description>
      <content:encoded><![CDATA[<p style="color: #222222; font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;"><span style="background: white;">I see there is lot of confusion around a question if </span>CRM 2013 work with existing CRM 2011 outlook client? Do we have to uninstall CRM 2011 outlook client completely to make things work and install CRM 2013 outlook client?</span></p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;">&nbsp;</p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;"><span style="color: #222222;">The answer is yes, Microsoft Dynamics CRM 2013 instance can be used on Microsoft Dynamics CRM 2011 Outlook Client . In this scenario we need to remember that </span>you cannot take data offline by using <span style="font-weight: bold;">Go offline</span>. To take data offline, upgrade to CRM 2013 for Outlook.</span></p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;">&nbsp;</p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;">Make sure you have at least Microsoft Dynamics CRM 2011 Update Rollup 12 applied. Only Microsoft Dynamics CRM 2011 for Outlook with Microsoft Dynamics CRM 2011 Update Rollup 12 or later update rollup is compatible with Microsoft Dynamics CRM Server 2013.</span></p>
<p style="color: #222222; font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;">&nbsp;</p>
<p style="font-family: Calibri; font-size: 11pt; margin-top: 0pt; margin-bottom: 0pt;">Then, I further read in our CRM 2013 implementation guide and it is explicitly mentioned that although Microsoft Dynamics CRM 2011 for Outlook with Microsoft Dynamics CRM 2011 Update Rollup 6 is supported for upgrade to CRM 2013 for Outlook, CRM 2011 for Outlook with CRM 2011 Update Rollup 6 is incompatible with Microsoft Dynamics CRM Server 2013.</p>
<p style="color: black; font-family: Verdana; font-size: 11pt; margin-top: 0pt; margin-bottom: 0pt;">&nbsp;</p>
<p style="color: black; font-family: Verdana; font-size: 11pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Reference to the content in IG guide:</span></p>
<p style="color: black; font-family: Verdana; font-size: 11pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><a href="https://msdn.microsoft.com/en-us/library/hh699711.aspx">https://msdn.microsoft.com/en-us/library/hh699711.aspx</a></span></p>
<p style="color: black; font-family: Verdana; font-size: 11pt; margin-top: 0pt; margin-bottom: 0pt;">&nbsp;</p>
<p style="color: #222222; font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;">Here is the link for both the outlook clients:</span></p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;">&nbsp;</p>
<p style="color: #222222; font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;">CRM 2011 Outlook Client</span></p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;"><a href="https://www.microsoft.com/en-au/download/details.aspx?id=27821">https://www.microsoft.com/en-au/download/details.aspx?id=27821</a></span></p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;">&nbsp;</p>
<p style="color: #222222; font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;">CRM 2013 Outlook Client</span></p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;"><a href="https://www.microsoft.com/en-us/download/details.aspx?id=40344">https://www.microsoft.com/en-us/download/details.aspx?id=40344</a></span></p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;">&nbsp;</p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;">Microsoft Dynamics CRM 2013 Implementation Guide</span></p>
<p style="font-family: Calibri; font-size: 10pt; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: small;"><a href="https://www.microsoft.com/en-us/download/details.aspx?id=40322">https://www.microsoft.com/en-us/download/details.aspx?id=40322</a></span></p>]]></content:encoded>
    </item>
    <item>
      <title>How publishing of customization is related to CRM StringMapBase table.</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/how-publishing-of-customization-is-related-to-crm-stringmapbase-table</link>
      <pubDate>Tue, 05 Feb 2013 18:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2013/02/05/how-publishing-of-customization-is-related-to-crm-stringmapbase-table/</guid>
      <description><![CDATA[StringMapBase table in CRM database is one of the most interesting table I recently came across when...]]></description>
      <content:encoded><![CDATA[<p>StringMapBase table in CRM database is one of the most interesting table I recently came across when I faced an issue while publishing any kind of customization in my CRM environment. So, finally I decided to shed some light on this table and how we can fix one peculiar issue related this table . This is the table in CRM which stores the related values for picklists for all entities in CRM. Let's dig a little bit into the structure of the table and how you can query some useful info from it.&nbsp;&nbsp;</p>
<p>I read about this table and found lot of queries that we can use to get useful information about picklists in CRM.&nbsp;&nbsp;</p>
<p><span style="color: #ff0000;">Note</span>: Modifying data in this table is not recommended and not supported by Microsoft Support.</p>
<p>&nbsp;</p>
<p><span style="font-size: medium; text-decoration: underline;"><strong>Table Structure</strong></span></p>
<p>&nbsp;</p>
<div>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<p>Field</p>
</td>
<td>
<p>Data Type</p>
</td>
<td>
<p>Comments</p>
</td>
</tr>
<tr>
<td>
<p>ObjectTypeCode</p>
</td>
<td>
<p>INT</p>
</td>
<td>
<p>Object<br />&nbsp; Type Code of the entity for which the attribute belongs.</p>
</td>
</tr>
<tr>
<td>
<p>AttributeName</p>
</td>
<td>
<p>NVARCHAR(100)</p>
</td>
<td>
<p>Schema<br />&nbsp; name of the picklist attribute.</p>
</td>
</tr>
<tr>
<td>
<p>AttributeValue</p>
</td>
<td>
<p>INT</p>
</td>
<td>
<p>Integer<br />&nbsp; value of the picklist option. This is the value that gets stored in the base<br />&nbsp; tables.</p>
</td>
</tr>
<tr>
<td>
<p>LangId</p>
</td>
<td>
<p>INT</p>
</td>
<td>
<p>Language<br />&nbsp; Code for the CRM deployment. Usually 1033 for English<br />&nbsp; (United States)</p>
</td>
</tr>
<tr>
<td>
<p>OrganizationId</p>
</td>
<td>
<p>UNIQUEIDENTIFIER</p>
</td>
<td>
<p>GUID<br />&nbsp; of the owning Organization.</p>
</td>
</tr>
<tr>
<td>
<p>Value</p>
</td>
<td>
<p>NVARCHAR(255)</p>
</td>
<td>
<p>The<br />&nbsp; actual value that is displayed in the picklist on a form.</p>
</td>
</tr>
<tr>
<td>
<p>DisplayOrder</p>
</td>
<td>
<p>INT</p>
</td>
<td>
<p>Specifies<br />&nbsp; the order in which the value is in the picklist</p>
</td>
</tr>
<tr>
<td>
<p>VersionNumber</p>
</td>
<td>
<p>TIMESTAMP</p>
</td>
<td>
<p>Timestamp<br />&nbsp; for determining the version of the record (when it was last updated). This is<br />&nbsp; used by the synchronization process.</p>
</td>
</tr>
<tr>
<td>
<p>StringMapId</p>
</td>
<td>
<p>UNIQUEIDENTIFIER</p>
</td>
<td>
<p>Primary<br />&nbsp; Key (GUID) for the record.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<p>&nbsp;Following&nbsp; just returns a list of each picklist value:</p>
<p>&nbsp;</p>
<p><strong>SELECT e.Name, a.AttributeName, a.AttributeValue, a.Value, a.DisplayOrder</strong></p>
<p><strong>FROM Stringmap a INNER JOIN MetadataSchema.Entity e ON a.ObjectTypeCode = e.ObjectTypeCode</strong></p>
<p><strong>ORDER BY a.ObjectTypeCode, a.AttributeName, a.AttributeValue&nbsp;</strong></p>
<p>&nbsp;</p>
<p>I came across an issue where we were unable to publish any customization in CRM 4.0 environment. We tried doing "Publish All Customization"&nbsp; or tried publish on one entity(be it any entity in CRM) every time we failed with following error in UI :-</p>
<p>&nbsp;</p>
<p><strong>&nbsp;"An error had occurred."</strong></p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8625.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8625.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8625.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8625.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;</p>
<p>If we collect platform trace&nbsp;we will see following error every time :-&nbsp;&nbsp;</p>
<p>Stack Trace Info: [SqlException: Cannot insert the value NULL into column 'StringMapId', table 'ABC_MSCRM.dbo.StringMap';&nbsp;&nbsp;</p>
<p>The statement has been terminated.]&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>Complete Platform Trace Error:-&nbsp;</strong></span></p>
<p>Error: Exception has been thrown by the target of an invocation.&nbsp;</p>
<p>Error Message: Exception has been thrown by the target of an invocation.</p>
<p>Source File: Not available</p>
<p>Line Number: Not available</p>
<p>Request URL: <a href="https://mtlqacrm/MMM/AppWebServices/SystemCustomization.asmx">https://mtlqacrm/ABC/AppWebServices/SystemCustomization.asmx</a></p>
<p>Stack Trace Info: [SqlException: Cannot insert the value NULL into column 'StringMapId',table 'ABC_MSCRM.dbo.StringMap'; column does not allow nulls. INSERT fails.</p>
<p>The statement has been terminated.]</p>
<p>&nbsp;&nbsp; at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)&nbsp;</p>
<p>&nbsp;&nbsp;at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)&nbsp;&nbsp;&nbsp; at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)</p>
<p>&nbsp;&nbsp; at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)</p>
<p>&nbsp;&nbsp; at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)&nbsp;</p>
<p>&nbsp;&nbsp; at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)</p>
<p>&nbsp;&nbsp; at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)</p>
<p>&nbsp;&nbsp; at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)&nbsp;&nbsp; at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()</p>
<p>&nbsp;&nbsp; at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)&nbsp;&nbsp;&nbsp; at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)</p>
<p>&nbsp;&nbsp; at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command)&nbsp;at Microsoft.Crm.Tools.ImportExportPublish.StringMapPublisher.InsertNewStringMapValue(Int32 objectTypeCode, String attributeName, Int32 attributeValue, Int32 langId, String description, Int32 displayOrder)</p>
<p>&nbsp;&nbsp; at Microsoft.Crm.Tools.ImportExportPublish.StringMapPublisher.UpdateMaps(EntityMetadata entity, Int32 langId)&nbsp;st Microsoft.Crm.Tools.ImportExportPublish.StringMapPublisher.PublishStringMaps()</p>
<p>&nbsp;&nbsp; at Microsoft.Crm.Tools.ImportExportPublish.PublishXml.PublishAll(ExecutionContext context)&nbsp;at Microsoft.Crm.WebServices.PublishXmlService.PublishAll(ExecutionContext context)&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p>I wondered what is this StringMapId which was getting a NULL value and hence the failure. After I researched further, I found that it is a unique GUID value assigned to each picklist value in CRM. Then came the next question,why is it inserting a NULL value instead of a GUID and if it is a GUID who<br />inserts and creates this GUIDs for StringMapID?&nbsp;&nbsp;</p>
<p>I collected SQL profiler and could see the insert queries being executed and resulted in failures.</p>
<p>&nbsp;Example:-</p>
<p>INSERT INTO StringMap(ObjectTypeCode,AttributeName,AttributeValue,LangId,OrganizationId,Value,DisplayOrder) VALUES<br />(4414,'matchingentitytypecode',4414,1033,'17520689-b364-e211-891c-005056b412f9','DuplicateDetection Rule',1)</p>
<p>&nbsp;----------------------------------</p>
<p>&nbsp;Finally, I realized that stringmapid column with stringmapids have GUIDs which are created at runtime with newid() function but were unable to understand why it is not able to generate and insert that and thus fails with the exception.</p>
<p>&nbsp;</p>
<p>&nbsp;Checked the table StringMapBase and then expanded the table and we could see following things:-&nbsp;</p>
<ul>
<li>Columns</li>
<li>Keys</li>
<li>Constraints</li>
<li>Triggers</li>
<li>Indexes</li>
<li>Statistics</li>
</ul>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif; text-decoration: underline;">&nbsp;<span style="font-size: medium;"><strong>CAUSE OF THIS ISSUE&nbsp;&nbsp;</strong></span></span></p>
<p>This issue occurs when the following constraint in CONSTRAINTS section is missing&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;<br />DF_StringMap_StringMapId</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/35421.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/35421.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/35421.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/320x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/35421.2.png" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong><span style="font-size: medium;">REASON FOR THE INSERT QUERY FAILURE&nbsp;</span></strong></span></p>
<p>&nbsp;</p>
<p>-This constraint is responsible to create GUID "StringMapId" in StringMapBase table. Thus if this is missing, NULL values would be passed while publishing&nbsp;any customization and hence it will error out every time.</p>
<p>&nbsp;-This usually can happen when we follow unsupported ways to deleting or editing CRM database tables.&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-size: medium; text-decoration: underline;"><strong>RESOLUTION</strong></span></p>
<p>&nbsp;</p>
<p>&nbsp;-We used option to create this missing constraint&nbsp; with query ------------&gt; right click CONSTRAINT in&nbsp;your vanilla org ------------&gt; script as ------------&gt; CREATE TO -----------&gt; New query Window</p>
<p>&nbsp;Ran following query&nbsp;in affected environment :-</p>
<p>USE [crm_MSCRM]</p>
<p>GO</p>
<p>ALTER TABLE [dbo].[StringMap] ADD&nbsp; CONSTRAINT [DF_]&nbsp;DEFAULT (newid()) FOR [StringMapId]</p>
<p>GO&nbsp;</p>
<p>Thus if we see above query it has a function NewID() for [StringMapId] which is responsible for creating runtime GUID while insert query runs on StringMap table which holds all picklist values.</p>
<p>-Hence it is must for us for all picklist values in stringmap table.</p>
<p>&nbsp;&nbsp;</p>
<p>I hope this post helps.</p>]]></content:encoded>
    </item>
    <item>
      <title>How To Find Default Organization For Any User In Multiple Organization CRM Deployment</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/how-to-find-default-organization-for-any-user-in-multiple-organization-crm-deployment</link>
      <pubDate>Wed, 23 Jan 2013 12:14:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2013/01/23/how-to-find-default-organization-for-any-user-in-multiple-organization-crm-deployment/</guid>
      <description><![CDATA[&nbsp;
-Log in to SQL Server where we have CRM databases &lt;org&gt;_MSCRM and MSCRM_CONFIG. We...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in; color: black; font-family: Calibri; font-size: 12pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">-Log in to SQL Server where we have CRM databases &lt;org&gt;_MSCRM and MSCRM_CONFIG. We have 4 different tables from where we will have to fetch the user entries.</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">-SystemUserBase,</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">-SystemUserOrganizations,</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">-SystemUser and then</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">-Organization</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Refer to the following diagram which will help you understand how different tables are related for a specific user.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5557.5.gif" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5557.5.gif"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5557.5.gif" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5557.5.gif" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Run following queries one by one and fetch the GUID values as follows:-</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Run below query on ORG_MSCRM database :-</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">Select domainname,systemuserid from systemuserbase where domainname ='domainname\username'</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Note:-</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">domainname\username is for the affected user.</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Copy SystemUserID = 7F0F58A8-5ED0-E111-B576-00155D5AC438</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/4152.Capture.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/4152.Capture.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/4152.Capture.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/4152.Capture.PNG" alt="" width="785" height="239" border="0" /></a></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Run following query in MSCRM_CONFIG database :-</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">USE [MSCRM_CONFIG]</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">select UserId from systemuserorganizations where CrmUserId='7F0F58A8-5ED0-E111-B576-00155D5AC438'</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Copy UserId = D058E3E4-EF63-E111-97DA-00155D5AC42A</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/6567.Capture.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/6567.Capture.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/6567.Capture.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/6567.Capture.PNG" alt="" width="832" height="228" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;<span style="color: #ff0000;">USE [MSCRM_CONFIG]</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">select defaultOrganizationId from SystemUser where id='D058E3E4-EF63-E111-97DA-00155D5AC42A'</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Copy default org id= 076DC913-4564-4569-9A8C-9CD1C4A4ABA2</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8738.Capture.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8738.Capture.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8738.Capture.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8738.Capture.PNG" alt="" width="812" height="195" border="0" /></a></p>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">USE [MSCRM_CONFIG]</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">select DatabaseName,UniqueName from organization where id = '076DC913-4564-4569-9A8C-9CD1C4A4ABA2'</span></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5875.1.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5875.1.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5875.1.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5875.1.PNG" alt="" width="827" height="237" border="0" /></a></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Default Org XXX_MSCRM</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri;"><span style="font-size: 9.5pt;">This way we can find the default organization for any user.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Microsoft Dynamics CRM 2011 -  Unable to run any reports due to missing security role in Default Organization</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/microsoft-dynamics-crm-2011-unable-to-run-any-reports-due-to-missing-security-role-in-default-organization</link>
      <pubDate>Fri, 20 Jul 2012 16:26:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2012/07/20/microsoft-dynamics-crm-2011-unable-to-run-any-reports-due-to-missing-security-role-in-default-organization/</guid>
      <description><![CDATA[This blog talks about an issue we face while running out of the box or custom reports from Microsoft...]]></description>
      <content:encoded><![CDATA[<p>This blog talks about an issue we face while running out of the box or custom reports from Microsoft Dynamics CRM 2011. We will observe that few users in CRM organization&nbsp;are able to run the report.&nbsp;Few other users&nbsp;would suddenly start getting script errors and unable to run any reports from CRM. In this scenario we receive different script errors. Following are the script errors we receive with the error message :-&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">'Sys' is undefined</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">Reportviewer.aspx</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;"><span style="color: #ff0000;">Code:0</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">OR<br /><span style="color: #ff0000;">Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.</span></p>
<p>Details: Error parsing near '</p>
<p>&lt;html&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;t'.</p>
<p>Line:5</p>
<p>Char:84093</p>
<p>Code:0</p>
<p><span style="color: black;">URI: </span><a href="https://xx.xx.xx=74AQt8L28NlXxchvwXlsYTo2VcsDEcCgU-G7K7WIvjkCNhS4tK4pjW7bpQ_-pZg7pxIw-38HwOyhg7e83kXd0DnQUrpVJ4oLEUYKYtciF5JSSDZNGeszMARFLR2zrNYV_vrExgs67ryL4NYu9BADLs-UurxMAXQu1U5i44ZyVSc1&amp;t=2610f696">https://xx.xx.xx=74AQt8L28NlXxchvwXlsYTo2VcsDEcCgU-G7K7WIvjkCNhS4tK4pjW7bpQ_-pZg7pxIw-38HwOyhg7e83kXd0DnQUrpVJ4oLEUYKYtciF5JSSDZNGeszMARFLR2zrNYV_vrExgs67ryL4NYu9BADLs-UurxMAXQu1U5i44ZyVSc1&amp;t=2610f696</a></p>
<p><br />OR</p>
<p><br />Webpage error details:</p>
<p>User Agent:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2;.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)</p>
<p>Timestamp: Tue, 17 Jul 2012 22:43:06 UTC</p>
<p>Message: Object expected</p>
<p>Line: 60</p>
<p>Char: 1</p>
<p>Code: 0</p>
<p><span style="color: black;">URI: </span><a href="https://crm2011:5555/CRSPTest/CRMReports/rsviewer/reportviewer.aspx">https://crm2011:5555/CRMTest/CRMReports/rsviewer/reportviewer.aspx</a></p>
<p><br /><span style="color: #ff0000;">Message: Object expected</span></p>
<p>Line: 60</p>
<p>Char: 1</p>
<p>Code: 0</p>
<p><span style="color: black;">URI: </span><a href="https://crm2011:5555/CRSPTest/CRMReports/rsviewer/reportviewer.aspx">https://crm2011:5555/CRMTest/CRMReports/rsviewer/reportviewer.aspx</a></p>
<p><br />&nbsp;</p>
<p>Following are the screenshots of the error we see when running reports from web client:-</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/2475.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/2475.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/2475.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/2475.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7433.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7433.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7433.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7433.2.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/6433.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/6433.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/6433.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/6433.3.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Following is the screenshot of the error message we receive from CRM outlook client :-</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8765.4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8765.4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/8765.4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/8765.4.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="margin: 0in; color: black; font-family: calibri; font-size: 9.5pt;">I collected the CRM platform traces and found we see below error message which is weird as my user has a system administrator security role in the CRM organization from here the user is unable to run the report and receive the script errors:-</p>
<p>&nbsp;</p>
<p><span style="color: #ff0000;">Error: The user is not assigned any privileges.</span></p>
<p><span style="color: #ff0000;">Error Number: 0x80042F09</span></p>
<p><span style="color: #ff0000;">Error Message: The user is not assigned any privileges.</span></p>
<p><span style="color: #ff0000;">Error Details: The user is not assigned any privileges.</span></p>
<p><span style="color: #ff0000;">Source File: Not available</span></p>
<p><span style="color: #ff0000;">Line Number: Not available</span></p>
<p><span style="color: black;">Request URL: </span><a href="https://dalqae8crm01/WebResource.axd?d=Mih2KhqNXiMEZcdPxFxoPU35ZpqXzx5IgE22KWlLHEGWElPjg7jxqVW8lNuhobKyfviBzEIss0CJLe14lrREo7AchKHgzXS7E5qUN7rDMW41&amp;t=634670320007546920">https://xxxxx/WebResource.axd?d=Mih2KhqNXiMEZcdPxFxoPU35ZpqXzx5IgE22KWlLHEGWElPjg7jxqVW8lNuhobKyfviBzEIss0CJLe14lrREo7AchKHgzXS7E5qUN7rDMW41&amp;t=634670320007546920</a></p>
<p>Stack Trace Info: [CrmException: The user is not assigned any privileges.]</p>
<p>at Microsoft.Crm.MainApplication.Application_OnPostAuthenticateRequest(Object sender, EventArgs eventArguments)</p>
<p>----------------------------------</p>
<p><br /><span style="color: #ff0000;">An error occurred during the Application_OnPostAuthenticateRequest :</span></p>
<p><span style="color: #ff0000;">Error: The user is not assigned any privileges.</span></p>
<p>Stack Trace: at Microsoft.Crm.MainApplication.Application_OnPostAuthenticateRequest(Object sender, EventArgs eventArguments)</p>
<p>----------------------------------</p>
<p>&nbsp;</p>
<p>This issue looked really different to me until I found out how the authentication works when a user runs a report from a particular organization in CRM.</p>
<p>&nbsp;&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 11.5pt;"><span style="text-decoration: underline;"><span style="font-weight: bold;">CAUSE OF THIS ISSUE</span></span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 11.5pt;">&nbsp;&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">This issue occurs when a user does not have Security Role assigned to him in his default organization in CRM . Now, by user's default organization we mean that organization in entire CRM deployment where the user was first created.</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">For instance I have 3 organization ORG1, ORG2 and ORG3 in CRM . I created a user say user1 in AD and then created this user as a CRM user in ORG 1 for the first time. Thus, ORG1 becomes the default organization for this user. Next, if I create the same user user1 in ORG2 it will not make a difference ORG1 still will be the default organization for USER1.</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">Thus, if future if we remove the security role of user1 from ORG1 , USER1 will not be able to run any reports from ORG2 or ORG3. The user will get all the above mentioned script errors.</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 12pt;"><span style="font-weight: bold; text-decoration: underline;">REASON FOR THE AUTHENTICATION FAILURE&nbsp;</span></p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 12pt;">&nbsp;&nbsp;&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">The issue is caused when the user is being authenticated to access the ScriptResource.axd, WebResource.axd and Reserved.ReportViewerWebControl.axd controls. The UserCache is being examined while running any report to authenticate the user using the default&nbsp; organization information and since the user doesn't have any privileges in that organization, the authentication fails and throws an exception.&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 9.5pt;">&nbsp;</p>
<p style="margin: 0in; color: black; font-family: Calibri; font-size: 12pt;"><span style="font-weight: bold; text-decoration: underline;">RESOLUTION</span></p>
<p>To resolve this issue we&nbsp;should give a security role to the user in his default organization.&nbsp;Please follow the steps mentioned in the last section&nbsp;on how to find default organization for any CRM user.</p>
<p>I have also seen this issue occurring in scenarios where user's has security role in his default organization but that default organization&nbsp; is being disabled and no more in use but still present in deployment manager. Hence, in such cases either delete the disabled or unused organization from CRM deployment or enable the organization.&nbsp;</p>
<p>&nbsp;</p>
<p>To know <strong>HOW TO FIND DEFAULT ORGANIZATION FOR ANY USER IN MULTIPLE ORGANIZATION CRM DEPLOYMENT</strong> please refer to following blog :-</p>
<p>&nbsp;</p>
<p><a href="https://blogs.msdn.com/b/arpita/archive/2013/01/23/how-to-find-default-organization-for-any-user-in-multiple-organization-crm-deployment.aspx">https://blogs.msdn.com/b/arpita/archive/2013/01/23/how-to-find-default-organization-for-any-user-in-multiple-organization-crm-deployment.aspx</a></p>
<p>&nbsp;</p>
<p>Continuation of this issue in case this blog does not resolve the problem:-</p>
<p><a href="https://blogs.msdn.com/b/arpita/archive/2014/09/24/unable-to-run-crm-2011-and-crm-2013-reports-sys-is-undefined.aspx">https://blogs.msdn.com/b/arpita/archive/2014/09/24/unable-to-run-crm-2011-and-crm-2013-reports-sys-is-undefined.aspx</a></p>
<p><br />&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Microsoft Dynamics CRM 2011 log-in issue due to AD FS Certificate Rollover</title>
      <link>https://docs.microsoft.com/archive/blogs/arpita/microsoft-dynamics-crm-2011-log-in-issue-due-to-ad-fs-certificate-rollover</link>
      <pubDate>Tue, 17 Jul 2012 08:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Arpita Saini]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arpita/2012/07/17/microsoft-dynamics-crm-2011-log-in-issue-due-to-ad-fs-certificate-rollover/</guid>
      <description><![CDATA[Recently, we came across an interesting issue where in without changing anything in CRM server or...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: calibri,geneva;">Recently, we came across an interesting issue where in without changing anything in CRM server or ADFS server , authentication starts failing for all users . Every time when we try to access CRM external URL or CRM internal URL we&nbsp; get prompted continuously for URL https://&lt;auth.domain.com</span><span style="font-family: calibri,geneva;">&gt;.</span><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/7181.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/7181.1.png"></a></p>
<p><span style="font-family: calibri,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3441.Capture.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3441.Capture.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/3441.Capture.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/3441.Capture.PNG" /></a></span></p>
<p><span style="font-family: calibri,geneva;"></span></p>
<p><span style="font-family: calibri,geneva;">Once we enter our credentials we receive following error :-&nbsp;</span></p>
<p><span style="color: #ff0000; font-family: calibri,geneva;">HTTP Error 401 - Unauthorized Access is denied.</span></p>
<p><span style="color: #ff0000; font-family: calibri,geneva;">An error has occurred.</span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/4377.5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/4377.5.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/4377.5.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/4377.5.png" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: calibri,geneva;">We receive following error in event viewer of ADFS server (Application and Services Logs -&gt; ADFS 2.0 -&gt; Admin ) :-</span></p>
<p><span style="font-family: calibri,geneva;">&nbsp;Exception information:</span></p>
<p><span style="color: #ff0000; font-family: calibri,geneva;">Exception type: SecurityTokenException</span></p>
<p><span style="color: #ff0000; font-family: calibri,geneva;">Exception</span><br /><span style="color: #ff0000; font-family: calibri,geneva;">message: ID4175: The issuer of the security token was not recognized by the IssuerNameRegistry. To accept security tokens from this issuer, configure the IssuerNameRegistry to return a valid name for this issuer.</span></p>
<p><span style="font-family: calibri,geneva;">at&nbsp;Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.CreateClaims(SamlSecurityToken samlSecurityToken) </span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.ValidateToken(SecurityToken token) </span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityModel.Tokens.SecurityTokenHandlerCollection.ValidateToken(SecurityToken token)</span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityModel.Web.TokenReceiver.AuthenticateToken(SecurityToken token, Boolean ensureBearerToken, String endpointUri)</span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest request)</span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args)</span></p>
<p><span style="font-family: calibri,geneva;">at&nbsp;Microsoft.Crm.Authentication.Claims.CrmFederatedAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args)</span></p>
<p><span style="font-family: calibri,geneva;">at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()</span></p>
<p><span style="font-family: calibri,geneva;">at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)</span></p>
<p>&nbsp;OR</p>
<p><span style="color: #ff0000; font-family: calibri,geneva;">Encountered error during federation passive request.&nbsp;</span></p>
<p><span style="color: #ff0000; font-family: calibri,geneva;">Additional Data</span></p>
<p><span style="color: #ff0000; font-family: calibri,geneva;">Exception details:</span></p>
<p><span style="color: #ff0000; font-family: calibri,geneva;">Microsoft.IdentityServer.Web.AuthenticationFailedException: ID3034: Authentication failed.</span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.SubmitRequest(MSISRequestSecurityToken request)&nbsp;&nbsp;&nbsp;</span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.RequestBearerToken(MSISSignInRequestMessage signInRequest, SecurityTokenElement onBehalfOf, SecurityToken primaryAuthToken, String desiredTokenType, Uri&amp; replyTo)</span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.BuildSignInResponseCoreWithSecurityToken(SecurityToken securityToken, WSFederationMessage incomingMessage)</span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.BuildSignInResponseForProtocolRequest(FederationPassiveContext federationPassiveContext, SecurityToken securityToken)</span></p>
<p><span style="font-family: calibri,geneva;">at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.BuildSignInResponse(SecurityToken securityToken)</span></p>
<p><span style="font-family: calibri,geneva;"></span>&nbsp;</p>
<p><span style="font-family: calibri,geneva;">The signing certificate in AD FS shows two Token-decrypting and Token-signing certificates with one Primary and one Secondary status:-</span></p>
<p>&nbsp;<span style="font-family: calibri,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5417.ex.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5417.ex.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/77/5417.ex.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-77/5417.ex.png" width="645" height="268" /></a></span></p>
<p>&nbsp;</p>
<p><span style="font-family: calibri,geneva;">As you can see, there are two signing certificates, the second signing certificate was created by AD FS automatically because the first signing certificate was reaching it's expiration date. This feature - AD FS creating a new self-signed certificate when the old one nears expiration - is called Auto Certificate Rollover.</span></p>
<p><span style="font-family: calibri,geneva;">&nbsp;In the CRM server database it still has the old certificate entry and hence the authentication starts failing. The issue will get resolved once the database&nbsp; gets updated with new values after we re-configure.</span></p>
<p>&nbsp;</p>
<h3><b>Cause</b></h3>
<p><span style="font-family: calibri,geneva;">The Token-signing certificate and Token-Decrypting certificate in ADFS gets automatically renewed by AD FS , by Auto Certificate Rollover feature because these certificates reached their expiration date. This feature - AD FS creating a new self-signed certificate when the old one nears expiration - is called Auto Certificate Rollover.</span>&nbsp;</p>
<h3><b>Resolution</b></h3>
<p><span style="font-family: calibri,geneva;">&nbsp;In ADFS management Console update the Federation metadata URLs and do an IIS reset on CRM server. Next, restart the ADFS service.</span></p>
<p><span style="font-family: calibri,geneva;">If above steps do not resolve the issue please follow below steps:-</span></p>
<p><span style="font-family: calibri,geneva;">1) In CRM server go to Deployment Manager and then disable the Claims Based Authentication.</span></p>
<p><span style="font-family: calibri,geneva;">2) Do an IISReset on CRM server</span></p>
<p><span style="font-family: calibri,geneva;">3) Re-configure Claims- Based Authentication from Deployment manager keeping all the settings same.</span></p>
<p><span style="font-family: calibri,geneva;">4) Re-configure IFD through deployment manager.</span></p>
<p><span style="font-family: calibri,geneva;">5)&nbsp;Do an IISRESET again on CRM server</span></p>
<p><span style="font-family: calibri,geneva;">6) In ADFS management console in ADFS server , update the corresponding Federation</span><br /><span style="font-family: calibri,geneva;">Metadata URLs.</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>