Skip to content

Login with WAM + no more silent authentication failures cause Terraform errors #29396

@SvenAelterman

Description

@SvenAelterman

Describe the bug

The new WAM-based login (possibly combined with the now no longer silent authentication failures) seems to cause issues with Terraform.

When running a Terraform plan, the output is like the error below (just a snip of much more of this).

When reverting back to the non-WAM login broker, as documented at https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively#sign-in-with-web-account-manager-wam-on-windows, everything works as before.

Also, when using az login --use-device-code, everything works like before.

Related command

terraform plan

Errors

│ Error: building account: could not acquire access token to parse claims: running Azure CLI: exit status 1: ERROR: (pii). Status: Response_Status.Status_InteractionRequired, Error code: 3399548929, Tag: 558133255
│ Please explicitly log in with:
│ az login --scope https://graph.microsoft.com/.default

│ with provider["registry.terraform.io/hashicorp/azurerm"].management,
│ on terraform.tf line 27, in provider "azurerm":
│ 27: provider "azurerm" {

Issue script & Debug output

N/A

Expected behavior

Previous behavior

Environment Summary

azure-cli 2.62.0

core 2.62.0
telemetry 1.1.0

Extensions:
azure-firewall 1.0.1

Dependencies:
msal 1.28.1
azure-mgmt-resource 23.1.1

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

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]

Additional context

No response

Metadata

Metadata

Assignees

Labels

Accountaz login/accountAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.needs-author-feedbackMore information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions