Hello,
The exact PowerShell commands depend on where the secret is stored. If this is an Azure Key Vault secret, check whether soft delete is enabled and whether the deleted secret is retained.
Use Azure PowerShell to inspect deleted secrets:
Get-AzKeyVaultSecret -VaultName "YourVault" -InRemovedState
If the obsolete secret is confirmed, purge only that specific secret:
Remove-AzKeyVaultSecret `
-VaultName "YourVault" `
-Name "YourSecret" `
-InRemovedState -Force
Warning: Purging is irreversible and may be blocked by purge protection. Confirm the vault and secret name before proceeding; do not purge other credentials.
If this is not Azure Key Vault, please specify where the secret is stored (for example, Windows Credential Manager, Microsoft Entra ID, or another secrets manager) so I can provide the correct commands without risking unrelated credentials.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Domic Vo.