SAML authentication: key not found in dictionary

0
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
 
asked 11/16/2021 4:34:24 PM
add a comment

1 Answers

0
Hi saju, Missing Identity Provider to the config. Or if you did, you've got the wrong EntityId of the IdentityProvider. Please follow our SAML sample code and check closely your code with that .
 
answered 11/22/2021 5:54:21 PM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged saml or ask your own question.