"az keyvault secret list" throws "[Errno 22] Invalid argument" because there exists a bad certificate or secret in the vault
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62
**Describe the bug**
I was using the following command: `az keyvault secret list`
This used to work, but one day the command stopped working and started throwing **[Errno 22] Invalid argument**.
One person suggested that my key vault might contain a bad secret with a bad expiration date. This was not exactly it, but apparently my vault did contain a bad _certificate_. I deleted a certificate, and now I could run `az keyvault secret list` again.
I cannot reproduce the certificate. But apparently certain data in the key vault can cause `az keyvault secret list` to crash.
Described in this Stack Overflow thread: https://stackoverflow.com/questions/69851800/azure-command-az-keyvault-secret-list-throws-errno-22-invalid-argument-h/
**To Reproduce**
I cannot reproduce the certificate that caused the crash.
**Environment summary**
The crash happened with both version 2.27.1 and 2.30.0 of azure-cli, both on Windows.
Contributor guide
Assessment
This issue has not been assessed yet.