在自定义策略中,如果我想将授权和元数据端点从login.microsoftonline.com更改为tenant.b2clogin.com
我们应该使用什么。
我收到端点 404
最佳答案
您的案例
我想将授权和元数据端点从 login.microsoftonline.com 更改为tenant.b2clogin.com
解决方案
根据您的情况,您需要为您的应用程序配置自定义 URI。为此,请查看以下步骤
遵循的步骤
当您在 Azure Active Directory (Azure AD) 中设置用于注册和登录的身份提供程序时 B2C application ,您需要指定一个重定向 URL。
In the past, login.microsoftonline.com was used, now you should be using b2clogin.com.
For Example https://YourTenantName.b2clogin.com
使用 b2clogin.com 时可能需要更改以下设置
- Set the redirect URLs in your identity provider applications to use b2clogin.com.
- Set your Azure AD B2C application to use b2clogin.com for user flow references and token endpoints.
- If you are using MSAL, you need to set the ValidateAuthority property to false.
- Make sure that you change any Allowed Origins that you have defined in the CORS settings for user-interface customization.
转到您的 B2C 应用的用户政策。请参阅下面的屏幕截图:
点击页面布局,如下所示:
运行您的自定义流程。往下看
Note:
You can use both the tenant name and the tenant GUID as follows:
- https://your-tenant-name.b2clogin.com/your-tenant-name.onmicrosoft.com (which still refers to onmicrosoft.com)
- https://your-tenant-name.b2clogin.com/your-tenant-guid (in which case there is no reference to Microsoft at all)
Remember
You cannot use a custom domain for your Azure Active Directory B2C tenant, e.g.
https://your-tenant-name.b2clogin.com/your-custom-domain-name would not work.
如果您在实现过程中遇到任何问题,可以引用官方文档here
更多疑问您还可以引用here
希望这将有助于找出解决办法。谢谢。
关于Azure B2C 自定义策略授权端点给出 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55539929/