【发布时间】:2020-11-17 11:08:49
【问题描述】:
如果授权 url 类似于 https://login.microsoftonline.com/domainName(其中域名是与您的租户关联的域)我收到以下错误
获取令牌请求返回 http 错误:400 和服务器响应:错误描述 AADSTS90002 未找到租户“组织”如果租户没有活动订阅,则可能会发生这种情况。检查以确保您拥有正确的租户 ID
如果 authority_url 类似于 https://login.microsoftonline.com/{Guid}(其中 Guid 是租户 ID)
示例代码:
var authorityUrl = 'https://login.microsoftonline.com/organizations';
var authContext = new AuthenticationContext(authorityUrl, undefined, undefined, '');
var token = await this.authContext.acquireTokenWithClientCredentials(this.resourceId, this.clientId, this.clientSecret);
使用“adal-node”:“0.2.1”
【问题讨论】:
-
该错误是由您使用的ADAL版本引起的。你用的是哪个版本?
标签: node.js typescript azure-active-directory adal adal.js