Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Dieser Artikel enthält die Eigenschaften und das Schema für Microsoft Outlook-Ereignisse, die die Microsoft Graph-API veröffentlicht. Eine Einführung in Ereignisschemas finden Sie unter CloudEvents-Schema.
Verfügbare Ereignistypen
| Ereignisname | BESCHREIBUNG |
|---|---|
| Microsoft.Graph.EventCreated | Wird ausgelöst, wenn ein Ereignis in Outlook erstellt wird. |
| Microsoft.Graph.EventUpdated | Wird ausgelöst, wenn ein Ereignis in Outlook aktualisiert wird. |
| Microsoft.Graph.EventDeleted | Wird ausgelöst, wenn ein Ereignis in Outlook gelöscht wird. |
| Microsoft.Graph.ContactCreated | Wird ausgelöst, wenn ein Kontakt in Outlook erstellt wird. |
| Microsoft.Graph.ContactUpdated | Wird ausgelöst, wenn ein Kontakt in Outlook aktualisiert wird. |
| Microsoft.Graph.ContactDeleted | Wird ausgelöst, wenn ein Kontakt in Outlook gelöscht wird. |
| Microsoft.Graph.MessageCreated | Wird ausgelöst, wenn eine Nachricht in Outlook erstellt wird. |
| Microsoft.Graph.MessageUpdated | Wird ausgelöst, wenn eine Nachricht in Outlook aktualisiert wird. |
| Microsoft.Graph.MessageDeleted | Wird ausgelöst, wenn eine Nachricht in Outlook gelöscht wird. |
Beispielereignis
Wenn ein Ereignis ausgelöst wird, sendet der Event Grid-Dienst Daten zu diesem Ereignis an Ziele, die es abonniert haben. In diesem Abschnitt wird anhand eines Beispiels gezeigt, wie diese Daten für jedes Outlook-Ereignis aussehen.
Microsoft.Graph.EventCreated-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.EventCreated",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Events/<event-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "created",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
"clientState": "<client state>",
"resourceData": {
"Id": "<event id>",
"@odata.etag": "<tag id>",
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
"@odata.type": "#Microsoft.OutlookServices.Event",
"OtherResourceData": "<some other resource data>"
}
}
}
Microsoft.Graph.EventUpdated-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.EventUpdated",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Events/<event-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "updated",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
"clientState": "<client state>",
"resourceData": {
"Id": "<event id>",
"@odata.etag": "<tag id>",
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
"@odata.type": "#Microsoft.OutlookServices.Event",
"OtherResourceData": "<some other resource data>"
}
}
}
Microsoft.Graph.EventDeleted-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.EventDeleted",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Events/<event-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "deleted",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
"clientState": "<client state>",
"resourceData": {
"Id": "<event id>",
"@odata.etag": "<tag id>",
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Events('<event id>')",
"@odata.type": "#Microsoft.OutlookServices.Event",
"OtherResourceData": "<some other resource data>"
}
}
}
Microsoft.Graph.ContactCreated-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.ContactCreated",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Contacts/<contact-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "created",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
"clientState": "<client state>",
"resourceData": {
"Id": "<contact id>",
"@odata.etag": "<tag id>",
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
"@odata.type": "#Microsoft.OutlookServices.Contact",
"OtherResourceData": "<some other resource data>"
}
}
}
Microsoft.Graph.ContactUpdated-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.ContactUpdated",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Contacts/<contact-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "updated",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
"clientState": "<client state>",
"resourceData": {
"Id": "<contact id>",
"@odata.etag": "<tag id>",
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
"@odata.type": "#Microsoft.OutlookServices.Contact",
"OtherResourceData": "<some other resource data>"
}
}
}
Microsoft.Graph.ContactDeleted-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.ContactDeleted",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Contacts/<contact-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "deleted",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
"clientState": "<client state>",
"resourceData": {
"Id": "<contact id>",
"@odata.etag": "<tag id>",
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Contacts('<contact id>')",
"@odata.type": "#Microsoft.OutlookServices.Contact",
"OtherResourceData": "<some other resource data>"
}
}
}
Microsoft.Graph.MessageCreated-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.MessageCreated",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Users/<user-id>/Messages/<message-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "created",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "Users/<user-id>/Messages/<message-id>",
"clientState": "<client state>",
"tenantId":"<tenant-id>",
"resourceData": {
"Id": "<message id>",
"@odata.etag": "<tag id>",
"@odata.id": "Users/<user-id>/Messages/<message-id>",
"@odata.type": "#Microsoft.OutlookServices.Message",
"OtherResourceData": "<some other resource data>"
}
}
}
Microsoft.Graph.MessageUpdated-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.MessageUpdated",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Messages/<message-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "updated",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
"clientState": "<client state>",
"resourceData": {
"Id": "<message id>",
"@odata.etag": "<tag id>",
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
"@odata.type": "#Microsoft.OutlookServices.Message",
"OtherResourceData": "<some other resource data>"
}
}
}
Microsoft.Graph.MessageDeleted-Ereignis
{
"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
"type": "Microsoft.Graph.MessageDeleted",
"source": "/tenants/<tenant-id>/applications/<application-id>",
"subject": "Message/<message-id>",
"time": "2024-05-22T22:24:31.3062901Z",
"datacontenttype": "application/json",
"specversion": "1.0",
"data": {
"@odata.type": "#Microsoft.OutlookServices.Notification",
"Id": null,
"SubscriptionExpirationDateTime": "2024-06-22T23:56:30.1307708Z",
"ChangeType": "deleted",
"subscriptionId": "MTE1MTVlYTktMjVkZS00MjY3LWI1YzYtMjg0NzliZmRhYWQ2",
"resource": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
"clientState": "<client state>",
"resourceData": {
"Id": "<message id>",
"@odata.etag": "<tag id>",
"@odata.id": "https://outlook.office365.com/api/beta/Users('userId@tenantId')/Messages('<message id>')",
"@odata.type": "#Microsoft.OutlookServices.Message",
"OtherResourceData": "<some other resource data>"
}
}
}
Ereigniseigenschaften
Ein Ereignis weist die folgenden Daten auf oberster Ebene aus:
| Eigenschaft | Typ | Beschreibung |
|---|---|---|
source |
Zeichenfolge | Die Mandantenereignisquelle. Dieses Feld ist nicht beschreibbar. Die Microsoft Graph-API stellt diesen Wert bereit. |
subject |
Zeichenfolge | Vom Herausgeber definierter Pfad zum Ereignisbetreff |
type |
Zeichenfolge | Einer der Ereignistypen für diese Ereignisquelle. |
time |
Zeichenfolge | Die Zeit, in der das Ereignis generiert wird, basierend auf der UTC-Zeitangabe des Anbieters. |
id |
Zeichenfolge | Eindeutiger Bezeichner für das Ereignis. |
data |
Objekt (object) | Ereignisnutzdaten, die die Daten zur Änderung des Ressourcenzustands bereitstellen. |
specversion |
Zeichenfolge | Version der CloudEvents-Schemaspezifikation. |
Das Datenobjekt weist die folgenden Eigenschaften auf:
| Eigenschaft | Typ | Beschreibung |
|---|---|---|
changeType |
Zeichenfolge | Der Typ der Ressourcenstatusänderung. |
resource |
Zeichenfolge | Der Ressourcenbezeichner, für den das Ereignis ausgelöst wurde. |
tenantId |
Zeichenfolge | Die Organisations-ID, in der der Benutzer oder der Kontakt gespeichert ist. |
clientState |
Zeichenfolge | Ein Geheimnis, das vom Benutzer zum Zeitpunkt der Graph-API-Abonnementerstellung bereitgestellt wird. |
@odata.type |
Zeichenfolge | Der Graph-API-Änderungstyp. |
@odata.id |
Zeichenfolge | Der Graph-API-Ressourcenbezeichner, für den das Ereignis ausgelöst wurde. |
id |
Zeichenfolge | Der Ressourcenbezeichner, für den das Ereignis ausgelöst wurde. |
organizationId |
Zeichenfolge | Der Outlook-Mandantenbezeichner. |
eventTime |
Zeichenfolge | Der Zeitpunkt, zu dem der Ressourcenstatus aufgetreten ist. |
sequenceNumber |
Zeichenfolge | Eine Sequenznummer. |
subscriptionExpirationDateTime |
Zeichenfolge | Die Zeit im Format „Request for Change(RFC) 3339“, zu dem das Graph-API-Abonnement abläuft. |
subscriptionId |
Zeichenfolge | Der Graph-API-Abonnementbezeichner. |
tenantId |
Zeichenfolge | Der Outlook-Mandantenbezeichner. |
otherResourceData |
Zeichenfolge | Platzhalter, der eine oder mehrere dynamische Eigenschaften darstellt, die in das Ereignis eingeschlossen werden können. |
Nächste Schritte
- Eine Einführung in die Partnerereignisse von Azure Event Grid finden Sie in der Übersicht über Partnerereignisse.
- Informationen zum Abonnieren der Microsoft Graph-API zum Empfangen von Outlook-Ereignissen finden Sie unter Abonnieren von Azure Graph-API-Ereignissen.
- Informationen zu Azure Event Grid-Ereignishandlern finden Sie unter Ereignishandler.
- Weitere Informationen zum Erstellen eines Azure Event Grid-Abonnements finden Sie unter Erstellen eines Ereignisabonnements und Event Grid-Abonnementschema.
- Informationen zum Konfigurieren eines Ereignisabonnements zum Auswählen bestimmter Ereignisse, die übermittelt werden sollen, finden Sie unter Ereignisfilterung. Möglicherweise möchten Sie auch auf Filterereignisseverweisen.