Microsoft Graph API - 通过 internetmessageid 查找消息
Microsoft Graph API - find message by internetmessageid
我需要为两个用户 - John 和 Harry 之间的电子邮件交换找到 conversationId。
在我的场景中:
- 约翰向哈利发送消息。
- 我有来自 John 发送的电子邮件的电子邮件元数据,例如converstationId、internetMessageId、messageId(m$ 图用户特定)。
- 现在我想从哈利那里回复。不幸的是,Harry 的 converstionId 与 John 不同,所以我不能使用它。我想做的是在 Harry 的收件箱中找到电子邮件消息对象并使用他的 conversationId。
- 有了有效的 converstationId,我就可以代表 Harry 调用 replyAll。
我可以拨打这样的电话吗:
GET /me/messages?$filter=internetMessageId eq abcd
是的,您可以按照您建议的形式进行 GET 调用 - 您试过了吗?图 API 支持 standard ODATA query parameters.
在 graph API explorer 上,以下调用对我有效:
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<1430948481468.34600@THCIE7Dev2.onmicrosoft.com>'
这个有效
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<1430948481468.34600@THCIE7Dev2.onmicrosoft.com>'
但是
必须URL 对 internetMessageId
进行编码
因此
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '%3C1430948481468.34600%40THCIE7Dev2.onmicrosoft.com%3E'
我需要为两个用户 - John 和 Harry 之间的电子邮件交换找到 conversationId。 在我的场景中:
- 约翰向哈利发送消息。
- 我有来自 John 发送的电子邮件的电子邮件元数据,例如converstationId、internetMessageId、messageId(m$ 图用户特定)。
- 现在我想从哈利那里回复。不幸的是,Harry 的 converstionId 与 John 不同,所以我不能使用它。我想做的是在 Harry 的收件箱中找到电子邮件消息对象并使用他的 conversationId。
- 有了有效的 converstationId,我就可以代表 Harry 调用 replyAll。
我可以拨打这样的电话吗: GET /me/messages?$filter=internetMessageId eq abcd
是的,您可以按照您建议的形式进行 GET 调用 - 您试过了吗?图 API 支持 standard ODATA query parameters.
在 graph API explorer 上,以下调用对我有效:
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<1430948481468.34600@THCIE7Dev2.onmicrosoft.com>'
这个有效
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<1430948481468.34600@THCIE7Dev2.onmicrosoft.com>'
但是
必须URL 对 internetMessageId
进行编码因此
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '%3C1430948481468.34600%40THCIE7Dev2.onmicrosoft.com%3E'