
ShreeL.37354 (Customer) asked a question.
When trying SSO with custom SP applicaton I get the below error.
ERROR:
400
Bad Request
Your request resulted in an error. Bad SAML request
Error: Bad SAML request
Why does this error occur and how to solve this? I have attached the SAML Request and also the SSO URL below.
SAML Request:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<saml2p:AuthnRequest
xmlns:saml2p=“urn:oasis:names:tc:SAML:2.0:protocol”
AssertionConsumerServiceURL=“http://localhost:8080/TestApp/ACS”
Destination=“https://**SSO_URI**/sso/saml”
ForceAuthn=“false”
ID=“a6c967da-2253-418b-bf25-53c90f50af7d”
IsPassive=“false”
IssueInstant=“2024-08-29T17:47:01.529996”
ProtocolBinding=“urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST”
ProviderName=“TestApp”
Version=“2.0”>
<saml2:Issuer
xmlns:saml2=“urn:oasis:names:tc:SAML:2.0:assertion”>http://localhost:8080/saml-service-provider-test
</saml2:Issuer>
</saml2p:AuthnRequest>
SSO URL:
In the above request the SAML XML is deflated, Base64 encoded, and url encoded.

Hello @ShreeL.37354 (Customer) Thank you for posting on our Community page!
This usually indicates a miss-configuration in the implementation, I would recommend to review the settings on both sides, please also see our doc on this matter below:
https://support.okta.com/help/s/article/400-bad-request-error-code-general-nonsuccess-received-when-attempting-login-with-saml-idp?language=en_US
Thank you for reaching out to our Community and have a great day!
--
Help others in the community by liking or hitting Select as Best if this response helped you.
Hello @ShreeL.37354 (Customer) In this case I would recommend to open up a case with Support so they can provide additional assistance and to review the logs from the back-end to spot what is causing the failure.
Actually it works when using app embed link for SSO. But I could like to know why the actual SSO link doesn't work?
It shows "You Do Not Have Access to Create a Case" when I try to open a case.