If a user has the AZD_DEBUG
environment set, the azd auth token
subprocess will hang and eventually timeout because it's waiting for user input:
$ azd auth token --output json --scope https://search.azure.com/.default
? Debugger Ready? (pid: 259503) (Y/n)
To recreate, just set AZD_DEBUG=1
in your environment and get a token using AzureDeveloperCliCredential
.
To avoid this scenario, we should pass in --no-prompt
in our token command when calling azd.