@Shripad Godse The error message “OpenIdConnectAuthenticationHandler: message.State is null or empty” is usually caused by the fact that you are not using the OpenID Connect provider configuration discovery feature offered by the OIDC middleware, that allows it to retrieve the cryptographic keys used to sign identity tokens <sup>1</sup>. If your provider supports this feature, remove the entire Configuration node and set Authority instead <sup>2</sup>.
You can try the following steps to resolve the issue:
- Make sure that you have configured the OpenID Connect provider correctly in your application.
- Check if your provider supports the OpenID Connect provider configuration discovery feature.
- Remove the entire Configuration node and set Authority instead.
- Set the AuthenticationProperties.State parameter to a non-null value before calling the Challenge method.
If the above steps do not resolve the issue, you can try contacting Azure support for further assistance <sup>3</sup>.
I hope this helps! Let me know if you have any other questions.