Unable to obtain configuration from Azure AD B2C

允我心安 提交于 2020-03-25 12:31:08

问题


Following this tutorial by Microsoft, the JavaScript application is not able to access the API protected by Azure AD B2C. The application is able to login/authenticate, but when clicking the Call Web API button, the following message is output onto the page:

Web APi returned:
"AuthenticationFailed: IDX10803: Unable to obtain configuration from: 'https://b2c-tenant-name.microsoftonline.com/tfp/b2c-tenant-name.onmicrosoft.com/B2C_1_signupsignin/v2.0/.well-known/openid-configuration'."

How can this be repaired? What change is required to allow the JavaScript SPA to call the protected web API?


回答1:


Well that URL looks a bit odd. It should be something like:

https://b2c-tenant-name.b2clogin.com/b2c-tenant-name.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1_signupsignin

I got this from the Run user flow feature in the Azure portal.

You can't use microsoftonline.com URLs any more. They were deprecated. The host is now b2clogin.com.



来源:https://stackoverflow.com/questions/60682584/unable-to-obtain-configuration-from-azure-ad-b2c

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