Share via


Microsoft Outlook-gebeurtenissen

Dit artikel bevat de eigenschappen en het schema voor Microsoft Outlook-gebeurtenissen die door de Microsoft Graph API worden gepubliceerd. Zie Het CloudEvents-schema voor een inleiding tot gebeurtenisschema's.

Beschikbare gebeurtenistypen

Gebeurtenisnaam Beschrijving
Microsoft.Graph.EventCreated Geactiveerd wanneer een gebeurtenis in Outlook wordt gemaakt.
Microsoft.Graph.EventUpdated Geactiveerd wanneer een gebeurtenis in Outlook wordt bijgewerkt.
Microsoft.Graph.EventDeleted Geactiveerd wanneer een gebeurtenis in Outlook wordt verwijderd.
Microsoft.Graph.ContactCreated Geactiveerd wanneer een contactpersoon in Outlook wordt gemaakt.
Microsoft.Graph.ContactUpdated Geactiveerd wanneer een contactpersoon in Outlook wordt bijgewerkt.
Microsoft.Graph.ContactDeleted Geactiveerd wanneer een contactpersoon in Outlook wordt verwijderd.
Microsoft.Graph.MessageCreated Geactiveerd wanneer een bericht in Outlook wordt gemaakt.
Microsoft.Graph.MessageUpdated Geactiveerd wanneer een bericht in Outlook wordt bijgewerkt.
Microsoft.Graph.MessageDeleted Geactiveerd wanneer een bericht in Outlook wordt verwijderd.

Voorbeeld van een gebeurtenis

Wanneer een gebeurtenis wordt geactiveerd, verzendt de Event Grid-service gegevens over die gebeurtenis om bestemmingen te abonneren. Deze sectie bevat een voorbeeld van hoe die gegevens eruit zouden zien voor elke Outlook-gebeurtenis.

Microsoft.Graph.EventCreated-gebeurtenis

{
	"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-gebeurtenis

{
	"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-gebeurtenis

{
	"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-gebeurtenis

{
	"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-gebeurtenis

{
	"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-gebeurtenis

{
	"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-gebeurtenis

{
	"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
	"type": "Microsoft.Graph.MessageCreated",
	"source": "/tenants/<tenant-id>/applications/<application-id>",
	"subject": "Messages/<messaeg-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')/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.MessageUpdated-gebeurtenis

{
	"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-gebeurtenis

{
	"id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
	"type": "Microsoft.Graph.MessageDeleted",
	"source": "/tenants/<tenant-id>/applications/<application-id>",
	"subject": "Message/<messaeg-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>"
		}
	}
}

Eigenschappen van gebeurtenis

Een gebeurtenis bevat de volgende gegevens op het hoogste niveau:

Eigenschap Type Omschrijving
source tekenreeks De bron van de tenant-gebeurtenis. Dit veld kan niet worden geschreven. Microsoft Graph API biedt deze waarde.
subject tekenreeks Het door de uitgever gedefinieerde pad naar het gebeurtenisonderwerp.
type tekenreeks Een van de gebeurtenistypen voor deze gebeurtenisbron.
time tekenreeks Het tijdstip waarop de gebeurtenis wordt gegenereerd op basis van de UTC-tijd van de provider
id tekenreeks Unieke id voor de gebeurtenis.
data object Nettolading van gebeurtenissen die de gegevens over de wijziging van de resourcestatus levert.
specversion tekenreeks CloudEvents schemaspecificatieversie.

Het gegevensobject heeft de volgende eigenschappen:

Eigenschap Type Omschrijving
changeType tekenreeks Het type resourcestatuswijziging.
resource tekenreeks De resource-id waarvoor de gebeurtenis is gegenereerd.
tenantId tekenreeks De organisatie-id waar de gebruiker of contactpersoon wordt bewaard.
clientState tekenreeks Een geheim dat door de gebruiker wordt verstrekt op het moment dat het Graph API-abonnement is gemaakt.
@odata.type tekenreeks Het type Graph API-wijziging.
@odata.id tekenreeks De Graph API-resource-id waarvoor de gebeurtenis is gegenereerd.
id tekenreeks De resource-id waarvoor de gebeurtenis is gegenereerd.
organizationId tekenreeks De Outlook-tenant-id.
eventTime tekenreeks Het tijdstip waarop de resourcestatus heeft plaatsgevonden.
sequenceNumber tekenreeks Een volgnummer.
subscriptionExpirationDateTime tekenreeks De tijd in rfc-indeling (Request for Change) 3339 waarop het Graph API-abonnement verloopt.
subscriptionId tekenreeks De Graph API-abonnements-id.
tenantId tekenreeks De Outlook-tenant-id.
otherResourceData tekenreeks Tijdelijke aanduiding die een of meer dynamische eigenschappen vertegenwoordigt die in de gebeurtenis kunnen worden opgenomen.

Volgende stappen