gpt4 book ai didi

azure - 设置从 native 应用程序进行 Azure AD 身份验证的重定向 URI

转载 作者:行者123 更新时间:2023-12-02 07:04:06 25 4
gpt4 key购买 nike

我正在使用 C++/WinRT 编写一个桌面应用程序,该应用程序需要使用 Web 帐户管理器 API 在已加入的计算机上通过 Azure AD 进行静默身份验证。

遵循最近的 Microsoft 文档 here ,我可以看到使用此 API 时在 /oauth2/token 请求中设置的重定向 uri 类似于 ms-appx-web://Microsoft.AAD.BrokerPlugin/{id }.

当我尝试在 Azure AD 应用程序的“应用程序注册”页面中设置此重定向 URI 时,收到一条错误消息,指出仅允许使用 HTTPS 方案。 (也是最新的)Azure AD 文档 here指出(强调我的):

The new App registrations experience doesn't allow developers to add URIs with HTTP scheme on the UI. Adding HTTP URIs for apps that sign in work or school accounts is supported only through the app manifest editor. Going forward, new apps won't be able to use HTTP schemes in the redirect URI. However, older apps that contain HTTP schemes in redirect URIs will continue to work. Developers must use HTTPS schemes in the redirect URIs.

这是否意味着新应用即使使用应用 list 编辑器也无法在重定向 URI 中使用非 HTTPS 方案?这是设置 native 应用程序以使用 Azure AD 进行身份验证的正确方法吗?

看起来我确实不需要重定向 uri,因为这是一个 native 应用程序;我只需要 token !似乎有 MSAL 库用于执行“集成 Windows 身份验证”(如文档 here ),但 API 似乎仅限于 .NET,不幸的是这不是一个选项。

最佳答案

Does this mean that new apps won't be able to use non-HTTPS schemes in the redirect URI even when using the app manifest editor?

是的,你说得对。

It does seem like I don't really require a redirect-uri since this is a native application;

是的,对于 native 应用程序,您可以使用默认重定向 uri。

enter image description here

更新:

本文档使用旧的应用程序注册门户。请参阅此处的详细步骤。

转到 Azure Active Directory->应用程序注册

enter image description here

创建一个新应用程序或找到您的旧应用程序(您可以忽略红色错误消息)。

enter image description here

确保应用程序类型是 native 。

enter image description here

关于azure - 设置从 native 应用程序进行 Azure AD 身份验证的重定向 URI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58952152/

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