IDX20803: Unable to obtain configuration from

▼魔方 西西 提交于 2019-11-30 04:02:19

问题


I know this question has been answered, but I don't understand what people exactly do (about certificates, ssl) and they all use a localhost but not me.

I used this sample as my example OpenIdConnect

I'm using:

  • A web app
  • A web API

Both are using .Net Core 2.1. The Web App is using the Azure AD connection to get a JwtBearer token, that is sent to the API.

Seeing the route /api/information in the API, a request is sent from the Web App to the API, and the API is returning the error above.

The exact error is:

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://<mycompany>.onmicrosoft.com/<big Guid of 72 chars>/.well-known/openid-configuration'.

So I tried to solve this error, by adding certificates, adding the neccessary libraries (System.Net.Http v4.3.3), checked every permission in Azure AD but none of these worked.

If you need more information, I can provide them by adding them in this post.


回答1:


Solved it by replacing, in appsettings.json :

"AzureAd": {
     "Instance": "<APP_Uri_from_Azure_Portal>",
...
}

To

"AzureAd": {
     "Instance": "https://login.microsoftonline.com/",
...
}


来源:https://stackoverflow.com/questions/50742248/idx20803-unable-to-obtain-configuration-from

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!