Azure B2C 自定义策略授权端点给出 404

标签 azure azure-ad-graph-api azure-ad-b2b

在自定义策略中,如果我想将授权和元数据端点从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 时可能需要更改以下设置

  1. Set the redirect URLs in your identity provider applications to use b2clogin.com.
  2. Set your Azure AD B2C application to use b2clogin.com for user flow references and token endpoints.
  3. If you are using MSAL, you need to set the ValidateAuthority property to false.
  4. Make sure that you change any Allowed Origins that you have defined in the CORS settings for user-interface customization.

转到您的 B2C 应用的用户政策。请参阅下面的屏幕截图:

enter image description here

点击页面布局,如下所示:

enter image description here

运行您的自定义流程。往下看

enter image description here

Note:

You can use both the tenant name and the tenant GUID as follows:

  1. https://your-tenant-name.b2clogin.com/your-tenant-name.onmicrosoft.com (which still refers to onmicrosoft.com)
  2. 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/

相关文章:

java - 使用 Java 将代理设置添加到 Microsoft Graph 客户端

powershell - "Unexpected Error"使用 Connect-MsolService -AccessToken 连接到 Azure AD

azure - Graph API - 自动获取电子邮件(委派权限)

azure - 在 Azure AD 租户的 Azure 门户中将成员作为组所有者添加到组中

azure - 如何通过技能 list /端点使用 Azure Health Bot 技能?

Azure AD Connect 组成员资格未同步

azure - 在 Azure 应用服务中,如何将 www 重定向到非 www 域?

azure - 获取用户所属的所有 B2B 目录

azure - 如何通过 Azure PowerShell 授予用户对第三方企业应用程序的同意?

c# - CloudBlockBlob 上传的非异步版本是否已弃用