Do you have AzureRm installed?
You should uninstall it as it is not compatible with Az module.
Hope this helps.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a PS script that runs > 'Connect-AzAccount' in an Azure Cloud VM.... when it gets to that point I get an error of...
'WARNING: unable to acquire token for tenant '.......'
Do you have AzureRm installed?
You should uninstall it as it is not compatible with Az module.
Hope this helps.
Can you run Clear-AzContext and try again?
I might solve your issue.
Maybe this helps:
do{
Disconnect-AzAccount
$azureContext = Get-AzContext
}
until (!$azureContext)
This will disconnect all existing Azure connections.
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten
Hey @Frederick ,
If your still unable to connect to your Az Account after clearing your local PowerShell Context and your using only the Az PowerShell module, (see earlier answer stating that the older AzureRM PowerShell modules are outdated) you should try to remove the module and re-add it. It appears to be an issue with the module. Can you also provide more information about the underlying machine, what version of PowerShell your using, and the version of the module? Thanks!
Do you have AzureRm installed?
You should uninstall it as it is not compatible with Az module.
Hope this helps.