Azure Remote Rendering : Connect-AzAccount with PowerShell

ruchi 21 Reputation points
2021-04-13T08:43:37.597+00:00

When I try Connect-AzAccount on PowerShell, it shows "Unable to acquire token for tenant 'xxxxxxxxx'"

so I tried "Clear-AzContext", but it shows "Unable to acquire token for tenant 'xxxxxxxxx'" and Unable to set default context 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureContext'.

I can't connect finely...

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,095 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SaBo-MSFT 20,016 Reputation points
    2021-04-14T15:37:17.417+00:00

    Hello @ruchi

    Option 1: ref link

    1. Close all PS sessions.
    2. Navigate to C:\Users\usernameAlias\ .Azure
    3. Rename "AzureRmContext.json" to AzureRmContextOld
    4. Open a new session.

    Option 2
    Connect-AzAccount -UseDeviceAuthentication

    Option 3:
    update of Azure module

    Please refer to this link: When i am trying to connect to my azure portal through powershell iam getting the error: WARNING: Unable to acquire token for tenant

    If the response is helpful, please click "Accept Answer" and upvote it. So that it is helpful to others as well.