Microsoft has released an update to the CRM 2013 SDK with a new version, 6.1.2. This version includes changes to support the new authentication protocols introduced in v8.1.1 of the SDK. Since the Adxstudio Portal v7 relied on the CRM 2013 SDK, without this new version of the SDK it was unable to connect to Dynamics 365 instances due to the deprecation of the Azure Access Control Service (ACS) endpoint from all v8.2 instances. Now with this new CRM SDK you can include it in Adxstudio Portals v7.x projects so they will be able to connect successfully to Dynamics 365!
The new CRM SDK v6.1.2 has been posted to Nuget – https://www.nuget.org/packages/Microsoft.CrmSdk.CoreAssemblies/6.1.2. This new DLL will likely be included in the next Adxstudio Portals v7 release but until then you can manually add it to your projects via either of the following methods:
BIN folder drop
Use this method if you have not customized the code and only deployed the out of box MasterPortal
- Download the updated CRM SDK v6.1.2 Nuget package from nuget.org
- Use WinRAR or 7Zip or other compression utility to open the Microsoft.CrmSdk.CoreAssemblies.6.1.2.nupkg file. Right click the file in Windows Explorer, select Open With… and select your desired ZIP compatible compression program. Alternatively, change the file extension to .zip.
- Extract the Microsoft.Xrm.Sdk.dll and Microsoft.Crm.Sdk.Proxy.dll from libnet45 folder to a local folder location.
- Copy the Microsoft.Xrm.Sdk.dll and Microsoft.Crm.Sdk.Proxy.dll files to the MasterPortalbin folder where your portal code is deployed, overwrite both the existing files when prompted.
Note: When replaced this will cause the portal application to automatically be restarted.
Visual Studio – NuGet Package Manager
Use this method if you are customizing the MasterPortal project and need to recompile the MasterPortal with custom code or update your reference to a new DLL location.
- Open your MasterPortal Visual Studio Project. In the solution explorer pane, expand the MasterPortal, right click References and select Manage NuGet Packages…
- From the NuGet Manage Packages window, select Browse from the top instead of the default of installed and enter in the search “crmsdk”.
- From the results select “Microsoft,CrmSdk.CoreAssemblies” the package will be by crmsdk.
- In the right pane of the NuGet window use the version selector to select 6.1.2, and click Install.
- You will be prompted for a dependency to Microsoft.Identity, confirm the dialog and accept the terms to install the packages.
- Once completed you can rebuild the MasterPortal project and re-deploy your customized portal for Dynamics 365 compatibility.
One thing to be aware of with using NuGet Package Manager is that it can have the side effect of doubling up some of your dependent assemblies in the web.config. A base MasterPortal this was not an issue but something you may want to review your web.config after to ensure it doesn’t have any extra items that you do not need. Also if you use NuGet to add other packages to your project be cautious when updating to not include the Microsoft.CrmSdk.CoreAssemblies in any update.
Alternatively from NuGet you can use the BIN drop method as well with your Visual Studio project. Instead of dropping the updated assemblies in the BIN folder, instead drop them in your reference assembly folder, perhaps called Framework or DllImports. This would replace your existing DLLs in that reference folder.
The new CRM SDK 6.1.2 should also work with any previous versions of CRM, allowing you to pre-update your Adxstudio Portal projects prior to upgrading your CRM to Dynamics 365.
Why this was update necessary:
With the deprecation of Azure Access Control Service (ACS), we have to modify our SDK authentication code by removing all references to ACS. Effective from versions Microsoft Dynamics CRM Online 2016 Update 1 (v8.1.1) and Microsoft Dynamics 365 (v8.2), we removed Live ID support and ACS dependencies on the server-side.
We also removed Microsoft.Xrm.Client from the CRM 2016 (8.x) SDK client because it was not compliant with the OAuth changes, and replaced it with Microsoft.Xrm.Tooling.Connector. You can use the current Microsoft Dynamics 365 Software Development Kit (SDK) to access Microsoft Dynamics CRM back to version 6.x for both auth and messaging.
For some additional context you can read my previous post – Dynamics 365 and Adxstudio Portals Compatibility