SAML Authentication error - Invalid length for a Base 64 char array or string

SAML Authentication error - Invalid length for a Base 64 char array or string

113
Created On 11/10/26 11:01 AM - Last Modified 11/10/26 16:11 PM


Symptom


Following the integration of SAML authentication into the PVWA, attempting to log in results in an authentication error.
in the PVWA.App.log we can see - "Invalid length for a Base-64 char array or string"
and the full error is -

AUTHN002E SAML authentication failure. Error: z: Failed to receive an SSO response from the identity provider ---> ComponentSpace.SAML2.Exceptions.SAMLCertificateException: The X.509 certificate could not be loaded from the string <...cert string...>. ---> System.FormatException: Invalid length for a Base-64 char array or string.
Failed to receive an SSO response from the identity provider ---> ComponentSpace.SAML2.Exceptions.SAMLCertificateException: The X.509 certificate could not be loaded from the string <...cert string...>. ---> System.FormatException: Invalid length for a Base-64 char array or string.



Environment


12.2;12.6;13.0;13.2;14.0;14.2 Privileged Access Manager (PAM, self-hosted) Password Vault Web Access

PVWA - All Versions



Cause


Verify the length of your certificate string and ensure it is divisible by 4. If it is not divisible by 4, the certificate might have been issued incorrectly, and you will need to generate a new Base-64 encoded .cer file



Resolution


Verify the length of your certificate string and ensure it is divisible by 4. If it is not divisible by 4, the certificate might have been issued incorrectly, and you will need to generate a new Base-64 encoded .cer file



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001bnACAQ&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail