Skip to content

Authentication issues. #30883

@Obiku

Description

@Obiku

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 [email protected].
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

Metadata

Metadata

Assignees

Labels

Accountaz login/accountAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions