gpt4 book ai didi

azure - 尝试登录时找不到租户?

转载 作者:行者123 更新时间:2023-12-03 00:29:32 26 4
gpt4 key购买 nike

我正在尝试使用此处的示例登录 Azure AD B2C 应用程序:https://github.com/nordvall/TokenClient/wiki/OAuth-2-Resource-Owner-Password-Credentials-grant-in-AzureAd

配置如下:

网址:https://login.microsoftonline.com/[myapp].onmicrosoft.com/oauth2/token?api-version=1.6

传入 client_id 的 Azure AD B2C 应用程序应用程序 ID,但我实际上不确定要为资源传入什么。我正在尝试获取某些 azure 函数的访问 token ,但 azure 函数应用程序似乎没有任何我可以在任何地方定义的特定“资源 id”。

当我发出发布请求时,我收到以下信息:

{
"error": "invalid_request",
"error_description": "AADSTS90002: Tenant not found. This may happen if there are no active subscriptions for the tenant. Check with your subscription administrator.\r\nTrace ID: x\r\nCorrelation ID: x\r\nTimestamp: 2018-02-19 10:54:20Z",
"error_codes": [
90002
],
"timestamp": "2018-02-19 10:54:20Z",
"trace_id": "x",
"correlation_id": "x"
}

最佳答案

The guide不幸的是,您引用的是 Azure AD,而不是 B2C。

Azure AD B2C 目前不支持资源所有者授予流程,请参阅 this SO postUserVoice request for this .

此文档可能有帮助:Azure Active Directory B2C: Types of applications 。更具体地说:Daemons/server-side apps .

These apps can get tokens only after an interactive user flow has occurred.

关于azure - 尝试登录时找不到租户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48864618/

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