I am using az keyvault secret list
to get secrets from my Azure key vault. Its help says:
Arguments
--maxresults : Maximum number of results to return in a page. If not
specified, the service will return up to 25 results.
It is not possible to set --maxresults
any higher than 25. The help says "in a page", but I can find no explanation of how to get the next page.
Is it possible to list more than the top 25 secrets using this tool?
We cannot get more than 25 Secret lists by using the --maxresults
in the CLI command.
If we specify the --maxresults
more than 25 the cli returns the below result.
Az keyvault secret list --vault-name <your keyvault name> --maxresults 30
If you want to get all the Secrets in a specific key vault you have to use the below command without using --maxresults
.
Az keyvault secret list --vault-name <your keyvault name>
Or If you want it to achieve programmatically need to write a script with the REST API or some language library directly. Refer here