Azure / Azure/azure-cli

Authentication issues.

Open
#30,883 4 comments 1 reaction 1 assignee Claimed by @jiasli View on GitHub
Account act-identity-squad Auto-Assign bug customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 10h
Merged PRs (30d)
64

Description

### Describe the bug

I am difficulty creating terraform plan from visual studio code. I was able to login with az login command. whenever I tried to create plan this error comes up. " az login --scope https://graph.microsoft.com/.default" which I did. see errors below

### Related command

terraform plan

### Errors

Error: building account: could not acquire access token to parse claims: running Azure CLI: exit status 1: ERROR: Account has previously been signed out of this application.. Status: Response_Status.Status_AccountUnusable, Error code: 0, Tag: 540940121
│ Please explicitly log in with:
│ az login --scope https://graph.microsoft.com/.default

│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on Provider.tf line 1, in provider "azurerm":
│ 1: provider "azurerm"

### Issue script & Debug output

Authentication failed against tenant 9f518ccb-c8c3-47a4-b678-811ccc7f6014 'Default Directory': Account has previously been signed out of this application.. Status: Response_Status.Status_AccountUnusable, Error code: 0, Tag: 540940121
If you need to access subscriptions in the following tenants, please use `az login --tenant TENANT_ID`.
9f518ccb-c8c3-47a4-b678-811ccc7f6014 'Default Directory'
No subscriptions found for kingsley.onyee@yahoo.com.
PS C:\Demo-terraform> az login --tenant 9f518ccb-c8c3-47a4-b678-811ccc7f6014
Select the account you want to log in with. For more information on login with Azure CLI, see https://go.microsoft.com/fwlink/?linkid=2271136

### Expected behavior

I want to be able to create a terraform plan

### Environment Summary

azure-cli 2.69.0

core 2.69.0
telemetry 1.1.0

Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\Heavenly\.azure'
Extensions directory 'C:\Users\Heavenly\.azure\cliextensions'

Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.