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

Naveen Kumar Reddy Ponnathota 26 Reputation points
2020-11-14T08:12:19.943+00:00

WARNING: Unable to acquire token for tenant

I have tried all possible ways it does not worked can anyone help on this

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

18 answers

Sort by: Most helpful
  1. Anonymous
    2021-02-17T10:20:17.56+00:00

    @Naveen KB Nagaraju ,

    I struggled with the same issue for a couple of days and here is what I did to fix the issue;

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

    The above steps fixed my issue, hope that works for you too.

    Regards
    Hari

    Please don’t forget to "Accept the answer" andup-vote wherever the information provided helps you, this can be beneficial to other community members.

    2 people found this answer helpful.

  2. Anonymous
    2022-08-09T00:57:50.643+00:00

    None of the recommendations fixed our issue but we were able to resolve it ourselves. We ran the debug and found it was due to TLS issue. Azure AD is no longer supporting TLS1.0 on clients, issue was resolved after we enabled TLS 1.2 for webhttp.

    The fix is here (at least for us).
    https://learn.microsoft.com/en-us/troubleshoot/azure/active-directory/enable-support-tls-environment?tabs=azure-monitor

    2 people found this answer helpful.

  3. Naveen Kumar Reddy Ponnathota 26 Reputation points
    2020-11-18T08:38:46.5+00:00

    i have tried all possibilities but no use could you please help on this

    1 person found this answer helpful.

  4. Faraz Siddiqui 6 Reputation points
    2021-02-03T17:57:11.467+00:00

    Hi Team

    I am facing the same issue as well when I am executing the below command

    PS C:\Windows\system32> Connect-AzAccount
    WARNING: Unable to acquire token for tenant '25b95fbb-ccd9-455b-88ea-67f71559b9b2'

    Anybody get the resolution for this issue

    1 person found this answer helpful.

  5. Aldric Codurelli 6 Reputation points
    2021-10-04T08:52:50.897+00:00

    using the option -UseDeviceAuthentication didn't work for me and neither deleting the AzureRmContext.json

    The only way to login again, was running Clear-AzContext (which I guess cleared completely the cache from previous tokens) and then again Connect-AzAccount

    credits to this article: https://argonsys.com/microsoft-cloud/library/powershell-error-failed-to-acquire-token-silently/

    1 person found this answer helpful.
    0 comments No comments