"Web server returned SecureChannelFailure exception" error appears in Dynamics 365 mailbox alert

Applies to: Dynamics 365 Customer Engagement Online

Symptom


An alert like the following example is logged in a Dynamics 365 mailbox record:

"Email cannot be received for the mailbox [Mailbox Name] because an error occurred while establishing a secure connection to the email server. The mailbox 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]"

Email Server Error Code: Web server returned SecureChannelFailure exception."

If you click Details, you see the following additional information:

ActivityId: [GUID]

>Error : System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.

at System.Web.Services.Protocols.WebClientAsyncResult.WaitForResponse()
at System.Web.Services.Protocols.WebClientProtocol.EndSend(IAsyncResult asyncResult, Object& internalAsyncState, Stream& responseStream)
at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeServiceBinding.EndFindFolder(IAsyncResult asyncResult)
at Microsoft.Crm.Asynchronous.EmailConnector.FindSearchFolderStep.EndCall()
at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeIncomingEmailProviderStep.EndOperation()

 

Cause


This typically indicates an SSL or TLS configuration issue. One potential cause is a known issue that can occur when connecting Dynamics 365 Online to an Exchange on-premises environment that is located behind an F5 (BIG-IP) system. 

Resolution


If your configuration goes through an F5 (BIG-IP) system, refer to the following article:

K40424522: The BIG-IP system may fail to process the SSL/TLS handshake correctly if the client application uses Microsoft Schannel TLS library
https://support.f5.com/csp/article/K40424522