PVWA - SAML authentication fails on the 1st attempt but then succeeds on the 2nd attempt
171
Created On 11/10/26 10:56 AM - Last Modified 11/10/26 16:07 PM
Symptom
When trying to login to PVWA via SAML authentication, it fails on the 1st attempt but then succeeds on the 2nd attempt.
Error on 1st attempt:
Authentication Failure. Please contact your Administrator.
The following errors are seen in PVWA Log file c:\windows\temp\PVWA\PVWA.App.log:
2024-08-28 10:26:03,488 || ERROR || 74 || || UI || || 26633176-e713-412e-b886-b2e78f9288d3 || Failed to receive an SSO response from the identity provider || ComponentSpace.SAML2.Exceptions.SAMLProtocolException: An SP-initiated SAML response from <IDP URL> was received unexpectedly.
2024-08-28 10:26:03,488 || ERROR || 74 || || UI || || 26633176-e713-412e-b886-b2e78f9288d3 || Failed to receive an SSO response from the identity provider || || ac: Failed to receive an SSO response from the identity provider ---> ComponentSpace.SAML2.Exceptions.SAMLProtocolException: An SP-initiated SAML response from <IDP URL> was received unexpectedly.
2024-08-28 10:26:03,488 || ERROR || 74 || || UI || || 26633176-e713-412e-b886-b2e78f9288d3 || AUTHN002E SAML authentication failure. Error: ac: Failed to receive an SSO response from the identity provider ---> ComponentSpace.SAML2.Exceptions.SAMLProtocolException: An SP-initiated SAML response from <IDP URL> was received unexpectedly.
Environment
12.2;12.6;13.0;13.2;14.0;14.2 Privileged Access Manager (PAM, self-hosted) Password Vault Web Access PVWA with Load Balance
Cause
The Identity Provider is set with PVWA Load Balancer URL in the Assertion Consuming URL.
The authentication failure is due to opening PVWA using Individual URL instead of Load Balancer URL.
The 1st SAML authentication will fail as the request is originating from PVWA Individual URL. The 2nd SAML authentication attempt will success as the request is originating from the expected PVWA Load Balancer URL.
Resolution
- Open PVWA using the Load Balancer URL instead of Individual URL.
- If opening PVWA Load Balancer URL gets redirected to PVWA individual URL, check if there is a URL Redirection setting in each PVWA servers (IIS Manager - Sites - Default Web Site - HTTP Redirect) and ensure the redirection URL is set to PVWA Load Balancer URL instead of the Individual URL.