gpt4 book ai didi

当用户登录到另一个租户时,prompt=none 的 Azure AD 显示错误请求

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

我们有一个应用程序,支持通过 OpenID Connect 隐式流使用我们的 Azure AD 租户帐户无缝登录。如果用户被授权访问提供 Azure AD 颁发证据的应用程序 - 将自动授予访问权限,否则我们将显示常规应用程序登录屏幕。

每次需要进行用户身份验证时,我们都会将用户重定向到 Azure AD 登录页面 ( https://login.microsoftonline.com/xyz ),并指定 prompt=none

尊重 ODIC specification这样的标志应该具有以下效果。

The Authorization Server MUST NOT display any authentication or consent user interface pages. An error is returned if an End-User is not already authenticated or the Client does not have pre-configured consent for the requested Claims or does not fulfill other conditions for processing the request. The error code will typically be login_required, interaction_required. This can be used as a method to check for existing authentication and/or consent.

它通常按预期工作,但是,在某些情况下,Azure AD 登录页面将向最终用户显示错误屏幕,并且当用户登录到另一个 Azure AD 租户时会发生这种情况

User account '...' from identity provider 'https://sts.windows.net/.../' does not exist in tenant '...' and cannot access the application '...' in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.

问题是:

  1. 这是否违反了 ODIC 规范?
  2. 如何以用户时尚的方式妥善处理此类情况? (应用程序不负责重定向到 Azure AD 后发生的情况)。

screenshot

最佳答案

虽然我也同意这违反了规范,但我可以提供解决方法吗?

我相信您也可以尝试指定domain_hint或login_hint参数来帮助系统确定有效的 session 。希望无论当前哪个 session 用户登录,它都能给您正确的答案。

关于当用户登录到另一个租户时,prompt=none 的 Azure AD 显示错误请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38148826/

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