简体   繁体   English

可以和不能使用 B2C 进行身份验证的已注册应用程序之间的区别是什么?

[英]What is the Distinction Between Registered Apps That Can And Cannot Authenticate Using B2C?

Some of the applications registered in my Azure AD B2C directory display this message on their overview page:在我的 Azure AD B2C 目录中注册的一些应用程序在其概述页面上显示此消息:

You can use this application to authenticate against Azure Active Directory, but not Azure AD B2C您可以使用此应用程序对 Azure Active Directory 进行身份验证,但不能使用 Azure AD B2C

Many others do not.许多其他人没有。

应用程序注册概览页面上的消息图像

Since my code will rely on B2C authentication using client ID's from these registrations I need to know whether I can "fix" these application registrations or whether I need to create new ones.由于我的代码将依赖于使用来自这些注册的客户端 ID 的 B2C 身份验证,因此我需要知道我是否可以“修复”这些应用程序注册,或者我是否需要创建新的注册。

What's the difference between these applications?这些应用程序之间有什么区别? Is it the way in which they were created, or is it setting(s) that can be adjusted to permit B2C authentication?是它们的创建方式,还是可以调整以允许 B2C 身份验证的设置?

Clicking on the message itself only links to the Azure B2C overview page , which is not very specific help.单击消息本身仅链接到 Azure B2C 概述页面,这不是很具体的帮助。

To test the concept, I'm using msal 1.1.3 and a simple client side configuration.为了测试这个概念,我使用了 msal 1.1.3 和一个简单的客户端配置。 But as this message appears on the azure portal dashboard I don't think that's at issue:但是当这条消息出现在 azure 门户仪表板上时,我认为这不是问题:


const msalConfig = {
    auth: {
      clientId: `${MyClientId}`,
      authority: `${MyAuthorityURL}`,
      redirectURI: `${MyRedirect}`
    },
    cache: {
      cacheLocation: "localStorage",
      storeAuthStateInCookie: true
    }
  };

  const msalApplication = new Msal.UserAgentApplication(msalConfig);

B2C does not support Daemons/server-side applications, Web API chains (on-behalf-of flow), or faulted apps ( ie apps edited on other application portals such as the application registration portal; apps edited via Graph API; or apps edited via Powershell ). B2C 不支持守护进程/服务器端应用程序、Web API 链(代表流)或故障应用程序(即在其他应用程序门户(例如应用程序注册门户)上编辑的应用程序;通过 Graph API 编辑的应用程序;或已编辑的应用程序)通过 Powershell )。 Was the app ever edited in one of these places?该应用程序是否曾在这些地方之一进行过编辑? If that is the case you will need to delete and recreate the application.如果是这种情况,您将需要删除并重新创建应用程序。 This document describes the kinds of apps supported and not supported within B2C.文档描述了 B2C 中支持和不支持的应用程序类型。

Also, of course make sure that the application is registered in b2c and not just in the regular AAD.此外,当然要确保应用程序在 b2c 中注册,而不仅仅是在常规 AAD 中注册。 https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-register-applications?tabs=applications https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-register-applications?tabs=applications

Since the message in the screenshot does not appear to be documented I have reached out to the product team to ask for a more detailed explanation of that message and its context.由于屏幕截图中的消息似乎没有记录在案,我已经联系了产品团队,要求对该消息及其上下文进行更详细的解释。 I will update this thread as soon as I have that.我会尽快更新这个线程。

Since my code will rely on B2C authentication using client ID's from these registrations I need to know whether I can "fix" these application registrations or whether I need to create new ones.由于我的代码将依赖于使用来自这些注册的客户端 ID 的 B2C 身份验证,因此我需要知道我是否可以“修复”这些应用程序注册,或者我是否需要创建新的注册。

You need to create new applications under Azure AD B2C.您需要在 Azure AD B2C 下创建新应用程序。

在此处输入图片说明

If you created the application under Azure Active Directory and open it under Azure AD B2C, you will see that warning.如果您在 Azure Active Directory 下创建应用程序并在 Azure AD B2C 下打开它,您将看到该警告。

在此处输入图片说明

What's the difference between these applications?这些应用程序之间有什么区别? Is it the way in which they were created, or is it setting(s) that can be adjusted to permit B2C authentication?是它们的创建方式,还是可以调整以允许 B2C 身份验证的设置?

One is used for Azure AD, and the other one is used for Azure AD B2C.一个用于 Azure AD,另一个用于 Azure AD B2C。 Yes, it is in the way they were created.是的,这就是它们的创建方式。

I have answered this question here - microsoft graph rest api beta: application created by api in azure ad b2c is not valid我在这里回答了这个问题 - microsoft graph rest api beta: application created by api in azure ad b2c is not valid

For an application to successfully work in AAD B2C(get a token), it has following requirements要使应用程序在 AAD B2C 中成功运行(获取令牌),它具有以下要求

  1. It needs to have a service principal它需要有一个服务主体

  2. Consent to openid and offline_access scope on Microsoft Graph service principal in the tenant同意租户中 Microsoft Graph 服务主体的 openid 和 offline_access 范围

    Azure Active Directory does not have these requirements but Azure Active Directory B2C does. Azure Active Directory 没有这些要求,但 Azure Active Directory B2C 有。

The reason is that consent experience cannot be shown to the enduser in Azure Active Directory B2C while in Azure Active Directory, it is shown to the user.原因是同意体验无法在 Azure Active Directory B2C 中向最终用户显示,而在 Azure Active Directory 中,则向用户显示。

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

相关问题 使用 Azure B2C 验证 Azure AD 用户 - Authenticate Azure AD User Using Azure B2C 使用Graph API在Azure AD B2C上对用户进行身份验证 - Authenticate a user on Azure AD B2C using Graph API 有没有办法使用多个策略验证B2C应用程序 - Is there any way to Authenticate B2C application using multiple policies Azure Web App 是否可以直接进行身份验证或联合到 B2C 租户中的注册应用程序? 如果是这样,怎么做? - Is it possible for an Azure Web App to directly authenticate, or federate to a registered application within a B2C tenant? If so, how? 应用之间的Azure AD B2C SSO - Azure AD B2C SSO between Apps Azure ACS和Azure AD B2C有什么区别? - What is the difference between Azure ACS and Azure AD B2C? 无法使用Graph API在Azure B2C中删除用户 - Cannot delete user in Azure B2C using Graph API WebFlux:无法验证来自 Azure B2C 的 JWT 令牌 - WebFlux: Can't authenticate JWT token from Azure B2C Azure AD B2C 如何使用 GraphQL(Apollo 服务器)API 和 Z85BBEF56E2905610299Z836 进行身份验证 - How Azure AD B2C can authenticate with GraphQL (Apollo Server) API and ReactJs 使用Azure AD B2C和Azure AD对SPA + WebAPI进行身份验证 - SPA + WebAPI authenticate using Azure AD B2C and Azure AD
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM