1

我需要在我的应用程序中通过 azure ad 进行身份验证。我找到了这个示例代码:https ://github.com/Azure-Samples/active-directory-java-native-headless但我的 azure 配置了 MFA,我收到此错误:

{"error_description":"AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '00000003-0000-0000-c000-000000000000'.\r\nTrace ID: 643e8491-904a-4cea-b2a6-c720dda97f00\r\nCorrelation ID: 946f5469-c2b3-4de4-8c92-ab73aabc13d3\r\nTimestamp: 2018-08-27 12:59:25Z","error":"interaction_required"}

现在我不确定如何向我的应用程序提供验证码。有没有人有任何示例代码,wiki 如何将它与 MFA 一起使用?

4

1 回答 1

-1

这个样本应该可以帮助你。它使用 OpenID 与 Java 应用程序连接。

至于您的错误,在 AAD 中,如果您在一个位置进行初始登录,然后从另一个位置登录,则 AD 上有条件将其标记为“风险活动”。

因此,对于您的帐户,可以设置一个“已移至新位置”标志,自动触发对 MFA 的需求。如果确实遇到这种情况,请检查 Azure 中的条件访问位置,看看是否可以清除标记。(或设置具有指定位置的原始帐户。)

https://docs.microsoft.com/en-us/azure/active-directory/active-directory-conditional-access-locations

于 2018-09-04T22:58:54.543 回答