Microsoft Outlook olayları

Bu makalede, Microsoft Graph API tarafından yayımlanan 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

Bu olaylar bir Outlook olayı veya Outlook kişisi oluşturulduğunda, güncelleştirildiğinde veya silindiğinde ya da Microsoft Graph API kullanılarak bu kaynaklar üzerinde çalıştırıldığında tetiklenir.

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.

Ö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": "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 olayı

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

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

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

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

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

Olay özellikleri

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

Özellik Tür Description
source dize Kiracı olay kaynağı. Bu alan yazılamaz. Microsoft Graph API bu değeri sağlar.
subject string Olay konusunun yayımcı tarafından tanımlanan yolu.
type string Bu olay kaynağının olay türlerinden biri.
time string Sağlayıcının UTC saati temelinde olayın oluşturulduğu saat
id string Olayın benzersiz tanımlayıcısı.
data object Kaynak durumu değişikliği hakkındaki verileri sağlayan olay yükü.
specversion string CloudEvents şema belirtimi sürümü.

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

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

Sonraki adımlar