Subject: SAML authentication: key not found in dictionary
Date: 2021-11-16 16:34:24
From: saju
Source: saml-authentication-key-not-found-dictionary
----------------------------------------------------------------------

Hi,

I am developing SSO and trying to test it against Okta and Auth0.
In both, I am getting the error "The given key was not present in the dictionary" when I call the Saml.ServiceProvider.ReceiveSingleSignOnRequest method in the AsserttionConsumerService page.

2021-11-16 13:22:50,388 ERROR [6] ConsumerService.OnLoad - In AssertionConsumerService ssoEx: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ComponentPro.Saml2.EasySaml.SamlServiceProvider.ReceiveSingleSignOnRequest(HttpContext httpContext, String& partnerIdP, String& authnContext, String& userName, Attribute[]& attributes)
   at ComponentPro.Saml2.EasySaml.SamlServiceProvider.ReceiveSingleSignOnRequest(HttpContext httpContext, String& partnerIdP, String& authnContext, String& userName, IDictionary`2& attributes)
   at ConsumerService.OnLoad(EventArgs e) in C:\Trabajo\...\Login\AssertionConsumerService.aspx.cs:line 58
2021-11-16 13:22:50,388 ERROR [6] ConsumerService.OnLoad - In AssertionConsumerService ssoEx.Message:The given key was not present in the dictionary.
2021-11-16 13:22:50,389 ERROR [6] ConsumerService.OnLoad - In AssertionConsumerService ssoEx.StackTrace:   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ComponentPro.Saml2.EasySaml.SamlServiceProvider.ReceiveSingleSignOnRequest(HttpContext httpContext, String& partnerIdP, String& authnContext, String& userName, Attribute[]& attributes)
   at ComponentPro.Saml2.EasySaml.SamlServiceProvider.ReceiveSingleSignOnRequest(HttpContext httpContext, String& partnerIdP, String& authnContext, String& userName, IDictionary`2& attributes)
   at ConsumerService.OnLoad(EventArgs e) in C:\Trabajo\...\Login\AssertionConsumerService.aspx.cs:line 58

How can I find which key is not found? How can I fix it?

Thank you, regards,

Carlos

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index