简体   繁体   English

Azure AD B2C 配置 URL 无法到达

[英]Azure AD B2C Configuration URL cannot be reached

I configured a new Azure AD B2C Tenant for testing purposes.我配置了一个新的 Azure AD B2C 租户用于测试目的。 I am trying to follow the example to use Azure AD B2C with Android.我正在尝试按照示例将 Azure AD B2C 与 Android 一起使用。

https://github.com/Azure-Samples/active-directory-b2c-android-native-appauth https://github.com/Azure-Samples/active-directory-b2c-android-native-appauth

I created beside the B2C Tenant already a User Flow for the login.我已经在 B2C 租户旁边创建了一个用于登录的用户流。

During the authentication flow the app wants to read the "well known openid configuration" for my User Flow在身份验证流程中,应用程序想要为我的用户流程读取“众所周知的 openid 配置”

https://login.microsoftonline.com/geomobilestage.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1_login_signin https://login.microsoftonline.com/geomobilestage.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1_login_signin

but the URL returns a 404 error.但 URL 返回 404 错误。 But when I try the following URL to read the configuration I receive http status 200但是当我尝试以下 URL 来读取配置时,我收到 http 状态 200

https://geomobilestage.b2clogin.com/geomobilestage.onmicrosoft.com/B2C_1_login_signin/v2.0/.well-known/openid-configuration https://geomobilestage.b2clogin.com/geomobilestage.onmicrosoft.com/B2C_1_login_signin/v2.0/.well-known/openid-configuration

The URLs are public so everyone can try to call them in the browser to see the result.这些 URL 是公开的,因此每个人都可以尝试在浏览器中调用它们以查看结果。

So the configuration itself exists and seems to be ok.所以配置本身存在并且似乎没问题。 I have already another Azure AD B2C tenant and when I try to call the first URL for this tenant everything is fine.我已经有另一个 Azure AD B2C 租户,当我尝试为这个租户调用第一个 URL 时,一切都很好。 It seems to be that I am missing some configuration in the Azure portal but I really have no idea what I am missing and even where to look.似乎我在 Azure 门户中缺少一些配置,但我真的不知道我缺少什么,甚至不知道在哪里看。

Regards问候

Michael迈克尔

For Azure AD, see here :对于 Azure AD,请参见此处

https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration

For Azure AD B2C, see here :对于 Azure AD B2C,请参见此处

https://{domain-name}.b2clogin.com/{domain-name}.onmicrosoft.com/{policy}/v2.0/.well-known/openid-configuration

The key thing here is to realize that the b2c config endpoint has a reference to a policy in it, otherwise it's likely AAD.这里的关键是要意识到 b2c 配置端点中包含对策略的引用,否则它很可能是 AAD。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM