Я использую 'azure-arm-resource' для получения всех ресурсов в Azure для моего проекта js узла.
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...');
}
Error
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 Interactive Login