An API that connects multiple Microsoft services, enabling data access and automation across platforms
Hi Akilesh,
Not directly. Graph delivers change notifications to Event Hubs over the public endpoint, not over a private link, so with public network access Disabled the delivery fails. There are two ways to stay within a "no public access" policy:
1. Route through Event Grid (recommended)
Point the Graph subscription at an Event Grid partner topic instead of the Event Hub: notificationUrl = EventGrid:?azuresubscriptionid=…&resourcegroup=…&partnertopic=…&location=…. Graph creates the partner topic. Then add an event subscription on that topic with your Event Hub as the handler, delivered with a managed identity. Event Grid is on the Event Hubs trusted-services list, so on the Event Hubs namespace you set:
- Public network access: Selected networks, with no IP rules
- Allow trusted Microsoft services to bypass this firewall: Yes
- Grant the Event Grid identity Azure Event Hubs Data Sender on the hub
The hub stays closed to the internet, and nothing outside Microsoft's trusted services can reach it. Check with your security team that "Selected networks + trusted services" is acceptable under your policy, since it isn't the literal "Disabled" setting.
2. IP allowlist on the Event Hub
Set Selected networks and allow only the Microsoft Graph notification IP ranges. It works, but Microsoft states these IPs can change without notice, so you'd have to keep the list up to date.
Option 1 also gives you retries and dead-lettering, which direct Event Hubs delivery doesn't.
References: Receive Graph API events through Event Grid · Graph change notifications through Event Hubs