Event Subsciption Not Working for KeyVault

82 Views Asked by At

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:

  1. I am following this tutorial.
  2. I do have the Event Grid registered as a Resource Provider.
  3. 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.

1

There are 1 best solutions below

0
Ikhtesam Afrin On

I have created a Key Vault instance by selecting below option.

enter image description here

Then I granted below permission to my account.

enter image description here

I created an event in key vault for logic app which subscribes to Microsoft.KeyVault.SecretNearExpiry,Microsoft.KeyVault.SecretExpired event types.

enter image description here

My workflow looks like below-

enter image description here

When the secrets are near expiry or expired, workflow is getting triggered and I am getting successful result.

enter image description here

Slack

enter image description here