Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"An impersonation error occurred" when connecting Dynamics 365 to Exchange on-premises


View products that this article applies to.

Symptoms

When Server-Side Synchronization is configured between Dynamics 365 (online) and Exchange Server (on-premises), you receive one of the following errors after attempting to enable a mailbox:  

  • An impersonation error occurred in accessing the mailbox while sending the email message "Test Message". Mailbox <Mailbox name> didn't synchronize. The owner of the associated email server profile <Email Server Profile name> has been notified.
  • An impersonation error occurred in accessing the mailbox while receiving email. <Mailbox name> didn't synchronize. The owner of the associated email server profile <Email Server Profile name> has been notified.
When you click Details for one of the errors mentioned above, you may see details such as the following:

  ActivityId: <GUID>
>Error : System.Web.Services.Protocols.SoapException: The account does not have permission to impersonate the requested user.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeServiceBinding.EndFindItem(IAsyncResult asyncResult)
   at Microsoft.Crm.Asynchronous.EmailConnector.FindItemsStep.EndCall()
  at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeIncomingEmailProviderStep.EndOperation()ActivityId: <GUID>
>Error : System.Web.Services.Protocols.SoapException: The account does not have permission to impersonate the requested user.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeServiceBinding.EndCreateItem(IAsyncResult asyncResult)
   at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeOutgoingEmailProvider.EndCreateItem()

↑ Back to the top


Cause

This error can appear if the user account specified to access the mailbox does not have impersonation permissions for the mailbox.  The account used to access the mailbox is provided within the Email Server Profile record associated with the Mailbox record in Dynamics 365.

↑ Back to the top


Resolution

Make sure the user account provided in the Email Server Profile record has impersonation permissions to each associated mailbox.  Within a mailbox record in Dynamics 365, you can click the Server Profile value and review which account is provided within the Credentials section of the Email Server Profile record.

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb, impersonation, Dynamics 365, Exchange, impersonate, CRM Online

↑ Back to the top

Article Info
Article ID : 3189639
Revision : 5
Created on : 3/8/2017
Published on : 3/8/2017
Exists online : False
Views : 327