When an SSO login fails, the login page shows only “Single sign-on failed. Contact your administrator.” To find the reason, go to System > Permissions > Visus Single Sign-On > Login Log, and examine the Failure Reason column.
To examine a problem without a real login, test the provider. The test shows the same reason, and the SAML response.
| Failure reason |
Cause and solution |
| The request of the response is unknown, expired or already answered. |
The request expired after 10 minutes, or the browser sent the response again. Start a new login from the admin login page. Do not start the login from the IdP portal. The module accepts only responses to its own requests. |
| The response answers a request that this browser did not start. |
The browser that started the login is not the browser that posts the response. Start and complete the login in the same browser. Make sure that the browser accepts cookies from the admin site. |
| The response does not answer the request. |
The response has a different InResponseTo value. Start a new login. |
| The module sent the request of the response to another identity provider. |
The response comes to the ACS URL of a different provider. Make sure that each IdP application has the ACS URL of its own provider. |
| The SAMLResponse parameter is missing or is not valid base64. |
The IdP did not post a valid response. Examine the IdP configuration. |
| Failure reason |
Cause and solution |
| The response comes from another issuer, or The assertion comes from another issuer. |
The IdP Entity ID of the provider is wrong. Import the IdP metadata again. |
| The assertion is for another audience. |
The entity ID at the IdP is not the SP Entity ID of the provider. Copy the SP Entity ID to the IdP again. |
| The response is for another destination. |
The reply URL at the IdP is not the ACS URL of the provider. Copy the ACS URL to the IdP again. This can also occur after a change of the base URL or the admin URL of Magento. |
| Failure reason |
Cause and solution |
| The assertion is not signed. |
Require Signed Assertions is on, and the IdP signs only the response. Configure the IdP to sign the assertion. Or turn on Require Signed Response and turn off Require Signed Assertions. |
| The response is not signed. |
Require Signed Response is on, and the IdP signs only the assertion. Configure the IdP to sign the response, or turn off the option. |
| The signature of the response (or assertion) is not valid: The signature does not verify with a certificate of the identity provider. |
The IdP signs with a certificate that is not in IdP Signing Certificates. This occurs after the IdP rotated its key. Add the new certificate. |
| The signature of the response (or assertion) is not valid: The module does not accept the signature algorithm. |
The IdP signs with SHA-1 or with ECDSA. Configure the IdP to use RSA with SHA-256 or stronger. |
| The assertion is encrypted, and no service provider key is active to decrypt it. |
The IdP encrypts the assertion, and no service provider key is active. Activate or generate a key. Then give its certificate to the IdP. |
| The module cannot decrypt the assertion: … |
The IdP encrypted the assertion for a key that is not active, or with an algorithm that the module does not support. Give the IdP the current SP metadata. Make sure that the IdP uses AES-GCM or AES-CBC, and RSA-OAEP. The module refuses RSA PKCS #1 v1.5. |
| The assertion is not encrypted. |
Require Encrypted Assertions is on, and the IdP does not encrypt the assertion. Turn on the encryption at the IdP, or turn off the option. |
| Failure reason |
Cause and solution |
| The assertion has expired, or The assertion is not valid yet. |
The clocks of the IdP and of the Magento server are different. The module accepts a difference of 3 minutes. Synchronize the server clock with NTP. |
| The module accepted this assertion before. |
The browser posted the same response again. Start a new login. |
| The response must contain exactly one assertion. |
The IdP sent no assertion or more than one assertion. Examine the IdP configuration. |
| The assertion has no NameID, or its NameID is encrypted. |
Configure the IdP to send a NameID that is not encrypted. |
| The assertion has no authentication statement, or The assertion has no authentication context class. |
The IdP did not send how the user authenticated. Examine the IdP configuration. |
| The assertion has the authentication context …, which does not satisfy the request. |
The user authenticated with a method that is not in Requested Authentication Context. Change the request, or the policy of the IdP. |
| Failure reason |
Cause and solution |
| The login has no email address. Thus the module cannot link it to an admin user. |
The Email Attribute is wrong, or the IdP does not send it. Examine the attributes in the test result. |
| The domain of the email address does not belong to the identity provider. |
The email domain has no verified domain record for this provider. Add and verify the domain. |
| No admin user has the email address. |
Create Admin User On First Login is off, and the admin user does not exist. Create the admin user, or turn on the option. |
| More than one admin user has the email address. |
Two admin users have the same email address. Change the email address of one user. |
| The login has no first name or last name. Thus the module cannot create the admin user. |
The provider creates users, and the IdP does not send the names. Map the name attributes. |
| The provider has no role for a new admin user. |
Set Role For Provisioned Users, or add role rules. |
| No role rule matches the groups of the user, and the provider denies them. |
Deny Users Without A Matching Rule is on, and no rule matches. Add the group of the user to a rule. Examine the group values in the test result. |
| The admin user is inactive, is locked, has expired or has no role. |
Correct the admin user in System > Permissions > All Users. |
| The identity provider is inactive. |
Turn on Active for the provider. |
| Problem |
Cause and solution |
| The login form does not switch to SSO. |
The domain is not verified, or has no provider. Examine the domain in Domains. |
| The login page shows “Single sign-on is not available. Contact your administrator.” |
The provider is inactive, or it signs requests and has no active service provider key that has not expired. |
| The login page shows “The single sign-on provider does not exist.” |
The login URL has a wrong provider code. |
| The browser blocked the popup of the test. |
Allow popups for the admin site, and try again. |
| An admin user cannot change the provider or the domain of their own login. |
This is intentional. Ask another admin user. Refer to Identity providers. |
| The admins see “No service provider key is active.” |
A provider signs requests, and no key is active. Generate a key. |
The module also writes warnings to the Magento system log, var/log/system.log. Examples are a failed DNS lookup of a domain, a domain that loses its verification, and a repaired audit trigger.