-
Notifications
You must be signed in to change notification settings - Fork 21.8k
Update subscribe-to-graph-api-events.md #128386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -57,7 +57,7 @@ Besides subscribing to Microsoft Graph API events via Event Grid, you have [othe | |||||
|
|
||||||
| - You're developing an event-driven solution that uses events from Microsoft Entra ID, Outlook, or Teams to react to resource changes. You need the robust event-driven model and publish-subscribe capabilities that Event Grid provides. For an overview of Event Grid, see [Event Grid concepts](concepts.md). | ||||||
| - You want to use Event Grid to route events to multiple destinations using a single Graph API subscription and you want to avoid managing multiple Graph API subscriptions. | ||||||
| - You need to route events to different downstream applications, webhooks, or Azure services based on some properties in the event. For example, you might want to route event types such as `Microsoft.Graph.UserCreated` and `Microsoft.Graph.UserDeleted` to a specialized application that processes users' onboarding and off-boarding. You might also want to send `Microsoft.Graph.UserUpdated` events to another application that syncs contacts information, for example. You can achieve that using a single Graph API subscription when using Event Grid as a notification destination. For more information, see [event filtering](event-filtering.md) and [event handlers](event-handlers.md). | ||||||
| - You need to route events to different downstream applications, webhooks, or Azure services based on some properties in the event. For example, you might want to route event types such as `Microsoft.Graph.UserUpdated` and `Microsoft.Graph.UserDeleted` to a specialized application that processes users' onboarding and off-boarding. You might also want to send `Microsoft.Graph.UserUpdated` events to another application that syncs contacts information, for example. You can achieve that using a single Graph API subscription when using Event Grid as a notification destination. For more information, see [event filtering](event-filtering.md) and [event handlers](event-handlers.md). | ||||||
| - Interoperability is important to you. You want to forward and handle events in a standard way using Cloud Native Computing Foundation (CNCF) [CloudEvents](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md) specification standard. | ||||||
| - You value the extensibility support that CloudEvents provides. For example, to trace events across compliant systems, use the CloudEvents extension [Distributed Tracing](https://github.com/cloudevents/spec/blob/v1.0.1/extensions/distributed-tracing.md). Learn more about [CloudEvents extensions](https://github.com/cloudevents/spec/blob/v1.0.1/documented-extensions.md). | ||||||
| - You use proven event-driven approaches adopted by the industry. | ||||||
|
|
@@ -108,7 +108,7 @@ POST https://graph.microsoft.com/v1.0/subscriptions | |||||
| Content-type: application/json | ||||||
|
|
||||||
| { | ||||||
| "changeType": "Updated,Deleted,Created", | ||||||
| "changeType": "Updated,Deleted", | ||||||
|
||||||
| "changeType": "Updated,Deleted", | |
| "changeType": "updated,deleted", |
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The valid-values sentence is a bit awkward/grammatically inconsistent (extra comma after Updated, and a parenthetical that reads like an aside). Consider tightening this to “Valid values: updated and deleted.” and linking directly to the Microsoft Graph subscription documentation section for changeType, instead of “check Graph documentation for more details.”
| - `changeType`: the kind of resource changes for which you want to receive events. Valid values: `Updated`, and `Deleted` (`Created` is not supported by Graph, check Graph documentation for more details). You can specify one or more of these values separated by commas. | |
| - `changeType`: the kind of resource changes for which you want to receive events. Valid values: `updated` and `deleted`. `created` isn't supported by Microsoft Graph. For more information, see [Microsoft Graph subscription properties](/graph/api/resources/subscription#properties). You can specify one or more of these values separated by commas. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example now mentions
Microsoft.Graph.UserUpdatedtwice (routing to both a specialized app and another app), which makes the scenario ambiguous. Consider adjusting the example so each destination gets a distinct event type (e.g.,UserDeletedto off-boarding,UserUpdatedto contact sync), and rewording “onboarding” since that typically maps to a create lifecycle that’s no longer applicable here.