Hi ,
Thanks for reaching out to Microsoft Q&A.
Azure Event Grid is designed for push-based event delivery and does not support pull-based access natively. If you are using Azure Communication Services (ACS) and want to work with SMS events, the events (like delivery reports, incoming messages) are pushed to a configured Event Grid topic or domain. However, since your requirement is to avoid webhooks and pull events when needed, here is the reality and how you can work around it:
The Truth: Event Grid Does Not Support Pulling Events
Event Grid cannot be queried like a queue. Once events are emitted and sent to a destination (webhook, Azure Function, Service Bus, etc.), they are not retained in Event Grid itself. Hence, you cannot "pull" events on demand from Event Grid directly.
Workaround: Use Event Grid -> Queue or Storage, Then Pull
To meet your requirement of "pulling events when needed", you need to route events to a service that supports pull-based access. Here is how to configure it:
Step by step Setup:
- Create an Azure Storage Queue or Event Hub or Service Bus Queue/Topic - all support pull-based consumption.
- Create an Event Subscription on your Azure Communication Services resource (or the Event Grid Topic handling ACS SMS events), with the destination set to one of the pull based services: For Azure Storage Queue: set destination type as
Storage Queue
For Service Bus: chooseService Bus Queue
orTopic
For Event Hubs: configure Event Hub namespace and name Configure the Azure Communication Services SMS Event Grid integration: ACS emits SMS delivery or inbound events to Event Grid automatically You need to ensure the resource is emitting the correct events (like `Microsoft.Communication.SMSDeliveryReportReceived`, etc.) Consume (Pull) Events from: Storage Queue: using Azure Storage SDK or REST API Service Bus Queue: using Service Bus client libraries Event Hub: using EventProcessorClient or Event Hub SDKs
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.