Saml Response status is null

A client is trying to send a SAML response to our endpoint. We take the response xml, and create a ComponentSpace.SAML2.Protocols.SAMLResponse object. We check that the object.StatusCode.Code == “urn:oasis:names:tc:SAML:2.0:status:Success” before continuing with processing the Saml response, using IsSuccess(). However the Status is null every time and the exception is thrown.

All of this happens under the hood with ComponentSpace libraries, so I have very little insight into what exactly in the xml is causing the problem. What causes the Stuatus of a SAMLResponse object to be or not be initialized and populated? Can anyone point me in the right direction?

Here is the code:

var samlResponse = new SAMLResponse(responseXml);
if (!samlResponse.IsSuccess())
throw new Exception(“SAML Response Status is not a success status”);

I’ve attached the response xml being used during testing.


Thanks for including the SAML response XML.
The issue is that the SAML response must include a element. This is missing which is causing the error.
The following is required immediately after the element.
samlp:Status
<samlp:StatusCode Value=“urn:oasis:names:tc:SAML:2.0:status:Success”/>
</samlp:Status>
You’ll also find that the element is missing the required ID attribute.
If you run the ValidateXML console application project that we ship under the Examples\Utility folder, it will perform a validation against the SAML XML schema and list the various errors.

[quote]
ComponentSpace - Tuesday, May 17, 2016
Thanks for including the SAML response XML.
The issue is that the SAML response must include a element. This is missing which is causing the error.
The following is required immediately after the element.



You'll also find that the element is missing the required ID attribute.
If you run the ValidateXML console application project that we ship under the Examples\Utility folder, it will perform a validation against the SAML XML schema and list the various errors.
[/quote]

Thank you for the quick reply! I will definitely checkout the ValidateXML application.