Category Archives: CRM 2016

Server-to-Server (S2S) Authentication with Dynamics 365 – Part 2

Introduction

In Part 2 we will enhance your previously created MVC web application to connect to Microsoft Dynamics 365 and execute basic commands using the Microsoft Dynamics 365 SDK.

Requirements

Web.config

  • Add the following to the appSettings section

Login to Azure AD navigate to App &gtegis<rations select the application you created in Part 1 of this blog. then navigate to Keys.

Copy the newly generated code and past it into the ida:ClientSecret value in your web.config file.

Set Home Controller access as anonymous

  • Navigate to \Controllers\HomeController.cs
  •  Adding the  [AllowAnonymous]  keyword above your action will give the use the ability to access the page anonymously without Authentication.

Create Contact List link 

  • Navigate to ../Views/Shared/_Layout.cshtml and add the following code to display the WhoAmI link on our web application.

We will only display this link if the user has logged in and has been authenticated.

Create CrmController

  • Right click the Controllers folder and select Add > Controller
  • Select MVC 5 Controller – Empty
  • Click Add
  • Add the following properties to the CrmController

  • Create a new method called GetServiceUrl in the CrmController. This method takes the CRM Organisation name and returns the CRM organisations service URL.

  • Add the following code to your Index method

If If you get a error “AuthenticationContext does not contain AcquireToken” make sure that you have added version 2.xx.x of the Microsoft.IdentityModel.Clients.ActiveDirectory assembly reference to your project

Create Crm View

  • Right click the Crm folder and select Add > View…
  • In the Add View dialog, set the following values:

  • Click Add
  • Update your view to represent the following code.

  • Press F5 and test you application.

Source Code

Server-to-Server (S2S) Authentication with Dynamics 365 – Part 1

Introduction

With server-to-server (S2S) authentication, external services like web applications can seamlessly and securely connect to Dynamics 365 in a controllable manner. Typical scenarios for this service are third-party applications and internal customer applications that need to integrate with Dynamics 365 data.

Requirements

  • Visual Studio 2015 with web developer tools installed
  • A December 2016 update for Microsoft Dynamics 365 (online) tenant associated with your Azure Active Directory (Azure AD) tenant.

Create an MVC web application

Using Visual Studio 2015, create a new MVC web application and register it with your Azure AD tenant.

  • Open Visual Studio 2015, Click New Project and select .NET Framework 4.6.1 and the ASP.NET Web Application template.
    Click OK, and in the New ASP.NET project dialog select MVC.
  • Click the Change Authentication button and select Work and School Accounts. s2sauth_01
  • Select Cloud – Multiple Organizations and click OK

    if you get the following error “Error: The user account ‘user@domain.onmicrosoft.com’ doesn’t have the required permissions to access the domain ‘domain.onmicrosoft.com’.” make sure your visual studio is singed in with the same credentials you are trying to use to connect to Azure AD.

  •  if you navigate to https://portal.azure.com under App Registrations you will see the app created by Visual Studio.
  • You will need to give you app access to your Dynamics 365 data.
    • Under API Access area click Required permissions
    • Click Add -> select API -> Dynamics CRM Online and click select
    • Click Done to save permission changes
  • Run your MVC application and you will be prompted to login using your Online credentials.

Dynamics Build Numbers

Dynamics 365 (CRM 2016) Build Numbers

Build Number KB Release Date Description
8.0.0.1088 2015 December CRM 2016 RTM
8.0.1.79 KB3133963 2016 February 26 CRM 2016 Update 0.1
8.1.0.359 KB3154952 2016 May 23 CRM 2016 Service Pack 1
8.1.0.371 KB3154952 2016 September 21 CRM 2016 Service Pack 1 (Outlook Client only)
8.2.0.749 KB3205084 2016 December 16 December 2016 update for Dynamics 365

CRM 2015 (on-premises) Build Numbers

Build Number KB Release Date Description
7.0.0.3543 2014 November 17 RTM
7.0.1.129 KB3010990 2015 April 13 CRM 2015 Update 0.1
7.1.0.1074 KB3056327 2015 May CRM 2015 Update 1.0 (Client & router only)
7.1.1.3113 KB3072333 2015 August CRM 2015 Update 1.1 (Client & router only)
7.0.2.53 KB3010990 2015 November CRM 2015 Update 0.2
7.1.2.1032 KB3141809 2016 July 18 CRM 2015 Update 1.2 (Client & router only)

CRM 2013 Build Numbers

Build Number KB Release Date Description
6.0.0000.0514 RC
6.0.0000.0809 RTM
6.0.0001.0061 KB2891271 2013 December 16 Update Rollup 1
6.0.0002.0046 KB2919956 2014 March 22 Update Rollup 2
6.0.0003.0106 KB2930480 2014 July 15 Update Rollup 3
6.1.0000.0581 KB2941390 2014 May 28 Service Pack 1
6.1.1.132 KB2953252 2014 September 23 CRM 2013 Service Pack 1 Update Rollup 1
6.1.2.112 KB2963850 2015 February 6 CRM 2013 Service Pack 1 Update Rollup 2
6.1.3.119 KB3016464 2015 April 15 CRM 2013 Service Pack 1 Update Rollup 3
6.1.4.145 KB3122951 2016 February 22 CRM 2013 Service Pack 1 Update Rollup 4

CRM 2011 Build Numbers

Build Number KB Release Date Description
5.0.9688.53 2011 January 30 RC
5.0.9688.583 2011 February 22 RTM
5.0.9688.1045 KB2466084 2011 April 04 Update Rollup 1
5.0.9688.1155 KB2466086 2011 June 02 Update Rollup 2
5.0.9688.1244 KB2547347 2011 July 28 Update Rollup 3
5.0.9688.1450 KB2556167 2011 September 22 Update Rollup 4
5.0.9688.1533 KB2567454 2011 November 08 Update Rollup 5
5.0.9690.1992 KB2600640 2012 January 12 Update Rollup 6
5.0.9690.2165 KB2600643 2012 March 22 Update Rollup 7
5.0.9690.2243 KB2600644 2012 May 3 Update Rollup 8
Cancelled Update Rollup 9
5.0. 9690.2730 KB2710577 2012 August 16 Update Rollup 10
5.0.9690.2835 KB2739504 2012 October 11 Update Rollup 11
5.0.9690.2838 (Client)
5.0.9690.2839 (Server)
KB2739504 2012 October 11 Update Rollup 11 v2
5.0.9690.2903 KB2855319 2013 July 26 Critical Update for
Update Rollup 11
5.0.9690.3233 (Client)
5.0.9690.3236 (Server)
KB2795627 2013 January 29 Update Rollup 12
5.0.9690.3448 KB2791312 2013 March 26 Update Rollup 13
5.0.9690.3557 KB2849744 2013 July 11 Update Rollup 14
5.0.9690.3731
5.0.9690.3739
(Outlook client only)
KB2843571 2013 October 7 Update Rollup 15
5.0.9690.3911 KB2872369 2014 January 22 Update Rollup 16
5.0.9690.4150 KB2915687 2014 May 8 Update Rollup 17
5.0.9690.4376 KB2958724 2014 September 24 Update Rollup 18
5.0.9690.4439 KB3179593 2016 October 19 Update for CRM 2011 (KB3179593)

CRM 4.0 Build Numbers

Build Number KB Release Date Description
4.0.7333.3 2007 December 19 RTM
4.0.7333.1113 KB952858 2008 November 24 Update Rollup 1
4.0.7333.1312 or
4.0.7333.1316
KB959419 2009 January 15
2009 February 8
Update Rollup 2
4.0.7333.1408 KB961768 2009 March 12 Update Rollup 3
4.0.7333.1551 KB968176 2009 May 7 Update Rollup 4
4.0.7333.1644 or
4.0.7333.1645
KB970141 2009 July 2 Update Rollup 5
4.0.7333.1750 KB970148 2009 August 26 Update Rollup 6
4.0.7333.2138 KB971782 2009 November 5 Update Rollup 7
4.0.7333.2542 KB975995 2009 December 17 Update Rollup 8
4.0.7333.2644 KB977650 2010 February 11 Update Rollup 9
5.0. 9690.2730 KB979347 2010 April 8 Update Rollup 10
4.0.7333.2861 or
4.0.7333.2862
KB981328 2010 June 3 Update Rollup 11
4.0.7333.2935 KB2028381 2010 July 29 Update Rollup 12
4.0.7333.3018 KB2267499 2010 September 23 Update Rollup 13
4.0.7333.3135 KB2389019 2010 November 18 Update Rollup 14
4.0.7333.3231 KB2449283 2011 January 13 Update Rollup 15
4.0.7333.3335 KB2477743 2011 March 10 Update Rollup 16
4.0.7333.3414 KB2477746 2011 May 5 Update Rollup 17
4.0.7333.3531 KB2477777 2011 June 30 Update Rollup 18
4.0.7333.3628 KB2550097 2011 August 25 Update Rollup 19
4.0.7333.3732 KB2550098 2011 November 10 Update Rollup 20
4.0.7333.3822 KB2621054 2012 February 9 Update Rollup 21

Dynamics CRM 2016 Online OneDrive Integration

What is OneDrive for Business?

OneDrive for Business is an integral part of Office 365 or SharePoint Server, and provides place in the cloud where you can store, share, and sync your work files. You can update and share your files from any device with OneDrive for Business. You can even work on Office documents with others at the same time.

Installing OneDrive for Business

You will need to install the OneDrive for Business App before configuring CRM 2016 Online to use OneDrive for Business.

crm2016_document_management_03

 

 

 

 

 

 

  • You will be redirected to OneDrive start page to configure OneDrive for the first time.
  • After the configuration is completed, OneDrive app will open.
OneDrive for Business and Microsoft Dynamics CRM

In Dynamics CRM 2016 Online, there is a new feature Enable OneDrive for Business’ in the Document Management which helps us to integrate OneDrive with CRM as shown below.

crm2016_document_management_01

You will need to enable server-based integration and have at least one active SharePoint site before you can enable OneDrive for Business. If server-based integration is not enabled you will receive the following message asking you to enable server-based integration.

crm2016_document_management_02

The user will need to have a active OneDrive for Business licence else the user will receive the below error when trying to enable OneDrive for Business.crm2016_document_management_04

Navigate to Settings -> Document Management and click “Enable OneDrive for Business”

crm2016_document_management_05

After OneDrive for Business is successfully enabled you will see a new option “OneDrive for Business Folder Settings” in the “Document Management” section. Here you can specify the folder name that OneDrive will use to store the data.

crm2016_document_management_06

Navigate to a existing Account record and navigate to the “Documents” section  and click “Upload” and select a file to upload.

crm2016_document_management_07

Once you have selected you file to upload you will see the CRM Folder option. Select OneDrive and click “OK”

Controlling access to OneDrive for Business in CRM

You can toggle availability of OneDrive in CRM for end users through the OneDrive for Business privilege.

  • Click Settings > Security > Security Roles
  • Choose a security role, and then click the Core Records tab.
  • Under Miscellaneous Privileges, toggle the OneDrive for Business privilege to the desired availability.

crm2016_document_management_09

Advantages of OneDrive

  • Since mobile devices are synced with this storage option, documents, and other digital content gets stored automatically on the storage space thereby keeping files secure in case of accidental hard disk failures.
  • With OneDrive, you can access files from any location. You are good to go with an internet connection, device, along with a web browser.
  • This storage option enables you to share files with anybody you wish. This prevents unauthorized access.