-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
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