Share via

Old and Current secret conflict

Cheedella, Satyanarayana 0 Reputation points
2025-10-17T14:20:58.6033333+00:00

I have created a new secret in Azure Key Vault, which is used by my application. For certain reasons, I disabled the latest (current) version of the secret. However, there is an older version of the secret that is still enabled.

Generally, the expected behavior is that Azure Key Vault should return the latest enabled version of the secret when the current one is disabled. However, in our case, this doesn't seem to be happening.

Are there any insights or known reasons why the older enabled version is not being picked up automatically?

Azure Key Vault
Azure Key Vault

An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.

{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 27,971 Reputation points Volunteer Moderator
    2026-03-07T15:32:36.0066667+00:00

    Hello Cheedella, Satyanarayana,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your old and current secret conflict.

    The older enabled version picked automatically because GET secret by name always targets the latest version. If that version is disabled/expired, the value cannot be retrieved, and the service does not auto‑fallback to an older enabled version. Fetch a specific version or ensure the latest is enabled. - https://learn.microsoft.com/en-us/azure/key-vault/secrets/javascript-developer-guide-get-secret, and if you use App Service/Functions Key Vault references, remember they’re cached and auto‑refresh within 24 hours unless you pull/refresh explicitly or update configuration.- https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references, and https://stackoverflow.com/questions/77007906/azure-key-vault-lag-on-secret-changes gives more insight.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.