Login to the CPM using an IDP may fail with the Invalid issuer error message

Login to the CPM using an IDP may fail with the "Invalid issuer" error message

If you're using an IDP, login to the CPM may fail with the following error message:

login failed. reason: Invalid issuer in the Assertion/Response (invalid_response):


It also may be found in the cpm_server.log:
ERROR:  complete_directory_service_signin(additional_views.py:1605)  login failed. reason: Invalid issuer in the Assertion/Response (invalid_response)

It may happen because a wrong Entity ID was entered, or an extra character was added at the end. For example, if a "/" character was added at the end, or "https" prefix was used instead of "http".
You can check it by logging to the CPM using local root user, and by checking "Identity Provider" section in the "General Settings".
Specify this setting with no special characters at the end, click "Apply" and try to login using Identity Provider again, or use the "Test connection..." option.