Azure Microsoft Powershell Technology

WARNING: Unable to acquire token for tenant

I was trying to log into my Azure subscription when I encountered the following error. It isn’t the first time but the reason was slightly different from the previous.

This time it was saying WARNING: Unable to acquire token for tenant ‘organizations’ with error ‘InteractiveBrowserCredential authentication failed: The browser based authentication dialog failed to complete. Reason: The server or proxy was not found.’

I tried applying the same step for the previous error and it went through.

You can follow these steps if to get it fixed.

  1. Close all the PowerShell session
  2. Open Windows Explorer and go to the folder under C:\Users\<Your User Name\.Azure
  3. Look for the file “AzureRmContext.json” and delete it. You can create a backup copy first if you need to.
  4. Now try to open PowerShell again and Connect to you Azure account using Login-AzAccount -UseDeviceAuthentication . You will see the URL that says https://microsoft.com/devicelogin with the login code
  5. Fire up a browser with the URL and log in with your credentials that has access to the Azure subscription and then key in the code. That should work!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.