通过事件消息获取特定的事件版本

时间:2019-06-17 11:22:20

标签: microsoft-graph microsoft-graph-mail microsoft-graph-calendar

我们正在尝试显示有关事件消息的所有事件详细信息,我们正在跟踪多条消息,有些是eventMessage。 尝试访问eventMessage上的事件关系时,我们总是会为对话中的所有消息获得相同的事件。

因此,原始事件消息显示了最新的事件属性(开始和结束时间,位置等)

我尝试使用Microsoft Graph Explorer来查看是否可以通过使用项目本身的changeKey来获取特定事件项目。 可悲的是,没有成功。

例如,当尝试通过过滤对话ID并扩展事件关系来访问对话中的所有消息时

GET https://graph.microsoft.com/v1.0/me/messages/?$filter=conversationId eq '<ConversationId>='&$expand=Microsoft.Graph.EventMessage/Event

我们总是收到所有消息相同的事件。

{    
    "value": [
        {
            "@odata.type": "#microsoft.graph.eventMessage",
            "@odata.etag": "W/\"<CHANGEKEY1>\"",
            "id": "<MSGID1>",
            "createdDateTime": "2019-05-26T15:48:46Z",
            "lastModifiedDateTime": "2019-06-09T23:34:48Z",
            "changeKey": "<CHANGEKEY1>",
            "receivedDateTime": "2019-05-26T15:48:46Z",
            "sentDateTime": "2019-05-26T15:48:44Z",            
            "event": {
                "@odata.etag": "W/\"<EVENTCHANGEKEY>\"",
                "id": "<EVENTID>",
                "createdDateTime": "2019-05-26T15:48:46.2276944Z",
                "lastModifiedDateTime": "2019-06-16T11:42:26.1599832Z",
                "changeKey": "<EVENTCHANGEKEY>",
                "categories": [],
                "originalStartTimeZone": "Israel Standard Time",
                "originalEndTimeZone": "Israel Standard Time",
                "iCalUId": "<ICALUID>",
                "reminderMinutesBeforeStart": 15,
                "isReminderOn": false,
                "hasAttachments": false,
                "importance": "normal",
                "sensitivity": "normal",
                "isAllDay": false,
                "isCancelled": false,
                "isOrganizer": false,
                "responseRequested": true,
                "seriesMasterId": null,
                "showAs": "tentative",
                "type": "singleInstance",
                "onlineMeetingUrl": null,
                "recurrence": null,
                "responseStatus": {
                    "response": "notResponded",
                    "time": "0001-01-01T00:00:00Z"
                },
                "start": {
                    "dateTime": "2019-06-11T09:00:00.0000000",
                    "timeZone": "UTC"
                },
                "end": {
                    "dateTime": "2019-06-11T09:30:00.0000000",
                    "timeZone": "UTC"
                },
                "location": {
                    "displayName": "טלפוני / במשרד",
                    "locationType": "default",
                    "uniqueId": "ff8323c6-c525-415a-be80-88de9c1bd53d",
                    "uniqueIdType": "locationStore"
                },
                "locations": [
                    {
                        "displayName": "טלפוני / במשרד",
                        "locationType": "default",
                        "uniqueId": "ff8323c6-c525-415a-be80-88de9c1bd53d",
                        "uniqueIdType": "locationStore"
                    }
                ]
            }
        },
        {
            "@odata.type": "#microsoft.graph.eventMessage",
            "@odata.etag": "W/\"<CHANGEKEY2>\"",            
            "id": "<MSGID2>",
            "createdDateTime": "2019-06-09T23:34:46Z",
            "lastModifiedDateTime": "2019-06-17T10:00:07Z",
            "changeKey": "<CHANGEKEY2>",
            "receivedDateTime": "2019-06-09T23:34:47Z",
            "sentDateTime": "2019-06-09T23:34:45Z",
            "event": {
                "@odata.etag": "W/\"<EVENTCHANGEKEY>\"",
                "id": "<EVENTID>",
                "createdDateTime": "2019-05-26T15:48:46.2276944Z",
                "lastModifiedDateTime": "2019-06-16T11:42:26.1599832Z",
                "changeKey": "<EVENTCHANGEKEY>",
                "categories": [],
                "originalStartTimeZone": "Israel Standard Time",
                "originalEndTimeZone": "Israel Standard Time",
                "iCalUId": "<ICALUID>",
                "reminderMinutesBeforeStart": 15,
                "isReminderOn": false,
                "hasAttachments": false,
                "importance": "normal",
                "sensitivity": "normal",
                "isAllDay": false,
                "isCancelled": false,
                "isOrganizer": false,
                "responseRequested": true,
                "seriesMasterId": null,
                "showAs": "tentative",
                "type": "singleInstance",
                "onlineMeetingUrl": null,
                "recurrence": null,
                "responseStatus": {
                    "response": "notResponded",
                    "time": "0001-01-01T00:00:00Z"
                },                
                "start": {
                    "dateTime": "2019-06-11T09:00:00.0000000",
                    "timeZone": "UTC"
                },
                "end": {
                    "dateTime": "2019-06-11T09:30:00.0000000",
                    "timeZone": "UTC"
                },
                "location": {
                    "displayName": "טלפוני / במשרד",
                    "locationType": "default",
                    "uniqueId": "ff8323c6-c525-415a-be80-88de9c1bd53d",
                    "uniqueIdType": "locationStore"
                },
                "locations": [
                    {
                        "displayName": "טלפוני / במשרד",
                        "locationType": "default",
                        "uniqueId": "ff8323c6-c525-415a-be80-88de9c1bd53d",
                        "uniqueIdType": "locationStore"
                    }
                ]
                }
            }           
            "@odata.etag": "W/\"CQAAABQAAAC5VJWM6fuTTIIUqGiAHWMQAAEwug==\"",
            "id": "AAMkADliYjE5MWViLWNlMGQtNDliYy05YThkLWM4YWZiNzY2ODdlNwBGAAAAAAA5_Z03NIx3SqoeFwQnhSEiBwDt8lpmQG0nRYbMU6WI2FVeAAAAAAEPAADt8lpmQG0nRYbMU6WI2FVeAAFkUv4FAAA=",
            "createdDateTime": "2019-06-17T10:31:28Z",
            "lastModifiedDateTime": "2019-06-17T10:28:24Z",
            "changeKey": "CQAAABQAAAC5VJWM6fuTTIIUqGiAHWMQAAEwug==",
            "categories": [],
            "receivedDateTime": "2019-06-17T10:31:26Z",
            "sentDateTime": "2019-06-17T10:31:30Z",
            "hasAttachments": true,
            "internetMessageId": "<DB7PR03MB39784FB9DE2927C185428518CFEB0@DB7PR03MB3978.eurprd03.prod.outlook.com>",
            "subject": "FW: Recruitment briefing before 8200 conference  ",
            "bodyPreview": "",
            "importance": "normal",
            "parentFolderId": "AAMkADliYjE5MWViLWNlMGQtNDliYy05YThkLWM4YWZiNzY2ODdlNwAuAAAAAAA5_Z03NIx3SqoeFwQnhSEiAQDt8lpmQG0nRYbMU6WI2FVeAAAAAAEPAAA=",
            "conversationId": "<ConversationId>=",
            "isDeliveryReceiptRequested": false,
            "isReadReceiptRequested": false,
            "isRead": false,
            "isDraft": true,
            "webLink": "https://outlook.office365.com/owa/?ItemID=AAMkADliYjE5MWViLWNlMGQtNDliYy05YThkLWM4YWZiNzY2ODdlNwBGAAAAAAA5%2BZ03NIx3SqoeFwQnhSEiBwDt8lpmQG0nRYbMU6WI2FVeAAAAAAEPAADt8lpmQG0nRYbMU6WI2FVeAAFkUv4FAAA%3D&exvsurl=1&viewmodel=ReadMessageItem",
            "inferenceClassification": "focused",            
            "toRecipients": [],
            "ccRecipients": [],
            "bccRecipients": [],
            "replyTo": [],
            "flag": {
                "flagStatus": "notFlagged"
            }
        }
    ]
}

我们希望获得每个eventMessage及其事件本身的“版本”。 在提供的情况下,开始时间和结束时间应该已更改。 访问webUrl属性时,我们会得到预期的结果。

如网址所示:

原始消息

Image from Gyazo

更新后的消息

Image from Gyazo

0 个答案:

没有答案