Forums, Documentation & Knowledge Base - ComponentSpace

ADFSSP example Attributes

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:

<Attribute Name="">
<AttributeValue>[email protected]</AttributeValue>

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("")
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.