Azure – Unable to acquire token for tenant


In today’s post I will show a recurring problem that can happen when connecting to Azure through PowerShell when we already have a login history from other Azure’s tenants.

As soon as we try to log into Azure via PowerShell, we will get this error stating that an existing token from another subscription could not be acquired (Your access to that subscription may have been removed and the context is still present in the local files).


To clear the historic sessions context in PowerShell we have to execute the command “Clear-AzContext”


After running this command above, you can log in again and check that the error has been fixed and the history has been removed.


And that’s it folks, quick and practical post.
See you soon!

Joao Costa