Forum Discussion
How to get rid of warning 'Unable to acquire token for tenant 76a47f06...' with Connect-AzAccount?
- Jul 06, 2022
Hi, Robert.
All I can offer is some guesswork here since I can't reproduce this issue.
With respect to the Clear-AzContext commandlet, make sure you set -Scope to CurrentUser. For example:
Clear-AzContext -Scope CurrentUser -Force; Disconnect-AzAccount;Be sure to close the PowerShell session and open a new one after doing this. The following are also useful commandlets for checking current settings:
- Get-AzContext -ListAvailable
- Get-AzContextAutosaveSetting -Scope CurrentUser
Also ensure you're on the latest version. You can read more about some of the version-specific issues below (somewhat dated now but possibly still relevant) - this warning being one of them - that manifested when Microsoft cut over from using the ADAL endpoint to the newer MSAL endpoint.
Cheers,
Lain
- arnaudhelinDec 07, 2023Copper Contributor
Hi everyone,
I know its an old thread but for user who experienced the same issue, the action i described just after was the only solution which works for me.
Step 1 : Clear all the browser cache you have : Edge, Chrome, etc.
Step 2 : Go to C:\Users\<user>\AppData\Local
Step 3 : Remove the ".IdentityService" folder (Remark : could be hidden)
Reboot and enjoy
Edit 19/09/2024:
Now, i have to change the Az config doing Update-AzConfig -LoginExperienceV2 Off -EnableLoginByWam $false