Is there a way to restore or promote an older version of a secret?

Viewed 4098

I know you can restore deleted secrets, however, I want to delete the current version and restore an older version.

3 Answers

Copy the old secret value then create a new version with it.

I do not think this is possible. However, you can try PowerShell to get the old version of the secret using the cmdlet Get-AzureKeyVaultSecret with -Version parameter, store the returned secret in a variable, say $oldsecret and then use the Set-AzureKeyVaultSecret cmdlet to update the existing secret in Key Vault with the $oldsecret.

there is no way to do this. All I can do is create a new secret, which I don't need. the value didn't change, just the tags. So I had to update our code to use the new version. at least the old version was still enabled so nothing broke during the changes.

Related