Open zzhxiaofeng opened 1 year ago
I've tried the command, doesn't seem to work.. I hit.. "Failed to find the App Configuration store '\<resource-name>'." error.
@HarshaNalluru I have tried the command with the latest version (2.49.0) of az cli and it runs successfully. Are you currently using the latest version? If not, please update to latest and try again.
Oh, realized the problem, a different subscription was set. Also, upgraded to 2.49.0, though unrelated to the problem.
Both commands are working fine for me.
PS /workspaces/azure-sdk-for-js> az appconfig credential list -g resource-group -n account-name --query "([?name=='Primary'].connectionString)[0]"
"Endpoint=https://account-name.azconfig.io;Id=<redacted>;Secret=<redacted>"
PS /workspaces/azure-sdk-for-js> az appconfig credential list -g resource-group -n account-name --query "[?name=='Primary'].connectionString"
[
"Endpoint=https://account-name.azconfig.io;Id=<redacted>;Secret=<redacted>"
]
The difference being array or not..
@HarshaNalluru Do you run this command in local on windows system? If not, you can try this command in local on windows. We run this command by this way and the error still exists.
My above response is from linux, will check windows...
Okay, tested it on Windows, and it fails.
PS C:\path> az appconfig credential list -g <resource-group> -n <account-name> --query "[?name=='Primary'].connectionString"
[
"Endpoint=https://<account-name>.azconfig.io;Id=Bl85;Secret=<redacted>"
]
PS C:\path> az appconfig credential list -g <resource-group> -n <account-name> --query "([?name=='Primary'].connectionString)[0]"
[0] was unexpected at this time.
C:\path> "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\\..\python.exe" -IBm azure.cli appconfig credential list -g <resource-group> -n <account-name> --query ([?name=='Primary'].connectionString)[0]
PS C:\path>
Sounds like a bug in az cli
it seems.
Logged an issue at https://github.com/Azure/azure-cli/issues/26583
1. Section link Reason:
@joheredi, @jsquire, @dw511214992 for notification.