You are trying to configure the Microsoft Dynamics 365 Outlook client in a deployment that utilizes ADFS for authentication and it is failing with an error. The generic error that the user sees occurring is "An error occurred. Contact your administrator for more information." If you reveiw the config log Microsoft.Crm.Application.Outlook.ConfigWizard-Client.log, you will see the following error logged.
>Crm Exception: Message: accessing_ws_metadata_exchange_failed: Accessing WS metadata exchange failed, ErrorCode: -2147204335, InnerException: Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: accessing_ws_metadata_exchange_failed: Accessing WS metadata exchange failed ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
>Crm Exception: Message: Authentication was canceled., ErrorCode: -2147167708
>Exception during Signin Microsoft.Crm.Outlook.ClientAuth.CrmClientAuthException: Authentication was canceled.
If you happen to take a Fiddler trace during the troubleshooting, you will see the following error code in the header response of the GET request to the ADFS server.
X-MS-Forwarded-Status-Code: 500