Configuring Dynamics 365 online with Exchange online seems pretty simple, so does configuring Dynamics 365 online and Exchange on premise if you follow the below Microsoft link’s
But we faced an issue where we got multiple generic errors and had no clue what seemed wrong. We raised a support request and made sure we followed all the prerequisites and it did the work for us.
Starting with the Prerequisites
- Microsoft Exchange Server.
- You need to have a supported Exchange version i.e. Exchange Server 2010 Service Pack 3, Exchange Server 2013 Service Pack 1, or Exchange Server 2016.
- Basic authentication.
- Basic authentication must be enabled in Exchange Server along with any other authentication type your Exchange server is using.
- ApplicationImpersonation role.
- You need to create and configure a service account with the ApplicationImpersonationrole in Microsoft Exchange.
- Secured connection.
- The connection between Dynamics 365 (online) and Exchange must be encrypted via TLS/SSL (HTTPS).
- Exchange Web Services (EWS).
- Connections to EWS must be allowed through the firewall.
- Dynamics CRM User.
- You have to create an account in Dynamics CRM, with the same user details that you used to create the service account in Exchange on premise. Make sure the email id at both places is the same.
While configuring the above steps, you need to make sure your exchange has the necessary permissions. Below is what helped us.
How to configure Exchange for Dynamics 365 Integration.
- Assigning Application impersonation role to the user:
- Login to Exchange Admin Center with the Global Administrator or Exchange Administrators credentials.
- Click on permissions on left pane
- Click on Admin roles to see which user has admin roles.
- As shown in the picture below fill in the details and assign ApplicationImpersonation role to the service user which will be used for configuration with Dynamics CRM. In the Users tab add the user you wish to give ApplicationImpersonation role.
- Log in as system administrator on exchange server and assign ApplicationImpersonation to the system admin and then enter system administrators credentials in Dyanimics 365 CRM email server profile & perform test Enable mailbox. For how to configure Email Server Profile in Dynamics 365 follow this link.
- Exchange 2013: Add SMTP Alias to a mailbox
In Exchange 2013 you can add additional alias addresses to a mailbox. This can be done from the Exchange Admin Centre.
Add an alias using the Exchange Admin Centre:
- Click on Recipients on the left.
- Click on Mailboxes on the top left.
- Click on the mailbox which you will use as a service account in Dynamics 365 Online, to add an alias to.
- Click on the pencil to edit the mailbox
- You will see a pop up of all the properties of the users mailbox, click on the email address tab on the left.
- Now click on the + (plus) button to create an alias address.
We used SMTP which is the default radio button, so we don’t change it.
- Enter in the alias email address.
- Click on OK to go back to main screen.
- Click on the save button to save your changes.
- Now login to Dynamics 365
Note: Under Credentials the same user should be used who has the impersonation role. Click on Test connection and check the result.