Hello @Rajesh Ambakkat
Here is an approach of how to automate the rotation of a secret:
- Thirty days before the expiration date of a secret, Key Vault publishes the near expiry event to Event Grid.
- Event Grid checks the event subscriptions and uses HTTP POST to call the function app endpoint that's subscribed to the event.
- An Azure Function is used with managed identity to rotate service principal keys.
- An Azure Function adds the new regenerated key to Azure Key Vault as the new version of the secret.
https://learn.microsoft.com/en-us/azure/key-vault/secrets/tutorial-rotation-dual?tabs=azure-cli
If you think your question has been answered, click "Mark as Answer" if just helped click "Vote as helpful". This can be beneficial to other community members reading this forum thread.