"Credentials specified in the associated email server profile are incorrect or have insufficient permissions" error when connecting CRM Online to Exchange on-premises

Symptoms
When Server-Side Synchronization is configured between Microsoft Dynamics CRM Online and Exchange Server (on-premises), you receive one of the following errors after attempting to enable a mailbox:
  • The email message "Test Message" cannot be sent because the credentials specified in the associated email server profile are incorrect or have insufficient permissions for sending email. The owner of the email server profile <Email Server Profile name> has been notified.
  • Email cannot be received because the credentials specified in the associated email server profile are incorrect or have insufficient permissions for receiving email. Mailbox <Mailbox name> didn't synchronize. A notification about this is posted on the alerts wall for the owner of the email server profile <Email Server Profile name>.

Cause
This error can occur if Exchange Web Services (EWS) is not enabled for Basic Authentication.
Resolution
Enable Basic Authentication on your EWS (Exchange Web Services) directory. Basic authentication is not the default for EWS, so you need to make sure this authentication is enabled.

For more information on Basic authentication, see:  

Exchange Server 2010: Configure Basic Authentication

Exchange Server 2010: Default Authentication Settings for Exchange-related Virtual Directories 

Exchange Server 2013: Authentication and EWS in Exchange

Exchange Server 2013: Default settings for Exchange virtual directories
More information
When you click Details for one of the errors mentioned above, you may see details such as the following:
  • ActivityId: <GUID>
    >Error : System.Net.WebException: The request failed with HTTP status 401: Anonymous Request Disallowed.
       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.Net.WebException: The request failed with HTTP status 401: Anonymous Request Disallowed.
       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()

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.
Properties

Article ID: 3189622 - Last Review: 08/31/2016 13:54:00 - Revision: 4.1

Dynamics CRM Online

  • kbmbsmigrate kbsurveynew KB3189622
Feedback