CRM Online Server-Side Sync AutoDiscover Fix

Author by Dan Fink

There's an odd bug that crops up in the CRM Online Email Server Profiles for some organizations which automatically sets the AutoDiscover option to Yes, disables the option on the form, and hides the fields immediately after the Email Server Profile form loads. After a few calls with Microsoft, I was shown the nifty little trick to get around this, and I thought I'd share.

Scenario

Let's assume you've got CRM Online, and also use Exchange Online. You'd like to get rid of that pesky Email Router, which is just one more server to monitor, so you decide to switch to Server-Side Synchronization for CRM Online. Microsoft's documentation makes it seem pretty easy, and all you need to do is enable the Exchange Online Email Server Profile, and enable the Mailboxes (as an Office 365 Global Admin), however every time you Test & Enable a mailbox, you get an error, and the test fail.

Solution

In many instances, the AutoDiscover will not resolve correctly on the Email Server Profile, and you'll need to manually enter the Exchange Online EWS address. This opens a whole new set of issues, in that sometimes the option to set AutoDiscover to No is disabled, and dissapears from the form. The steps below describe how to force those fields to be enabled, and allow you to enter the EWS address.

serverprofile_pre Note: The area highlited in the red box is disabled by default, and right after the form loads, it becomes hidden as well.

Step A: Using Chrome, get the Email Server Profile URL, and open it in a new window with Developer Tools

  1. In CRM, navigate to Settings > Email Configuration > Email Server Profiles, and open your Active Exchange profile (called 'Microsoft Exchange Online' by default
  2. Copy the URL of this window
  3. Open a new Chrome window and navigate to the URL
  4. Enable the Chrome Developer Tools (steps vary depending on version of Chrome)

Step B: In the Developer Tools, Ctrl+F to find the below attributes in the code, and Edit the attributes.

  • useautodiscover_c

  1. Find the first instance of this attribute
  2. Double click the two locations highlighted where it says 'hidden' and change them to 'visible'
  3. Before: useauto_pre
  4. After: useauto_post
  • rad_useautodiscover1

  1. Find the 2nd instance of this attribute, and the code should appear like this: rad1_pre
  2. Double click where it says 'disabled' and delete it, then click elsewhere in the code to affect the change
  3. The new code should look like this: rad1_post
  • rad_useautodiscover2

  1. Repeat the steps above, to remove 'disabled' for this attribute
  2. Before: rad2_pre
  3. After: rad2_post
  • incomingserverlocation

  1. Find the attribute, and locate the attributes highlighted below
  2. Before: incomingserverlocation_pre
  3. Delete the hidden and disabled attributes such that the code looks like the After picture shown below
  4. After: incomingserverlocation_post
  • outgoingserverlocation

  1. Repeat the same steps above for the Outgoing Server
  2. Before: outgoingserverlocation_pre
  3. After: outgoingserverlocation_post

Step C: Set Server Locations

  1. Change the 'Auto Discover Server Location' to No
  2. Now that the Incoming and Outgoing server fields are enabled, enter this value into both of them: https://outlook.office365.com/EWS/Exchange.asmx Profile Configured

Step D: Save & Close. Your Email Server Profile should not be able to communicate with Exchange Online, so you can Test & Enable mailboxes to confirm.

Hopefully this helps solve your Server-Side Synchronization woes.
Author

Dan Fink

Senior System Engineer