Aracılığıyla paylaş


Microsoft Outlook olayları

Bu makalede, Microsoft Graph API'sinin yayımladığını Microsoft Outlook olaylarının özellikleri ve şeması sağlanır. Olay şemalarına giriş için bkz . CloudEvents şeması.

Kullanılabilir olay türleri

Olay adı Açıklama
Microsoft.Graph.EventCreated Outlook'ta bir olay oluşturulduğunda tetikleniyor.
Microsoft.Graph.EventUpdated Outlook'taki bir olay güncelleştirildiğinde tetiklendi.
Microsoft.Graph.EventDeleted Outlook'taki bir olay silindiğinde tetikleniyor.
Microsoft.Graph.ContactCreated Outlook'ta bir kişi oluşturulduğunda tetikleniyor.
Microsoft.Graph.ContactUpdated Outlook'taki bir kişi güncelleştirildiğinde tetiklendi.
Microsoft.Graph.ContactDeleted Outlook'taki bir kişi silindiğinde tetikleniyor.
Microsoft.Graph.MessageCreated Outlook'ta bir ileti oluşturulduğunda tetikleniyor.
Microsoft.Graph.MessageUpdated Outlook'ta bir ileti güncelleştirildiğinde tetiklendi.
Microsoft.Graph.MessageDeleted Outlook'ta bir ileti silindiğinde tetikleniyor.

Örnek olay

Bir olay tetiklendiğinde, Event Grid hizmeti bu olayla ilgili verileri abone olan hedeflere gönderir. Bu bölüm, bu verilerin her Outlook olayı için nasıl görüneceğine ilişkin bir örnek içerir.

Microsoft.Graph.EventCreated olayı

{
	"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 olayı

{
	"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 olayı

{
	"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 olayı

{
	"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 olayı

{
	"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 olayı

{
	"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 olayı

{
	"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 olayı

{
	"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 olayı

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

Olay özellikleri

Bir olay aşağıdaki üst düzey verilere sahiptir:

Özellik Türü Veri Akışı Açıklaması
source Dize Kiracı olay kaynağı. Bu alan yazılabilir değil. Microsoft Graph API'sinde bu değer sağlanır.
subject Dize Olay konusunun yayımcı tarafından tanımlanan yolu.
type Dize Bu olay kaynağı için olay türlerinden biri.
time Dize Sağlayıcının UTC saati temelinde olayın oluşturulduğu saat
id Dize Olayın benzersiz tanımlayıcısı.
data nesne Kaynak durumu değişikliği hakkındaki verileri sağlayan olay yükü.
specversion Dize CloudEvents şema belirtimi sürümü.

Veri nesnesi aşağıdaki özelliklere sahiptir:

Özellik Türü Veri Akışı Açıklaması
changeType Dize Kaynak durumu değişikliğinin türü.
resource Dize Olayın oluşturulduğu kaynak tanımlayıcısı.
tenantId Dize Kullanıcının veya kişinin tutulduğu kuruluş kimliği.
clientState Dize Graph API aboneliği oluşturulurken kullanıcı tarafından sağlanan gizli dizi.
@odata.type Dize Graph API'sinin değişiklik türü.
@odata.id Dize Olayın oluşturulduğu Graph API kaynak tanımlayıcısı.
id Dize Olayın oluşturulduğu kaynak tanımlayıcısı.
organizationId Dize Outlook kiracı tanımlayıcısı.
eventTime Dize Kaynak durumunun oluştuğu zaman.
sequenceNumber Dize Bir sıra numarası.
subscriptionExpirationDateTime Dize Değişiklik İsteği (RFC) 3339 biçimindeki Graph API aboneliğinin süresinin dolma zamanı.
subscriptionId Dize Graph API abonelik tanımlayıcısı.
tenantId Dize Outlook kiracı tanımlayıcısı.
otherResourceData Dize Olaya dahil edilebilecek bir veya daha fazla dinamik özelliği temsil eden yer tutucu.

Sonraki adımlar