Azure AD B2C 错误:请求中指定的客户端 ID 未在租户中注册 [英] Azure AD B2C Error: The client Id specified in the request is not registered in tenant

查看:21
本文介绍了Azure AD B2C 错误:请求中指定的客户端 ID 未在租户中注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试登录 Azure Active Directory B2C 应用程序.

每当我访问 URL https://login.microsoftonline.com/te/<my_domain>/<my_sign_up_sign_in_policy_name>/oauth2/v2.0/authorize?client_id=<my_client_id>...,我得到以下错误:

<块引用>

请求中指定的客户端ID未在租户中注册.

以下是有关我的配置的一些信息:

  • https://portal.azure.com 中,我创建了 Azure Active Directory B2C 租户,其中包含用户 globaladmin@<my_domain>.onmicrosoft.com

    • 为了创建应用程序,我导航到 https://apps.dev.microsoft.com,以全局管理员身份登录并在

    • 我可以成功导航到 https://portal.azure.com -> 找到 Azure AD B2C 资源 -> 点击进入 -> 应用程序.还有新创建的Web Portal v2"

    我的应用程序已使用Web Portal v2"的新 ClientId 和 ClientSecret 进行了更新.但是,当我启动应用程序并单击登录"时,出现错误.我还缺少什么其他配置?

    另外,我应该补充一点,上述所有配置的原因是我可以将我的应用程序从使用 Azure AD V1 令牌迁移到 Azure AD V2 令牌,其中包含诸如 User.Identity 之类的信息.Name,这是我用来在应用程序右上角显示当前登录用户名的值.如果有其他/更好的方法来实现这一点,请告诉我.

    解决方案

    https://login.microsoftonline.com/te/<tenant_id>/<policy_id>/oauth2/v2.0/authorize?client_id=<client_id>... URL 正确,但不应使用 应用程序注册门户,否则变为 一个有故障的应用程序 然后您会收到 请求中指定的客户端 id ... 未在租户中注册 ...错误.

    应使用 Azure 门户 的 Azure AD B2C 刀片创建 Azure AD B2C 应用程序.p>

    I am attempting to log in to an Azure Active Directory B2C application.

    Whenever I access the URL https://login.microsoftonline.com/te/<my_domain>/<my_sign_up_sign_in_policy_name>/oauth2/v2.0/authorize?client_id=<my_client_id>..., I get the following error:

    The client id <my_client_id> specified in the request is not registered in tenant <my_tenant_name>.

    Here is some information about my configuration:

    • In https://portal.azure.com, I have created the Azure Active Directory B2C tenant which contains the user globaladmin@<my_domain>.onmicrosoft.com

      • In order to create the application, I navigated to https://apps.dev.microsoft.com, logged in as the global admin and created the "Web Portal v2" application following the instructions here
    • I granted Web Portal v2 access to Microsoft Graph but did not grant access to Azure AD Windows Graph API (I didn't see this option anywhere)

    • I can successfully navigate to https://portal.azure.com -> Find the Azure AD B2C resource -> Click into it -> Applications. And there is the newly created "Web Portal v2"

    My application has been updated with the new ClientId and ClientSecret of "Web Portal v2". However, when I launch the application and click "Login", I get the error. What other configuration am I missing?

    Also, I should add that the reason for all of the above configuration is so that I can migrate my application from using Azure AD V1 tokens to Azure AD V2 tokens, which have information in them such as User.Identity.Name, which is a value I use to display the currently logged-in user's name in the top right corner of the application. If there is a different/better way to achieve this then please let me know.

    解决方案

    The https://login.microsoftonline.com/te/<tenant_id>/<policy_id>/oauth2/v2.0/authorize?client_id=<client_id>... URL is correct, but you shouldn't create an Azure AD B2C application using the Application Registration Portal, otherwise it becomes a faulted app and you then receive the The client id ... specified in the request is not registered in tenant ... error.

    An Azure AD B2C application should be created using the Azure AD B2C blade of the Azure Portal.

    这篇关于Azure AD B2C 错误:请求中指定的客户端 ID 未在租户中注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆