SAML Configuration Specification Exception in ReceiveSsoAsync

I’m using OKTA as the Identity Provider, after logging into OKTA and pressing the button for my app in the my applications, i’m redirected to https://localhost:7257/Saml/AssertionConsumerService as expected.
But on ‘var ssoResult = await _samlServiceProvider.ReceiveSsoAsync();’ line, I face issue ‘SamlConfigurationException: A SAML configuration hasn’t been specified.’.

I am working in .NET 6 core c#. What changes need to be done to get Okta Saml response?

You need to specify a SAML specification so the SAML response can be processed.

If you take a look at the ExampleServiceProvider project, you’ll see it includes an appsettings.json with SAML configuration. You will need a similar configuration but specific to your environment. The Configuration Guide in the documentation folder details the format of the SAML configuration.

There’s also an Okta Integration Guide which provides Okta specific information.

If there are still issues, please enable SAML trace and send the generated log file as an email attachment to