Why the event grid is not reacting to Blobdelete event ?

Farid Ullah 0 Reputation points
2024-01-04T14:55:00.3666667+00:00

Hi , EveryOne hope you all doing good.

I have created Event grid Topic and create one subscription which will react to BlobDelete and BlobCreate and connected to Azure function.

but the problem is I only receive Microsoft.Storage.BlobCreated event type but not receiving Microsoft.Storage.BlobDeleted event type.
Azure function Json has the following configuration:

"config": {
            "name": "eventGridTrigger",
            "entryPoint": "eventGridTrigger",
            "scriptFile": "function_app.py",
            "language": "python",
            "functionDirectory": "/home/site/wwwroot",
            "bindings": [
                {
                    "direction": "IN",
                    "type": "eventGridTrigger",
                    "name": "event"
                }
            ]
        }
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,694 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
354 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,276 Reputation points
    2024-01-04T16:07:00.4933333+00:00

    Farid Ullah Thanks for posting your question in Microsoft Q&A. I assume you have already validated that topic has subscribed to Microsoft.Storage.BlobDeleted event.

    To troubleshoot this issue, I suggest you follow the below steps:

    1. Enable diagnostic logs for Event Grid (refer Enable diagnostic logs for Event Grid) and validate Microsoft.Storage.BlobDeleted has occurred for the specific blob deletion operation.
    2. If not, then you would have to validate operation such as DeleteBlob for Blob Storage or DeleteFile for ADLS Gen2 account has occurred so that the event is triggered (enabling diagnostic logs for Storage account Monitoring Azure Blob Storage also will help).
    3. If the events are triggered from Event Grid, we can narrow down the issue to Azure Functions and if you can share the code snippet of python function, it will help in understanding more.

    Note: BlobDeleted events are not generated when blob versions or snapshots are deleted. A BlobDeleted event is added only when a base (root) blob is deleted.

    I hope this helps in troubleshooting the issue and let me know if you have any questions.


    If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    0 comments No comments