首页 > 解决方案 > Graph API 不会恢复邮件消息,而是创建一条新消息,其中 CreateDateTime 自动更新为当前日期

问题描述

当我通过带有 Post 请求的图形 API 执行电子邮件消息的恢复时,不是恢复它,而是创建一条具有相同数据的新消息。因为在 JSON 中 createDateTime 正在更新,尽管我传递了以前的 createDataTime。

详细说明:我想恢复以下在 2018 年创建的邮件消息(“createdDateTime”:“2018-12-31T14:49:42Z”)但是当我发布相同的 JSON 进行恢复时,createDateTime 会自动更新为现在的日期。这是问题,因为它不是恢复,它就像创建新消息一样。

{
            "@odata.type": "#microsoft.graph.eventMessageResponse",
            "@odata.etag": "W/\"DAAAABYAAABjFtMyIejaSbuRSeM/auJwAAGfpJnO\"",
            "id": "AAMkAGZiNGI0MWM4LTQ0NjUtNDUyMy1hOTI2LWNopaTZiMGYxZTBkNQBGAAAAAACaBIVNrajXSj6AQcjiAFBwBjFtMyIejaSbuRSeM-auJwAAAAAAEJAABjFtMyIejaSbuRSeM-auJwAAGf4eRfAAA=",
            "createdDateTime": "2018-12-31T14:49:42Z",
            "lastModifiedDateTime": "2020-12-31T14:49:46Z",
            "changeKey": "DopskAkslaAABjFtMyIejaSbuRSeM/auJwAAGfpJnO",
            "categories": [],
            "receivedDateTime": "2020-12-31T14:49:43Z",
            "sentDateTime": "2020-12-31T14:49:42Z",
            "hasAttachments": false,
            "internetMessageId": "<MA1PR0101MB207oPF15907003958DB7A58BDD60@MA1PR0101MB2070.INDPRD01.PROD.OUTLOOK.COM>",
            "subject": "Accepted: New Year Party",
            "bodyPreview": "",
            "importance": "normal",
            "parentFolderId": "AQMkAGZiNGI0MWM4LTQ0ADY1LTQ1MjMtYTkyNi1jZGU2YjBmMWUwZDUALgAAA5oEhU2tqNdKuqPoBByOIAlkallspspspspspppAAAIBCQAAAA==",
            "conversationId": "AAQkAGZiNGI0MWM4LTQ0NjUtNDUyMy1hOTI2LWNkZTZiMGYxZTBkNQAQAEJ5AU8Tk1nklXE3E0XGh2w=",
            "conversationIndex": "AQHW34QsrZ0Wy3deoU2Bn2byefNABQ==",
            "isDeliveryReceiptRequested": null,
            "isReadReceiptRequested": false,
            "isRead": true,
            "isDraft": false,
            "inferenceClassification": "focused",
            "meetingMessageType": "meetingAccepted",
            "type": "singleInstance",
            "isOutOfDate": false,
            "isAllDay": false,
            "isDelegated": false,
            "responseType": "accepted",
            "recurrence": null,
            "body": {
                "contentType": "text",
                "content": ""
            },
            "sender": {
                "emailAddress": {
                    "name": "Mark Rober",
                    "address": "mark@securemigration.in"
                }
            },
            "from": {
                "emailAddress": {
                    "name": "Mark Rober",
                    "address": "mark@securemigration.in"
                }
            },
            "toRecipients": [
                {
                    "emailAddress": {
                        "name": "#Class Yammer",
                        "address": "ClassYammer@securemigration.in"
                    }
                }
            ],
            "ccRecipients": [],
            "bccRecipients": [],
            "replyTo": [],
            "flag": {
                "flagStatus": "notFlagged"
            },
            "startDateTime": {
                "dateTime": "2020-12-31T15:00:00.0000000",
                "timeZone": "UTC"
            },
            "endDateTime": {
                "dateTime": "2020-12-31T15:30:00.0000000",
                "timeZone": "UTC"
            }
        }

请帮帮我。

标签: apigraph

解决方案


推荐阅读