【问题标题】:Unable to retrieve event details using Microsoft Graph API 1.0无法使用 Microsoft Graph API 1.0 检索事件详细信息
【发布时间】:2020-05-09 07:37:23
【问题描述】:

有人让 Microsoft Graph API 为 EventMessage 工作吗?即使用 Graph API 读取 EventMessage 的电子邮件内容。

看起来它有可操作的卡片,而图形 API 1.0 无法读取它。 为用户提供房间资源的委托访问权限。

在为该房间创建事件时,委托用户会在收件箱中收到邮件。邮件类型为 eventMessage ("@odata.type": "#microsoft.graph.eventMessage")

通过 GraphAPI v1.0 获取邮件时,事件值在响应中不可见。

另外,根据文档在图形 API 中为邮件设置 Expand 属性,会导致以下错误。

{“错误”:{
"code": "BadRequest",
"message": "解析选择和展开失败。",
“内部错误”:{
“请求 ID”:“310bbcce-bdd8-4cb6-890c-035243a5ab6d”,
“日期”:“2020-01-21T09:18:10”
}
}
}

【问题讨论】:

    标签: microsoft-graph-api


    【解决方案1】:

    我无法重现您的问题。 Microsoft Graph API 返回事件消息的详细信息。您能否提供重现步骤、请求/响应捕获以及您希望看到的值?

    我使用v1.0/me/messages来获取所有消息以找到一个事件消息。然后我执行以下操作以获取有关 eventMessage 的详细信息:

    GET https://graph.microsoft.com/v1.0/me/messages/{messagedId}
    

    响应正文:

    {
        "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('d09-94-498-a9777d4b')/messages/$entity",
        "@odata.type": "#microsoft.graph.eventMessage",
        "@odata.etag": "W/\"DAA2pU9s\"",
        "id": "AAMkADEzOTExYjJkAAA=",
        "createdDateTime": "2020-01-24T14:47:24Z",
        "lastModifiedDateTime": "2020-01-24T21:08:07Z",
        "changeKey": "DApU9s",
        "categories": [],
        "receivedDateTime": "2020-01-24T14:47:25Z",
        "sentDateTime": "2020-01-24T14:47:11Z",
        "hasAttachments": false,
        "internetMessageId": "<AM5P3M@A38.EURPRD83.prod.outlook.com>",
        "subject": "Accepted: Microsoft Graph DevX Roadmap",
        "bodyPreview": "",
        "importance": "normal",
        "parentFolderId": "AAMk3AAA=",
        "conversationId": "AAQkADEzOU4=",
        "conversationIndex": "AdXReVPepTg==",
        "isDeliveryReceiptRequested": null,
        "isReadReceiptRequested": false,
        "isRead": true,
        "isDraft": false,
        "webLink": "https://outlook.office365.com/owa/?ItemID=AAMkA%3D&exvsurl=1&viewmodel=ReadMessageItem",
        "inferenceClassification": "focused",
        "meetingMessageType": "meetingAccepted",
        "body": {
            "contentType": "text",
            "content": ""
        },
        "sender": {
            "emailAddress": {
                "name": "Nicole",
                "address": "sig@contoso.com"
            }
        },
        "from": {
            "emailAddress": {
                "name": "Nicole",
                "address": "sig@contoso.com"
            }
        },
        "toRecipients": [
            {
                "emailAddress": {
                    "name": "Michael Mainer",
                    "address": "mm@contoso.com"
                }
            }
        ],
        "ccRecipients": [],
        "bccRecipients": [],
        "replyTo": [],
        "flag": {
            "flagStatus": "notFlagged"
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多