Skip to content

Commit 74028a7

Browse files
author
Jill Grant
authored
Merge pull request #276128 from spelluru/graphevents0522
Available event types for Outlook Message resource
2 parents 7a330c1 + f0a5029 commit 74028a7

File tree

3 files changed

+131
-36
lines changed

3 files changed

+131
-36
lines changed

articles/event-grid/outlook-events.md

Lines changed: 111 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
title: Outlook events in Azure Event Grid
33
description: This article describes Microsoft Outlook events in Azure Event Grid.
44
ms.topic: conceptual
5-
ms.date: 06/09/2022
5+
ms.date: 05/22/2024
66
---
77

88
# Microsoft Outlook events
99

10-
This article provides the properties and schema for Microsoft Outlook events, which are published by Microsoft Graph API. For an introduction to event schemas, see [CloudEvents schema](cloud-event-schema.md).
10+
This article provides the properties and schema for Microsoft Outlook events that the Microsoft Graph API publishes. For an introduction to event schemas, see [CloudEvents schema](cloud-event-schema.md).
1111

1212
## Available event types
13-
These events are triggered when an Outlook event or an Outlook contact is created, updated or deleted or by operating over those resources using Microsoft Graph API.
1413

1514
| Event name | Description |
1615
| ---------- | ----------- |
@@ -20,6 +19,10 @@ These events are triggered when an Outlook event or an Outlook contact is create
2019
| **Microsoft.Graph.ContactCreated** | Triggered when a contact in Outlook is created. |
2120
| **Microsoft.Graph.ContactUpdated** | Triggered when a contact in Outlook is updated. |
2221
| **Microsoft.Graph.ContactDeleted** | Triggered when a contact in Outlook is deleted. |
22+
| **Microsoft.Graph.MessageCreated** | Triggered when a message in Outlook is created. |
23+
| **Microsoft.Graph.MessageUpdated** | Triggered when a message in Outlook is updated. |
24+
| **Microsoft.Graph.MessageDeleted** | Triggered when a message in Outlook is deleted. |
25+
2326

2427
## Example event
2528
When an event is triggered, the Event Grid service sends data about that event to subscribing destinations. This section contains an example of what that data would look like for each Outlook event.
@@ -32,13 +35,13 @@ When an event is triggered, the Event Grid service sends data about that event t
3235
"type": "Microsoft.Graph.EventCreated",
3336
"source": "/tenants/<tenant-id>/applications/<application-id>",
3437
"subject": "Events/<event-id>",
35-
"time": "2022-05-24T22:24:31.3062901Z",
38+
"time": "2024-05-22T22:24:31.3062901Z",
3639
"datacontenttype": "application/json",
3740
"specversion": "1.0",
3841
"data": {
3942
"@odata.type": "#Microsoft.OutlookServices.Notification",
4043
"Id": null,
41-
"SubscriptionExpirationDateTime": "2019-02-14T23:56:30.1307708Z",
44+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
4245
"ChangeType": "created",
4346
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
4447
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
@@ -62,13 +65,13 @@ When an event is triggered, the Event Grid service sends data about that event t
6265
"type": "Microsoft.Graph.EventUpdated",
6366
"source": "/tenants/<tenant-id>/applications/<application-id>",
6467
"subject": "Events/<event-id>",
65-
"time": "2022-05-24T22:24:31.3062901Z",
68+
"time": "2024-05-22T22:24:31.3062901Z",
6669
"datacontenttype": "application/json",
6770
"specversion": "1.0",
6871
"data": {
6972
"@odata.type": "#Microsoft.OutlookServices.Notification",
7073
"Id": null,
71-
"SubscriptionExpirationDateTime": "2019-02-14T23:56:30.1307708Z",
74+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
7275
"ChangeType": "updated",
7376
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
7477
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
@@ -91,13 +94,13 @@ When an event is triggered, the Event Grid service sends data about that event t
9194
"type": "Microsoft.Graph.EventDeleted",
9295
"source": "/tenants/<tenant-id>/applications/<application-id>",
9396
"subject": "Events/<event-id>",
94-
"time": "2022-05-24T22:24:31.3062901Z",
97+
"time": "2024-05-22T22:24:31.3062901Z",
9598
"datacontenttype": "application/json",
9699
"specversion": "1.0",
97100
"data": {
98101
"@odata.type": "#Microsoft.OutlookServices.Notification",
99102
"Id": null,
100-
"SubscriptionExpirationDateTime": "2019-02-14T23:56:30.1307708Z",
103+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
101104
"ChangeType": "deleted",
102105
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
103106
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
@@ -121,13 +124,13 @@ When an event is triggered, the Event Grid service sends data about that event t
121124
"type": "Microsoft.Graph.ContactCreated",
122125
"source": "/tenants/<tenant-id>/applications/<application-id>",
123126
"subject": "Contacts/<contact-id>",
124-
"time": "2022-05-24T22:24:31.3062901Z",
127+
"time": "2024-05-22T22:24:31.3062901Z",
125128
"datacontenttype": "application/json",
126129
"specversion": "1.0",
127130
"data": {
128131
"@odata.type": "#Microsoft.OutlookServices.Notification",
129132
"Id": null,
130-
"SubscriptionExpirationDateTime": "2019-02-14T23:56:30.1307708Z",
133+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
131134
"ChangeType": "created",
132135
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
133136
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
@@ -151,13 +154,13 @@ When an event is triggered, the Event Grid service sends data about that event t
151154
"type": "Microsoft.Graph.ContactUpdated",
152155
"source": "/tenants/<tenant-id>/applications/<application-id>",
153156
"subject": "Contacts/<contact-id>",
154-
"time": "2022-05-24T22:24:31.3062901Z",
157+
"time": "2024-05-22T22:24:31.3062901Z",
155158
"datacontenttype": "application/json",
156159
"specversion": "1.0",
157160
"data": {
158161
"@odata.type": "#Microsoft.OutlookServices.Notification",
159162
"Id": null,
160-
"SubscriptionExpirationDateTime": "2019-02-14T23:56:30.1307708Z",
163+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
161164
"ChangeType": "updated",
162165
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
163166
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
@@ -180,13 +183,13 @@ When an event is triggered, the Event Grid service sends data about that event t
180183
"type": "Microsoft.Graph.ContactDeleted",
181184
"source": "/tenants/<tenant-id>/applications/<application-id>",
182185
"subject": "Contacts/<contact-id>",
183-
"time": "2022-05-24T22:24:31.3062901Z",
186+
"time": "2024-05-22T22:24:31.3062901Z",
184187
"datacontenttype": "application/json",
185188
"specversion": "1.0",
186189
"data": {
187190
"@odata.type": "#Microsoft.OutlookServices.Notification",
188191
"Id": null,
189-
"SubscriptionExpirationDateTime": "2019-02-14T23:56:30.1307708Z",
192+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
190193
"ChangeType": "deleted",
191194
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
192195
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
@@ -202,6 +205,95 @@ When an event is triggered, the Event Grid service sends data about that event t
202205
}
203206
```
204207

208+
### Microsoft.Graph.MessageCreated event
209+
210+
```json
211+
{
212+
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
213+
"type": "Microsoft.Graph.MessageCreated",
214+
"source": "/tenants/<tenant-id>/applications/<application-id>",
215+
"subject": "Messages/<messaeg-id>",
216+
"time": "2024-05-22T22:24:31.3062901Z",
217+
"datacontenttype": "application/json",
218+
"specversion": "1.0",
219+
"data": {
220+
"@odata.type": "#Microsoft.OutlookServices.Notification",
221+
"Id": null,
222+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
223+
"ChangeType": "created",
224+
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
225+
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
226+
"clientState": "<client state>",
227+
"resourceData": {
228+
"Id": "<message id>",
229+
"@odata.etag": "<tag id>",
230+
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
231+
"@odata.type": "#Microsoft.OutlookServices.Message",
232+
"OtherResourceData": "<some other resource data>"
233+
}
234+
}
235+
}
236+
```
237+
238+
### Microsoft.Graph.MessageUpdated event
239+
240+
```json
241+
{
242+
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
243+
"type": "Microsoft.Graph.MessageUpdated",
244+
"source": "/tenants/<tenant-id>/applications/<application-id>",
245+
"subject": "Messages/<message-id>",
246+
"time": "2024-05-22T22:24:31.3062901Z",
247+
"datacontenttype": "application/json",
248+
"specversion": "1.0",
249+
"data": {
250+
"@odata.type": "#Microsoft.OutlookServices.Notification",
251+
"Id": null,
252+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
253+
"ChangeType": "updated",
254+
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
255+
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
256+
"clientState": "<client state>",
257+
"resourceData": {
258+
"Id": "<message id>",
259+
"@odata.etag": "<tag id>",
260+
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
261+
"@odata.type": "#Microsoft.OutlookServices.Message",
262+
"OtherResourceData": "<some other resource data>"
263+
}
264+
}
265+
}
266+
```
267+
### Microsoft.Graph.MessageDeleted event
268+
269+
```json
270+
{
271+
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
272+
"type": "Microsoft.Graph.MessageDeleted",
273+
"source": "/tenants/<tenant-id>/applications/<application-id>",
274+
"subject": "Message/<messaeg-id>",
275+
"time": "2024-05-22T22:24:31.3062901Z",
276+
"datacontenttype": "application/json",
277+
"specversion": "1.0",
278+
"data": {
279+
"@odata.type": "#Microsoft.OutlookServices.Notification",
280+
"Id": null,
281+
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
282+
"ChangeType": "deleted",
283+
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
284+
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
285+
"clientState": "<client state>",
286+
"resourceData": {
287+
"Id": "<message id>",
288+
"@odata.etag": "<tag id>",
289+
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
290+
"@odata.type": "#Microsoft.OutlookServices.Message",
291+
"OtherResourceData": "<some other resource data>"
292+
}
293+
}
294+
}
295+
```
296+
205297
## Event properties
206298

207299
An event has the following top-level data:
@@ -230,12 +322,12 @@ The data object has the following properties:
230322
| `@odata.id` | string | The Graph API resource identifier for which the event was raised. |
231323
| `id` | string | The resource identifier for which the event was raised. |
232324
| `organizationId` | string | The Outlook tenant identifier. |
233-
| `eventTime` | string | The time at which the resource state occurred. |
325+
| `eventTime` | string | The time when the resource state occurred. |
234326
| `sequenceNumber` | string | A sequence number. |
235-
| `subscriptionExpirationDateTime` | string | The time in [RFC 3339](https://tools.ietf.org/html/rfc3339) format at which the Graph API subscription expires. |
327+
| `subscriptionExpirationDateTime` | string | The time in [Request for Change (RFC) 3339](https://tools.ietf.org/html/rfc3339) format at which the Graph API subscription expires. |
236328
| `subscriptionId` | string | The Graph API subscription identifier. |
237329
| `tenantId` | string | The Outlook tenant identifier. |
238-
| `otherResourceData` | string | Placeholder that represents one or more dynamic properties that may be included in the event. |
330+
| `otherResourceData` | string | Placeholder that represents one or more dynamic properties that might be included in the event. |
239331

240332

241333
## Next steps
@@ -244,4 +336,4 @@ The data object has the following properties:
244336
* For information on how to subscribe to Microsoft Graph API to receive Outlook events, see [subscribe to Azure Graph API events](subscribe-to-graph-api-events.md).
245337
* For information about Azure Event Grid event handlers, see [event handlers](event-handlers.md).
246338
* For more information about creating an Azure Event Grid subscription, see [create event subscription](subscribe-through-portal.md#create-event-subscriptions) and [Event Grid subscription schema](subscription-creation-schema.md).
247-
* For information about how to configure an event subscription to select specific events to be delivered, consult [event filtering](event-filtering.md). You may also want to refer to [filter events](how-to-filter-events.md).
339+
* For information about how to configure an event subscription to select specific events to be delivered, consult [event filtering](event-filtering.md). You might also want to refer to [filter events](how-to-filter-events.md).

articles/event-grid/partner-events-graph-api.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
title: Microsoft Graph API events in Azure Event Grid
33
description: This article describes events published by Microsoft Graph API.
44
ms.topic: conceptual
5-
ms.date: 06/09/2022
5+
ms.date: 05/22/2024
66
---
77

88
# Microsoft Graph API events
99

10-
Microsoft Graph API provides a unified programmable model that you can use to receive events about state changes of resources in Microsoft Outlook, Teams, SharePoint, Microsoft Entra ID, Microsoft Conversations, and security alerts. For every resource in the following table, events for create, update and delete state changes are supported.
10+
Microsoft Graph API provides a unified programmable model that you can use to receive events about state changes of resources in Microsoft Outlook, Teams, SharePoint, Microsoft Entra ID, Microsoft Conversations, and security alerts. For every resource in the following table, events for create, update, and delete state changes are supported.
1111

1212
## Graph API event sources
1313

14-
|Microsoft event source |Resource(s) | Available event types |
14+
15+
|Microsoft event source |Resources | Available event types |
1516
|:--- | :--- | :----|
1617
| Microsoft Entra ID | [User](/graph/api/resources/user), [Group](/graph/api/resources/group) | [Microsoft Entra event types](microsoft-entra-events.md) |
1718
| Microsoft Outlook|[Event](/graph/api/resources/event) (calendar meeting), [Message](/graph/api/resources/message) (email), [Contact](/graph/api/resources/contact) | [Microsoft Outlook event types](outlook-events.md) |

articles/event-grid/subscribe-to-graph-api-events.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,27 @@ author: robece
55
ms.author: robece
66
ms.topic: how-to
77
ms.custom: devx-track-azurecli, devx-track-azurepowershell, devx-track-extended-java, devx-track-go, devx-track-js, devx-track-python, build-2024
8-
ms.date: 12/08/2023
8+
ms.date: 05/22/2024
99
---
1010

1111
# Receive Microsoft Graph API change events through Azure Event Grid
1212

1313
This article describes steps to subscribe to events published by Microsoft Graph API. The following table lists the event sources for which events are available through Graph API. For most resources, events announcing its creation, update, and deletion are supported. For detailed information about the resources for which events are raised for event sources, see [supported resources by Microsoft Graph API change notifications](/graph/webhooks#supported-resources)
1414
.
1515

16-
|Microsoft event source |Available event types |
17-
|:--- | :----|
18-
|Microsoft Entra ID| [Microsoft Entra event types](azure-active-directory-events.md) |
19-
|Microsoft Outlook| [Microsoft Outlook event types](outlook-events.md) |
20-
|Microsoft 365 group conversations ||
21-
|Microsoft Teams| [Microsoft Teams event types](teams-events.md) |
22-
|Microsoft SharePoint and OneDrive| |
23-
|Microsoft SharePoint| |
24-
|Security alerts| |
25-
|Microsoft Conversations| |
26-
|Microsoft Universal Print||
16+
|Microsoft event source |Resources | Available event types |
17+
|:--- | :--- | :----|
18+
| Microsoft Entra ID | [User](/graph/api/resources/user), [Group](/graph/api/resources/group) | [Microsoft Entra event types](microsoft-entra-events.md) |
19+
| Microsoft Outlook|[Event](/graph/api/resources/event) (calendar meeting), [Message](/graph/api/resources/message) (email), [Contact](/graph/api/resources/contact) | [Microsoft Outlook event types](outlook-events.md) |
20+
| Microsoft Teams |[ChatMessage](/graph/api/resources/callrecords-callrecord), [CallRecord](/graph/api/resources/callrecords-callrecord) (meeting) | [Microsoft Teams event types](teams-events.md) |
21+
| OneDrive | [DriveItem](/graph/api/resources/driveitem)| [Microsoft OneDrive events](one-drive-events.md) |
22+
| Microsoft SharePoint | [List](/graph/api/resources/list) | [Microsoft SharePoint events](share-point-events.md) |
23+
| To Do | [To Do Task](/graph/api/resources/todotask) | [Microsoft ToDo events](to-do-events.md) |
24+
| Security alerts | [Alert](/graph/api/resources/alert)| [Microsoft Security Alert events](security-alert-events.md) |
25+
| Cloud printing | [Printer](/graph/api/resources/printer), [Print Task Definition](/graph/api/resources/printtaskdefinition) | [Microsoft Cloud Printing events](cloud-printing-events.md) |
26+
| Microsoft Conversations | [Conversation](/graph/api/resources/conversation) | [Microsoft 365 Group Conversation events](conversation-events.md) |
27+
28+
You create a Microsoft Graph API subscription to enable Graph API events to flow into a partner topic. The partner topic is automatically created for you as part of the Graph API subscription creation. You use that partner topic to [create event subscriptions](event-filtering.md) to send your events to any of the supported [event handlers](event-handlers.md) that best meets your requirements to process the events.
2729

2830
> [!IMPORTANT]
2931
>If you aren't familiar with the **Partner Events** feature, see [Partner Events overview](partner-events-overview.md).
@@ -122,13 +124,13 @@ Content-type: application/json
122124
---
123125

124126
- `changeType`: the kind of resource changes for which you want to receive events. Valid values: `Updated`, `Deleted`, and `Created`. You can specify one or more of these values separated by commas.
125-
- `notificationUrl`: a URI used to define the partner topic to which events are sent. It must conform to the following pattern: `EventGrid:?azuresubscriptionid=<you-azure-subscription-id>&resourcegroup=<your-resource-group-name>&partnertopic=<the-name-for-your-partner-topic>&location=<the-Azure-region-name-where-you-want-the-topic-created>`. The location (also known as Azure region) `name` can be obtained by executing the **az account list-locations** command. Don't use a location display name. For example, don't use "West Central US". Use `westcentralus` instead.
127+
- `notificationUrl`: a URI used to define the partner topic to which events are sent. It must conform to the following pattern: `EventGrid:?azuresubscriptionid=<you-azure-subscription-id>&resourcegroup=<your-resource-group-name>&partnertopic=<the-name-for-your-partner-topic>&location=<the-Azure-region-name-where-you-want-the-topic-created>`. The location (also known as Azure region) `name` can be obtained by executing the **az account list-locations** command. Don't use a location display name. For example, don't use West Central US. Use `westcentralus` instead.
126128
```azurecli-interactive
127129
az account list-locations
128130
```
129131
- `lifecycleNotificationUrl`: a URI used to define the partner topic to which `microsoft.graph.subscriptionReauthorizationRequired`events are sent. This event signals your application that the Graph API subscription is expiring soon. The URI follows the same pattern as *notificationUrl* described earlier if using Event Grid as destination to lifecycle events. In that case, the partner topic should be the same as the one specified in *notificationUrl*.
130132
- resource: the resource that generates events that announce state changes.
131-
- expirationDateTime: the expiration time at which the subscription expires and the flow of events stop. It must conform to the format specified in [RFC 3339](https://tools.ietf.org/html/rfc3339). You must specify an expiration time that is within the [maximum subscription length allowable per resource type](/graph/api/resources/subscription#subscription-lifetime).
133+
- expirationDateTime: the expiration time at which the subscription expires and the flow of events stop. It must conform to the format specified in [Request for Change (RFC) 3339](https://tools.ietf.org/html/rfc3339). You must specify an expiration time that is within the [maximum subscription length allowable per resource type](/graph/api/resources/subscription#subscription-lifetime).
132134
- client state. This property is optional. It's used for verification of calls to your event handler application during event delivery. For more information, see [Graph API subscription properties](/graph/api/resources/subscription#properties).
133135

134136
> [!IMPORTANT]

0 commit comments

Comments
 (0)