@Antonio Elias Soares Ferreira da Silva
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to accept the answer.
Issue:
After an older version of a Key Vault Secret is disabled - you were having issues with retrieving the value of that disabled version, along with not being able to activate it from the Azure Portal to see the value.
Solution:
To resolve your issue, you were able to activate the older Secret version from Azure Cloud Shell, using the Set-AzKeyVaultSecretAttribute PowerShell command.
For example:
Set-AzKeyVaultSecretAttribute -VaultName 'MyKeyVault' -Name 'MySecretName' -Enable $True -Version 'NumberOfVersion'
- After activating the older Secret version, you were able to see the value stored within the Azure Portal.
Findings:
Adding onto your solution, I was able to re-enable a disabled Secret version within the Azure Portal following the below steps.
- Navigate to your Key Vault
- Select the appropriate Secret
- Right-click the disabled version you're trying to view the value of.
- Enable the older version and select it.
- Show the Secret value.
If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.
I hope this helps!
If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.