I have a KeyVault that I would like to get slack messages for when Secrets are expired or near expiring.
So in my KeyVault I went to the Events menu and created a new Logic App. In the Logic App I set it to listen to the Expired and Near Expiry events and configured the Slack Action then saved the Logic App. I then went into my KeyVault and created a Secret with an expiration a few minutes from now.
When the Secret expires I can see events happening in the Events menu of the KeyVault itself and in the Event Grid System Topic. But if I click on the Event Subscription for it there is nothing there. The Logic App also doesn't see anything.
I am not sure if something is broken in the Subscription or what. I also have no idea where to view any of these events to make sure they're actually happening like I think they are.
A few things to note:
- I am following this tutorial.
- I do have the Event Grid registered as a Resource Provider.
- When I save the Logic App the first time it stays on the designer and I need to leave it, the page doesn't redirect or anything which I thought was kinda odd.
Can anyone think of something I may be missing? The tutorial makes it seem pretty straightforward.
I've tried deleting and re-creating the Logic App/Event Subscriptions. I can't delete the KeyVault as its currently in use.
I have created a Key Vault instance by selecting below option.
Then I granted below permission to my account.
I created an event in key vault for logic app which subscribes to
Microsoft.KeyVault.SecretNearExpiry,Microsoft.KeyVault.SecretExpiredevent types.My workflow looks like below-
When the secrets are near expiry or expired, workflow is getting triggered and I am getting successful result.
Slack