Microsoft Outlook-Ereignisse

Dieser Artikel enthält die Eigenschaften und das Schema für Microsoft Outlook-Ereignisse, die von der Microsoft Graph-API veröffentlicht werden. Eine Einführung in Ereignisschemas finden Sie unter CloudEvents-Schema.

Verfügbare Ereignistypen

Diese Ereignisse werden ausgelöst, wenn ein Outlook-Ereignis oder ein Outlook-Kontakt erstellt, aktualisiert oder gelöscht wird oder wenn mithilfe der Microsoft Graph-API auf diese Ressourcen zugegriffen wird.

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.

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": "2022-05-24T22:24:31.3062901Z",
	"datacontenttype": "application/json",
	"specversion": "1.0",
	"data": {
		"@odata.type": "#Microsoft.OutlookServices.Notification",
		"Id": null,
		"SubscriptionExpirationDateTime": "2019-02-14T23: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": "2022-05-24T22:24:31.3062901Z",
	"datacontenttype": "application/json",
	"specversion": "1.0",
	"data": {
		"@odata.type": "#Microsoft.OutlookServices.Notification",
		"Id": null,
		"SubscriptionExpirationDateTime": "2019-02-14T23: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": "2022-05-24T22:24:31.3062901Z",
	"datacontenttype": "application/json",
	"specversion": "1.0",
	"data": {
		"@odata.type": "#Microsoft.OutlookServices.Notification",
		"Id": null,
		"SubscriptionExpirationDateTime": "2019-02-14T23: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": "2022-05-24T22:24:31.3062901Z",
	"datacontenttype": "application/json",
	"specversion": "1.0",
	"data": {
		"@odata.type": "#Microsoft.OutlookServices.Notification",
		"Id": null,
		"SubscriptionExpirationDateTime": "2019-02-14T23: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": "2022-05-24T22:24:31.3062901Z",
	"datacontenttype": "application/json",
	"specversion": "1.0",
	"data": {
		"@odata.type": "#Microsoft.OutlookServices.Notification",
		"Id": null,
		"SubscriptionExpirationDateTime": "2019-02-14T23: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": "2022-05-24T22:24:31.3062901Z",
	"datacontenttype": "application/json",
	"specversion": "1.0",
	"data": {
		"@odata.type": "#Microsoft.OutlookServices.Notification",
		"Id": null,
		"SubscriptionExpirationDateTime": "2019-02-14T23: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>"
		}
	}
}

Ereigniseigenschaften

Ein Ereignis weist die folgenden Daten auf oberster Ebene aus:

Eigenschaft type 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 type 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 Ressourcenzustand eingetreten ist.
sequenceNumber Zeichenfolge Eine Sequenznummer.
subscriptionExpirationDateTime Zeichenfolge Der Zeitpunkt im RFC 3339-Format, zu dem das Graph-API-Abonnement abläuft.
subscriptionId Zeichenfolge Der Graph-API-Abonnementbezeichner.
tenantId Zeichenfolge Der Outlook-Mandantenbezeichner.
otherResourceData Zeichenfolge Ein Platzhalter, der mindestens eine dynamische Eigenschaft darstellt, die möglicherweise im Ereignis enthalten ist.

Nächste Schritte