AADSTS75011 用户通过服务进行身份验证的身份验证方法与请求的身份验证方法 AuthnContextClassRef

问题描述 投票:0回答:2

https://learn.microsoft.com/en-us/troubleshoot/azure/active-directory/error-code-aadsts75011-auth-method-mismatch#cause

SSO 适用于 Chrome,不适用于 Edge。 有人可以帮我简化一下原因吗?只是尝试从不同的浏览器更改身份验证上下文吗?或者这是一个已经改变的不同背景?可能有哪些不同类型的上下文?

python authentication single-sign-on saml idp
2个回答
1
投票

我们也有同样的问题。我们发现,如果您使用新的私人窗口,则可以从 Edge 打开它。或者,完全注销所有 SSO,然后尝试登录应用程序。出现提示时,不要选择您现有的个人资料,而是单击使用另一个帐户登录。

以下是您链接到的文章中的提示:“但是,用户在访问应用程序之前已经进行了身份验证,并且用于先前身份验证的 AuthnContext(身份验证方法)与所请求的身份不同。”


0
投票

默认情况下,AuthnContext 设置为PasswordProtectedTransport。例如,如果某人正常登录,则此方法有效,但如果他们使用 Windows Hello 登录其 PC,则为 x509 身份验证。您需要使用多个选项覆盖它或将其设置为接受任何身份验证方法。如果您使用 OneLogin Api,这在 advance_settings.json 中相当容易做到:

    // Authentication context.
    // Set to false and no AuthContext will be sent in the AuthNRequest,
    // Set true or don't present this parameter and you will get an AuthContext 'exact' 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport'
    // Set an array with the possible auth context values: array ('urn:oasis:names:tc:SAML:2.0:ac:classes:Password', 'urn:oasis:names:tc:SAML:2.0:ac:classes:X509'),
    "requestedAuthnContext": true,
    // Allows the authn comparison parameter to be set, defaults to 'exact' if the setting is not present.
    "requestedAuthnContextComparison": "exact",

参考: https://github.com/SAML-Toolkits/python-saml

© www.soinside.com 2019 - 2024. All rights reserved.