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

Dynamics CRM 2016
 

Updated: November 28, 2016

Applies To: Dynamics 365 (on-premises), Dynamics CRM 2016

Follow these steps to connect Dynamics 365 (on-premises) with Microsoft Exchange Server (on-premises).

  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 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.

    System_CAPS_noteNote

    If the server location doesn’t change for mailboxes, we recommend that you don’t use auto discover because it may affect performance.

    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

    Select a method to authenticate while connecting to the specified email server. What’s available depends on whether you are using an online or on-premises version of Dynamics 365.

    • Credentials Specified by a User or Queue. If you select this option, the credentials specified in the mailbox record of a user or queue are used for sending or receiving email for the respective user or queue.

      System_CAPS_noteNote

      To ensure the credentials are secured in Microsoft Dynamics 365, SQL encryption is used to encrypt the credentials stored in the mailbox.

    • Credentials Specified in Email Server Profile. If you select this option, the credentials specified in the email server profile are used for sending or receiving email for the mailboxes of all users and queues associated with this profile. The credentials must have impersonation or delegation permissions on the mailboxes associated with profile. This option requires some configuration on the email server, for example, configuring impersonation rights on Exchange for the mailboxes associated with the profile.

      System_CAPS_noteNote

      To ensure the credentials are secured in Microsoft Dynamics 365, SQL encryption is used to encrypt the credentials stored in the email server profile if you’re processing email by using server-side synchronization.

    • Windows Integrated Authentication. If you select this option, the credentials with which the Microsoft Dynamics 365 Asynchronous Service has been configured will be used.

    • Without Credential (Anonymous). Not a valid setting.

    User Name

    Type the user name used to connect to the email server for sending or receiving email for the mailboxes of all users and queues associated with this profile. This field is enabled and valid only if Authenticate Using is set to Credentials Specified in Email Server Profile. The user name that you specify must have permission to send and receive email from the mailboxes of users and queues associated with this profile.

    System_CAPS_noteNote

    If you’re using HTTP for Microsoft Dynamics 365, the User Name and Password fields will be disabled. To enable the option, change the value of the deployment property AllowCredentialsEntryViaNonSecureChannels to 1.

    Password

    Specify the password of the user that will be used together with the user name to connect to the email server for sending or receiving email for the mailboxes of users and queues associated with this profile. The password is stored securely.

    System_CAPS_noteNote

    If you’re using HTTP for Microsoft Dynamics 365, the User Name and Password fields will be disabled. To enable the option, change the value of the deployment property AllowCredentialsEntryViaNonSecureChannels to 1.

    Use same settings for Outgoing

    If you want to use the same credential settings for the incoming and outgoing connections, click Yes.

    Advanced

    Incoming Authentication Protocol and Outgoing Authentication Protocol

    Select a protocol that will be used for authentication for incoming and outgoing email.

    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. This option is available only for an Exchange email server profile.

  4. Click Save.

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.

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

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: