CRM Online Email Server Profile - AutoDiscover issues

CRM Online supports Server side synchronization with Exchange Online. As long as Exchange online and CRM online are on the same O365 tenant, the connection will work. Make sure you have that setup first, before you try to connect Exchange Online for email sync.

If you go to setting up an Email Server profile for Exchange Online, you'll notice that Auto discover is set to True by default for the Incoming and Outgoing server URLs. This is something that we have forced on you for Exchange Online, so that CRM looks up the tenant and identifies what the EWS URLs are for Incoming and Outgoing email from your Exchange online. For Exchange onpremise, for sure you will need to enable this setting for Autodiscover as No, so that you can add the URLs yourself. But, for Exchange Online, we don't support Autodiscover as No, and CRM has to do it for you. And to add on, I've noticed that this Autodiscover setting doesn't work, and even though you have an Exchange Online account with mailboxes on the same tenant, you get errors when you try to test your mailboxes. You may have seen that too since you are on this blog :)

So, the email server profile looks like this , by default, for Exchange online:

ExOnline

You wouldn't find the Auto discover settings - (but if you look carefully, when the page loads, you will see the settings load up as Autodiscover as true and then those disappear. It's product JavaScript that is making those fields visible false)

As of now, we don't have a fix on this issue for Exchange online to get auto-discovered. So if you're trying to do what I was doing, connect to Exchange online for Server side synchronization, you have to "hack" your way around this and put in the EWS URLs yourselves. You cannot do anything else since there is not fix yet for CRM Online 2015.

Steps to work on the hack:

- Enable option buttons on the form

- Enable text boxes on the form

1. On the Exchange Online Email Server profile window, click on F12 to open IE developer tools (You can do this on Chrome as well, if you are more comfortable there, like I'm showing below)

Find the option button label and values <td> and change them to visible true.

Search for useautodiscover_c and useautodiscover_d which are the 2 <td>s and change them to visibility: visible

autodiscC

 

2. You should be able to see the Labels and Radio buttons now since they are visible.

TDVisible

Once you see that go to the Element Inspector in the F12 tools and select the option button element for "Yes". It should have a name like "rad_autodiscover1". Check the properties of this option button and you will see "checked disabled" there. Remove the "disabled" from the checked part in order to enable it. See the screenshot below.

Radautodisc1

Do the same for the No option button. You will find that the No button is also "disabled" due to the auto discover being always Yes. Remove the disabled property and you will now be able to click on the No option button! See the screenshot below.

Radautodisc2

3. Next, go to the Incoming Server Location text box that is now visible, but not yet enabled for editing. Select that using the Element inspector again, and you will get the corresponding input box in html.

Change 2 properties: Remove completely the disabled="disabled" property to enable and change contenteditable ="true". See the screen shot below

Incomingserver

 

Do the same for the Outgoing server location text box.

Once you've completed both, change the values in the Incoming and Outgoing Server URLs to https://outlook.office365.com/EWS/Exchange.asmx which is the EWS service for Exchange online. This will be the same for any Exchange online.

Save the record, and it will refresh the screen. Don't worry if your option buttons are no longer seen or text boxes now are disabled again, since it was a temporary hack. Once you've saved it, CRM is going to use the values from your text box.

Remember that the html hack you've done is primarily to put these values in yourself, to get rid of the issue of CRM not getting the URLs. Hopefully this helps you resolve your issues with Exchange online server side synchronization, till a fix gets released for this issue!