Connect Dynamics 365 (online) to Exchange Server (on-premises)

 

Updated: November 28, 2016

Applies To: Dynamics 365 (online), Dynamics CRM Online

With Microsoft Dynamics CRM Online 2016 Update, you can connect your Dynamics 365 (online) with Microsoft Exchange Server (on-premises).

Check out the following white paper: Setup Guide: Server-side synchronization for CRM Online and Exchange Server

  1. Microsoft Exchange Server. The following versions are supported: Exchange Server 2010 SP3, Exchange Server 2013 SP1, or Exchange Server 2016.

  2. Basic authentication. During installation, Exchange configures Internet Information Services (IIS). To connect Dynamics 365 (online) with Exchange Server, Basic authentication must be enabled in Exchange Server.

    For more information on Basic authentication, see:

  3. ApplicationImpersonation role. You need to create and configure a service account with the ApplicationImpersonation role in Microsoft Exchange. More information: MSDN: Impersonation and EWS in Exchange.

  4. Secured connection. The connection between Dynamics 365 (online) and Exchange must be encrypted via TLS/SSL (HTTPS).

  5. Exchange Web Services (EWS). Connections to EWS must be allowed through the firewall. Often a reverse proxy is used for the exterior facing connection.

System_CAPS_tipTip

To make sure you’ve got a good connection to Exchange on-premises run the Microsoft Remote Connectivity Analyzer. For information on what tests to run, see Test mail flow with the Remote Connectivity Analyzer.

  1. Go to Settings > Email Configuration > Email Server Profiles.

  2. Click New > Exchange Server.

  3. For an Exchange email server profile, specify the following details:

    Fields

    Description

    General

    Name

    Specify a meaningful name for the profile.

    Description

    Type a short description about the objective of the email server profile.

    Auto Discover Server Location

    Click Yes (recommended), if you want to use the automatically discover service to determine the server location. If you set this to No, you must specify the email server location manually.

    Incoming Server Location and Outgoing Server Location

    If you select No in Auto Discover Server Location, enter a URL for Incoming Server Location and Outgoing Server Location.

    Credentials

    Authenticate Using Impersonation

    Enter the credentials for the Exchange service account granted the ApplicationImpersonation role.

    User Name

    Type the user name for the Exchange service account.

    Password

    Type the password for the Exchange service account.

    Advanced

    Additional Settings

    Process Email From

    Select a date and time. Email received after the date and time will be processed by server-side synchronization for all mailboxes associated with this profile. If you set a value less than the current date, the change will be applied to all newly associated mailboxes and their earlier processed emails will be pulled.

    Minimum Polling Intervals in Minutes

    Type the minimum polling interval, in minutes, for mailboxes that are associated with this email server profile. The polling interval determines how often server-side synchronization polls your mailboxes for new email messages.

    Maximum Concurrent Connections

    Type the maximum number of simultaneous connections that can be made by Dynamics 365 to the corresponding email server per mailbox. Increase the value to allow more parallel calls to Exchange to improve performance or reduce the value if there are errors on Exchange due to large number of calls from Microsoft Dynamics 365. The default value of this field is 10. The maximum number is considered per mailbox or per email server profile depending on whether the credentials are specified in a mailbox or email server profile.

    Move Failed Emails to Undeliverable Folder

    To move the undelivered email to the Undeliverable folder, click Yes. If there’s an error in tracking email messages in Dynamics 365 as email activities, and if this option is set to Yes, the email message will be moved to the Undeliverable folder.

    Email Notifications

    Send an alert email to the owner of the email server profile reporting on major events

    If you want the email server profile owner to be notified when more than 50% of the mailboxes fail, click Yes.

  4. Click Save.

  5. Click Test Connection and review the results. To diagnose issues, see the following section.

If you’ve run Test Connection and have issues with the Exchange Server (Hybrid) profile connection, use the information in the Test Connection dialog box to diagnose and fix the connection.

Review the error messages

In this case, there’s a problem with Auto Discover. The admin should review the user name and password used for Authentication Using Impersonation for the Exchange Server (Hybrid) profile.

You can find information on recurring issues and other troubleshooting information in Blog: Test and Enable Mailboxes in Microsoft Dynamics CRM 2015 and Troubleshooting and monitoring server-side synchronization.

Set server-side synchronization to be the default configuration method.

  1. Go to Settings > Email Configuration > Email Configuration Settings.

  2. Set the processing and synchronization fields as follows:

    • Server Profile: The profile you created in the above section.

    • Incoming Email: Server-Side Synchronization or Email Router

    • Outgoing Email: Server-Side Synchronization or Email Router

    • Appointments, Contacts, and Tasks: Server-Side Synchronization or Email Router

      System_CAPS_noteNote

      If your users primarily use Dynamics 365 for Outlook on their desktop computers, Microsoft Dynamics 365 for Outlook might be a better choice.

    If you leave the Email processing form unapproved user and queues at the default values (checked), you will need to approve emails and queues for user mailboxes as directed below in Approve Email.

    System Settings for server-side synchronization
  3. Click OK.

To set mailboxes to use the default profile, you must first set the Server Profile and the delivery method for email, appointments, contacts, and tasks.

In addition to administrator permissions, you must have Read and Write privileges on the Mailbox entity to set the delivery method for the mailbox.

Select one of the following methods:

  1. Go to Settings > Email Configuration > Mailboxes.

  2. Click Active Mailboxes.

  3. Select all the mailboxes that you want to associate with the Exchange Server profile you created, click Apply Default Email Settings, verify the settings, and then click OK.

    Apply default email settings

    By default, the mailbox configuration is tested and the mailboxes are enabled when you click OK.

  1. Go to Settings > Email Configuration > Mailboxes.

  2. Click Active Mailboxes.

  3. Select the mailboxes that you want to configure, and then click Edit.

  4. In the Change Multiple Records form, under Synchronization Method, set Server Profile to the Exchange Server profile you created earlier.

  5. Set Incoming and OutgoingEmail to Server-Side Synchronization or Email Router.

  6. Set Appointments, Contacts, and Tasks to Server-Side Synchronization.

    System_CAPS_noteNote

    If your users primarily use Dynamics 365 for Outlook on their desktop computers, Microsoft Dynamics 365 for Outlook might be a better choice.

  7. Click Change.

You need to approve each user mailbox or queue before that mailbox can process email.

  1. Go to Settings > Email Configuration > Mailboxes.

  2. Click Active Mailboxes.

  3. Select the mailboxes that you want to approve, and then click More Commands () > Approve Email.

  4. Click OK.

  1. Go to Settings > Email Configuration > Mailboxes.

  2. Click Active Mailboxes.

  3. Select the mailboxes you want to test, and then click Test & Enable Mailboxes.

    This tests the incoming and outgoing email configuration of the selected mailboxes and enables them for email processing. If an error occurs in a mailbox, an alert is shown on the Alerts wall of the mailbox and the profile owner. Depending on the nature of the error, Microsoft Dynamics 365 tries to process the email again after some time or disables the mailbox for email processing.

    The result of the email configuration test is displayed in the Incoming Email Status, Outgoing Email Status, and Appointments, Contacts, and Tasks Status fields of a mailbox record. An alert is also generated when the configuration is successfully completed for a mailbox. This alert is shown to the mailbox owner.

System_CAPS_tipTip

If you’re unable to synchronize contacts, appointments, and tasks for a mailbox, you may want to select the Sync items with Exchange from this Dynamics 365 org only, even if Exchange was set to sync with a different org check box. Read more about this check box.

  1. Go to Settings > Email Configuration > Email Server Profiles.

  2. Select the profile you created, and then click Test & Enable Mailboxes.

    When you test the email configuration, an asynchronous job runs in the background. It may take a few minutes for the test to be completed. Microsoft Dynamics 365 tests the email configuration of all the mailboxes associated with the Exchange Server profile. For the mailboxes configured with server-side synchronization for synchronizing appointments, tasks, and contacts, it also checks to make sure they’re configured properly.

System_CAPS_tipTip

If you’re unable to synchronize contacts, appointments, and tasks for a mailbox, you may want to select the Sync items with Exchange from this Dynamics 365 org only, even if Exchange was set to sync with a different org check box. Read more about this check box.

© 2016 Microsoft. All rights reserved. Copyright

Community Additions

ADD
Show: