Luke Schoen
Luke Schoen

Reputation: 763

How to clear expiration date from Azure Key Vault secret?

I was testing expiration dates on a secret in Azure Key Vault, and I'd like to remove the expiration date, but the box is grayed out. Is it possible to remove the expiration?

I set the expiry time using this:

Update-AzureKeyVaultSecret -VaultName "Keys" -Name "ConnectionStringPPE" -Expires "1/1/2099 12:00:00 AM"

I wanted to unset it using this line but this no-ops:

Update-AzureKeyVaultSecret -VaultName "Keys" -Name "ConnectionStringPPE" -Expires $null

enter image description here

Upvotes: 1

Views: 2006

Answers (1)

Charles Xu
Charles Xu

Reputation: 31472

Unfortunately, you cannot unset it once you set the expiry date and it becomes inactive. Only when you create the secret without set the expiry date, it's in the unset state.

Upvotes: 1

Related Questions