I am using 'azure-arm-resource' for get all resources in azure for my node js project.
https://www.npmjs.com/package/azure-arm-resource
But using this I get some error,
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.
Device Token Credentials undefined in azure interactive login
When you login on the portal ,when using an org id [email protected] , it will work, but when use a live id [email protected], we need to pass TenantId.
Primary purpose is to make the login experience simple for the user. Hence we start with minimal required parameters. For interactiveLogin(), I thought it was zero. But that is incorrect. TenantId or domain must be provided when using liveID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With