gpt4 book ai didi

azure - 这里的ResourceId是什么?

转载 作者:行者123 更新时间:2023-12-03 04:19:33 24 4
gpt4 key购买 nike

目前,我正在尝试从 AAD(这是一个 native 应用程序)获取不记名 token 。我有当前的代码块

private AuthenticationContext authContext = null;
authContext.AcquireTokenAsync(todoListResourceId, clientId, redirectUri, new PlatformParameters(PromptBehavior.Always))

那么在当前代码块中,todoListResourceId 是什么?

最佳答案

这是您想要访问 token 的 API 的资源标识符。在这种情况下,您的客户端应用程序会对 Azure AD 说“给我一个待办事项列表服务的 token ”。

对于 MS API,您通常使用 URI,例如:

  • MS Graph API:https://graph.microsoft.com
  • Azure AD 图形 API:https://graph.windows.net

如果是您自己的 API,您可以使用 API 客户端 ID 或应用程序 ID URI(可在应用程序注册的属性中找到)。尽管它确实需要将 API 配置为接受两者作为有效受众。如果它只接受一个,那么您必须使用那个。

关于azure - 这里的ResourceId是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50412203/

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