gpt4 book ai didi

azure - 访问 token 来自错误的颁发者 'https://sts.windows.net'

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

我使用“azure-arm-resource”来获取我的 Node js 项目的 Azure 中的所有资源。

https://www.npmjs.com/package/azure-arm-resource

但是使用这个我得到一些错误,

 msRestAzure.interactiveLogin().then(credentials => {
const azureResources = new resourceManagement.ResourceManagementClient(credentials, subscriptionId);

azureResources.resources
.list()
.then(res => {
if (filter) {
return res.filter(r => r.kind === filter);
} else {
return res;
}
})
.then(d => {
console.log('Done Resources');
});
});
console.log('Pulling...');
}

错误,

 Uncaught (in promise) Error: The access token is from the wrong issuer 
'https://sts.windows.net/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/'.
It must match the tenant 'https://sts.windows.net/xxxx-xxx-xxxx-xxxx-
c3xxx4xxffd57xx7/'
associated with this subscription. Please use the authority (URL)
'https://login.windows.net/xxxx-xxxx-xxx-xxxx-xxxxxxxx' to get the token.
Note, if the subscription is transferred to another tenant there is no
impact to the services, but information about new tenant could take time to
propagate (up to an hour). If you just transferred your subscription and
this error message, please try back later.

Azure 交互式登录中未定义设备 token 凭据

最佳答案

当您登录门户时,使用组织 ID [email protected] ,它会起作用,但是当使用实时 ID [email protected] 时,我们需要传递TenantId。

主要目的是让用户的登录体验变得简单。因此,我们从所需的最少参数开始。对于 InteractiveLogin(),我认为它是零。但这是不正确的。使用liveID时必须提供TenantId或域名。

关于azure - 访问 token 来自错误的颁发者 'https://sts.windows.net',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56357669/

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