Forums, Documentation & Knowledge Base - ComponentSpace

ADFSSP example Attributes


http://componentspace.com/Forums/Topic1659.aspx

By rpuser - 9/2/2015

I am currently looking at the AssertionConsumerService.aspx page and I am wondering how to fetch the attributes from the response sent from the ADSF Idp.
The decrypted xml response includes the following:

<AttributeStatement>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress">
<AttributeValue>email@worldemail.com</AttributeValue>
</Attribute>
</AttributeStatement>

I am trying to use the SAMLcomponent library to get the email in the response.

samlAssertion.GetAttributes("emailaddress") does not work or even samlAssertion.GetAttributes("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress")
By ComponentSpace - 9/2/2015

I'd recommend taking a look at our SAML high-level API. This is simpler to use than the low-level API calls including SAMLAssertion.GetAttributes.
The high-level API SAMLServiceProvider.ReceiveSSO returns an out parameter that is the attributes. There are a few different overloads but either the attributes may be returned as an IDictionary of SAML attribute names and values or an array of SAMLAttribute objects.
The high-level API ExampleServiceProvider project demonstrates calling this API and accessing the SAML attributes returned by the identity provider.
Our Developer Guide also describes using the ExampleServiceProvider as a relying party (ie service provider) and with ADFS as the claims provider (ie identity provider).
If you're still having issues, please let me know.