• Home
  • Apex Site
  • About us
  • Contact us

Apex Blog

CHECK OUT OUR LATEST NEWS, STORIES, PROMOTIONS, AND PLENTY MORE

How to connect Dynamics CRM 2016 On Premise to Exchange Online

By: Ilario Benetti / 1 Sep 2016 in Dynamics CRM

I then prepared the x509 certificate required for the server-side authentication. In particular:

  1. I logged on to the CRM Server as an administrator, run MMC and added the Certificates snap-in. When prompted I chose Computer Account and, then, Local Computer.
  2. Under the Personal certificate storage I located the wild card certificate and exported it twice. The first time I set not to export the private key to obtain a DER encoded binary X.509 (.cer) certificate that I saved to a .cer file under the C:\ folder as c:\Personalcertfile.cer. Then I exported the same certificate along with the private key (to obtain a .pfx file) keeping the default options and duly noting the password for a later import. The .pfx file was saved as c:\Personalcertfile.pfx

Installing Microsoft Online Services Sign-In Assistant for IT Professionals Beta was not required as it was already there while I had to set up the Azure Active Directory Module for Windows PowerShell (64-bit version).

According to the guide I located the CertificateReconfiguration.ps1 file and started the Azure Active Directory Module for Windows PowerShell moving to the file path. I launched exactly the commands on the guide:

$CertificateScriptWithCommand = “.\CertificateReconfiguration.ps1 -certificateFile c:\Personalcertfile.pfx -password THEPWDNOTEDABOVE -updateCrm -certificateType S2STokenIssuer -serviceAccount DOMAINNAME\USERNAME -storeFindType FindBySubjectDistinguishedName”

Invoke-Expression -command $CertificateScriptWithCommand

Please note that THEPWDNOTEDABOVE was the password I chose when I exported the .pfx certificate. DOMAINNAME\USERNAME is the credential of the administrative single user I used to carry out the configuration.

Certificate preaparation

Certificate preparation result

Configuration

The actual configuration was pretty straightforward. I was all about locating and launching the ConfigureCrmServerSideSync.ps1 script with the right parameters.

Parameter

Description
rootDomainName The server url as configured in the IFD (without https://)
privateKeyPassword THEPWDNOTEDABOVE
cerFilePath c:\Personalcertfile.cer created above
pfxFilePath c:\Personalcertfile.pfx created above
organizationName The name our CRM organization.
O365AdminEmail The Office 365 tenant email address ALIAS@DOMAIN.onmicrosoft.com

I was prompted for the ALIAS@DOMAIN.onmicrosoft.com and the rest of the process was completed by the script.

ServerSideSettings

Conclusions

Once performed the steps above, our CRM was ready for the server side (Hybrid) configuration.

In CRM,  I created an email server profile going to Settings > Email Configuration > Email Server Profiles.

I then clicked New > Exchange Online (Hybrid). The tenant ID was already there and I only had to set a meaningful name for the profile.

exchangeHybrid

With the server profile in place I configured the existing mailboxes to use the newly created profile. For each mailbox I selected test and enable.

Read More

CRM, Dynamics, On-Premises

Comments ( 4 )

  1. Esteban Gomez
    May 24th, 2019

    Thanks for the post!
    Do you know the sentense for update an existing connection?

    Thanks in advance

    Reply
  2. Mike Zielke
    June 1st, 2020

    Have you had to renew the SSL cert for the hybrid connector?

    Reply
    • Roland Pongracz
      August 22nd, 2020

      I’m also interested if you had to renew it how you did it. Thx.

      Reply
  3. Joe CRM
    January 22nd, 2021

    Do you have to perform an iisreset or restart any of the CRM services after running the script?

    Reply

Post a Comment Cancel reply

Categories
  • Apex Planner
  • Dynamics 365
  • Dynamics CRM
  • Office 365
  • SAP Hybris C4C
  • SAP Hybris Marketing
  • SharePoint
  • Uncategorized
Recent Posts
  • Apex Planner August 2018 release is available!
  • Apex Planner March 2018 release is available!
  • Modula: l’evoluzione della logistica nell’industria 4.0 con Apex e SAP Hybris Marketing
  • #ThinkVertical: la strategia di marketing digitale in Modula con SAP Hybris Marketing Cloud
  • Dynamics 365 9.0 (July 2017 update) available!
Recent Comments
  • Durham on Create Office 365 Delegated Admin request
  • kavya on Apex Planner August 2018 release is available!
  • Joe CRM on How to connect Dynamics CRM 2016 On Premise to Exchange Online
  • Nathalie on Apex Planner Licensing
  • Roland Pongracz on How to connect Dynamics CRM 2016 On Premise to Exchange Online
Archives
  • August 2018
  • March 2018
  • November 2017
  • October 2017
  • September 2017
  • July 2017
  • June 2017
  • May 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • June 2016
  • May 2016
  • April 2016
  • February 2016

Archive

  • August 2018
  • March 2018
  • November 2017
  • October 2017
  • September 2017
  • July 2017
  • June 2017
  • May 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • June 2016
  • May 2016
  • April 2016
  • February 2016

Pages

  • About us
  • Apex Blog
  • Contact us
© 2016 | Apex srl