SharePoint Troubleshooting: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel
Environment
SharePoint 2013, Windows Azure AD service as Identity Provider.
Scenario
Using SAML Authentication and was trying to access a service application from SSL enabled Portal. Exported the service application security certificate and imported into SharePoint Trusted Root Certificate authority
Problem
Following is the error message when trying to connect to service application from SharePoint. “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel”.
Resolution
The imported certificate is having some validation error. The problem was incorrect host name used in certificates.
We were accessing the URL using the IP and the certificate is using the server name as ip-AC1F08ED. The resolution is either we should have service application URL with fully qualified domain name or the certificate issue should point to the server IP.
Following error in event viewer.
Error: "An operation failed because the following certificate has validation errors"