Hello Deshmukh, Vijit,
Thank you for posting your query in the Microsoft Q&A Community.
If the above cli command works for you, You can modify it to loop through each of the secrets within your tenant. Use the code below as a sample
VAULT_NAME="your-keyvault-name"
EXPIRY_DATE="2024-12-31T23:59:59Z"
secret_names=$(az keyvault secret list --vault-name $VAULT_NAME --query "[].name" -o tsv)
for secret_name in $secret_names; do
az keyvault secret set-attributes --vault-name $VAULT_NAME --name $secret_name --expires $EXPIRY_DATE
done
Let me know if this helps
Babafemi