SAMLServiceProvider.ReceiveSSO includes an overload that returns an IDictionary<string, string>, which is suitable for single-value SAML attributes, and an overload that returns a SAMLAttribute[], which is suitable for multi-value SAML attributes. In many use cases, single-value SAML attributes are used and the IDictionary<string, string> overload is more convenient. However, in your case with a multi-value SAML attribute, you need to use the overload that returns a SAMLAttribute[]. bool isInResponseTo; string partnerIdP; string authnContext; string userName; SAMLAttribute[] attributes; string targetUrl = null; // Receive and process the SAML assertion contained in the SAML response. // The SAML response is received either as part of IdP-initiated or SP-initiated SSO. SAMLServiceProvider.ReceiveSSO(Request, out isInResponseTo, out partnerIdP, out authnContext, out userName, out attributes, out targetUrl); Using the SAMLAttribute class, you have access to the Name, FriendlyName and attribute value(s).
Regards ComponentSpace Development
|