gpt4 book ai didi

azure - 通过 Microsoft 登录个人和任何 Azure AD

转载 作者:行者123 更新时间:2023-12-03 00:38:01 25 4
gpt4 key购买 nike

我已在 Azure 上创建了一个 Web 应用程序,并将身份验证模式设置为;

"Accounts in any organizational directory (Any Azure AD directory -Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)

All users with a work or school, or personal Microsoft account can useyour application or API. This includes Office 365 subscribers."

它非常适合我和我的大学,也适用于个人 Microsoft 帐户。

我现在尝试登录不同 Azure AD 上的用户,但这些用户无法登录。这是从他们的 AD 中获取的尝试登录日志。屏幕上向用户显示了类似的消息

User account '{email}' from identity provider '{idp}' does not existin tenant '{tenant}' and cannot access the application'{appId}'({appName}) in that tenant. The account needs to be added asan external user in the tenant first. Sign out and sign in again witha different Azure Active Directory user account.

Web 应用程序的唯一目的是获取用户的 Azure/MS 验证电子邮件地址并在用户数据库中执行查找。

最好是在不需要“其他 azure AD”管理员做任何事情的情况下实现这一点。但如果需要的话可以提出这个要求。我只是不知道该问什么。

最佳答案

User account '{email}' from identity provider '{idp}' does not existin tenant '{tenant}' and cannot access the application'{appId}'({appName}) in that tenant. The account needs to be added asan external user in the tenant first. Sign out and sign in again witha different Azure Active Directory user account.

出现此错误的原因有很多。请检查以下内容是否有帮助:

案例1:

请检查您的登录网址是否如下所示:

https://login.microsoftonline.com/<tenant_id>/

如果是这样,您在选择此选项时可能会收到错误消息:“任何组织目录中的帐户(任何 Azure AD 目录 - Multi-Tenancy )和个人 Microsoft 帐户(例如 Skype、Xbox)” 并且其他组织的用户无法访问该应用程序。

要解决该错误,请尝试将登录 URL 更改为https://login.microsoftonline.com/common

在应用程序代码的权限设置中应用此 URL 值。

要详细了解如何执行此操作,请查看此 link .

情况2:

还有一种可能是用户已经使用 Microsoft 以外的不同个人帐户登录了事件 session 。要确认这种情况,请检查错误消息中的用户帐户身份提供商值。

要解决该错误,请通知用户从事件 session 中注销,然后从不同的浏览器或专用浏览器 session 中重新登录。否则要求他们清除 cookie 和缓存,以新身份登录。

如果错误仍然无法解决,请阅读以下引用(如果有帮助)。

引用:

Error AADSTS50020 - User account from identity provider does not exist in tenant - Active Directory | Microsoft Docs

关于azure - 通过 Microsoft 登录个人和任何 Azure AD,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71409132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com