Failed to open IdP login page or to test connection with the errors HTTP Error 503 The service is unavailable or 404 File or directory not found.

Failed to open IdP login page or to test connection with the errors: "HTTP Error 503. The service is unavailable." or "404 - File or directory not found."

Issue: 

When trying to connect to IdP from CPM, you may receive errors:  "HTTP Error 503. The service is unavailable."
 or "404 - File or directory not found." There are no errors in the AD FS event log or  OKTA System logs, as well as CPM logs.


Description:

The issue points to a misconfiguration of identity provider in CPM. "Sign in URL:" option might not be specified properly. 


Resolution:

Go to the general settings on the CPM, and choose an identity provider settings. In the "Sign in URL:"   link should be in the following format for AD FS:

https:// [ADFS server's ip adress or DNS name]/adfs/ls/

for OKTA: 

https://[OKTA hostname]/app/[Application id]/[GUID]/sso/saml