0
votes

Has anyone got Microsoft Graph API working for EventMessage? i.e reading email content of EventMessage using Graph API.

Looks like it has actionable card and graph API 1.0 is not able to read it. Provided delegate access to user for a room resource.

On event creation for that room, mail is received by the delegated user in inbox. The mail type is eventMessage ("@odata.type": "#microsoft.graph.eventMessage").

On fetching the mail through GraphAPI v1.0, the event values are not visible in the response.

Also on setting the Expand property for the mail in graph API as per docs, results in below error.

{ "error": {
"code": "BadRequest",
"message": "Parsing Select and Expand failed.",
"innerError": {
"request-id": "310bbcce-bdd8-4cb6-890c-035243a5ab6d",
"date": "2020-01-21T09:18:10"
}
}
}

1

1 Answers

-1
votes

I'm unable to repro your issue. The Microsoft Graph API returns details for event messages. Can you provide repro steps, request/response capture, and the values that you'd expect to see?

I used v1.0/me/messagesto get all of the messages to find an eventMessage. I then perform the following to get details on the eventMessage:

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

Response body:

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