B2B 用户无法使用 v2.0 端点登录租户MSAL 身份验证流程 [英] B2B users cannot sign in to Tenant using v2.0 endpoint & MSAL Auth flow

查看:16
本文介绍了B2B 用户无法使用 v2.0 端点登录租户MSAL 身份验证流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建 B2B 管理门户.我从 this 示例开始,因为它使用 MSAL 和 Graph API.

I am trying to create a B2B Management portal. I've started off with this sample since it uses MSAL and Graph API.

user@live.se 在租户中.它被邀请为访客用户",即 B2B 用户.但是,即使已将其添加到租户,使用 user@live.se 登录也不起作用.登录后出现以下错误:

user@live.se is in the tenant. It's been invited as a "guest user", i.e a B2B user. However, signing in with user@live.se does not work even though it's been added to the tenant. Following error after sign-in:

AADSTS50020:API 版本2.0"不支持来自外部身份提供商live.com"的用户帐户user@live.se".独立于租户的终结点不支持 Microsoft 帐户直通用户和来宾.跟踪 ID:2ad8bee0-d00a-4896-9907-b5271a113300 相关 ID:0ea84617-4aa1-4830-859f-6f418252765e 时间戳:2017-10-03 15:35:22Z

我将权限(从 common)更改为仅允许来自我的租户的用户(要求):https://login.microsoftonline.com/tenant.onmicrosoft.com/v2.0

I changed the authority (from common) to only allow users from my tenant (requirement): https://login.microsoftonline.com/tenant.onmicrosoft.com/v2.0

在使用 MSAL 时,来宾是否算作我的租户的一部分?这意味着我必须使用旧"技术,即 ADAL 和 AAD Graph,不推荐使用,感觉有点蹩脚.

Do guests not count as part of my tenant when using MSAL? that would mean I have to use "old" tech, i.e ADAL and AAD Graph, which is not recommended, and feels kinda lame.

推荐答案

如果你在权限中传递了具体的租户值,那么

If you pass the specific tenant value in the authority, then

只有具有特定 Azure AD 租户的工作或学校帐户的用户才能登录应用程序.可以使用 Azure AD 租户的友好域名或租户的 GUID 标识符.

Only users with a work or school account from a specific Azure AD tenant can sign in to the application. Either the friendly domain name of the Azure AD tenant or the tenant's GUID identifier can be used.

这意味着 Microsoft 帐户 在这种情况下不受支持.请参阅此处了解 Microsoft 帐户和工作或学校帐户.在这种情况下,如果您从其他租户中新建一个用户用户,它也应该可以工作.

That's means the Microsoft Account is not supported in this scenario. Refer here for the Microsoft Account and Work or school accounts. And in this scenario, if you new a user user from other tenant, it should also works.

您可以从以下链接参考租户文档:

You can refer the document for tenant from link below:

获取 OpenID连接元数据文档

这篇关于B2B 用户无法使用 v2.0 端点登录租户MSAL 身份验证流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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