IDX20803: Unable to obtain configuration from: '[PII is hidden]'

Hi,

I am trying to do an angular + C# Web API application as per the below link.

https://developer.okta.com/quickstart/?_ga=2.12344372.1008786377.1532565984-961833998.1531361203#/angular/dotnet/aspnet4

The Angular part is working perfectly but I am not able to connect to Web API.
Getting error from the below code in startup.cs file

var discoveryDocument = Task.Run(() => configurationManager.GetConfigurationAsync()).GetAwaiter().GetResult();
return discoveryDocument.SigningKeys;

I am getting the below error
IDX20803: Unable to obtain configuration from: ‘[PII is hidden]’

Also getting this error. Anyone know how to solve? Thanks.

If you make a request for the authority variables keys:

authority + /v1/keys

like:
https://tom-okta-free.oktapreview.com/oauth2/default/v1/keys

What do you see?

If it is 404ing, there could be a couple things that are happening, you don’t have a default authorization server (some older orgs or IT orgs without API AM, will not have a default authorization server). Or, there is a typo or -admin in your authority

If it is returning another error, it might be best to open a case with developers@okta.com

Thanks,
Tom

I am getting a 200 response with a “keys” object.

Thanks all.

I fix this issue by adding the below in the WebApiConfig.cs

ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

        // Disable old protocols
        ServicePointManager.SecurityProtocol &= ~(SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11);