从Azure Graph API检索itemAttachment

从Azure Graph API检索itemAttachment,azure,microsoft-graph-api,Azure,Microsoft Graph Api,目前我从graph API接收电子邮件(和附件)。一些收到的电子邮件附加了其他邮件(.msg),这些邮件中有附件。有人能告诉我如何在附件中检索附件吗 我试过: https://graph.microsoft.com/api/v1.0/me/messages/{messageid}/attachments/{attachmentmessageid}?$expand=microsoft.graph.itemAttachment/Item 但是得到错误: { "error": { "co

目前我从graph API接收电子邮件(和附件)。一些收到的电子邮件附加了其他邮件(.msg),这些邮件中有附件。有人能告诉我如何在附件中检索附件吗

我试过:

https://graph.microsoft.com/api/v1.0/me/messages/{messageid}/attachments/{attachmentmessageid}?$expand=microsoft.graph.itemAttachment/Item
但是得到错误:

{
  "error": {
    "code": "BadRequest",
    "message": "Invalid version",
    "innerError": {
      "request-id": "xxxxxxxxxxxxx",
      "date": "2016-08-30T19:46:36"
    }
  }
}
这对我很有用:

https://graph.microsoft.com/v1.0/users/myAccount/messages/{messageId}/attac
hments/{attachmentId}?$expand=microsoft.graph.itemattachment/item
返回的json有一个
节点,其值为:

{"@odata.type":"#microsoft.graph.message","id":"","createdDateTime":"2018-01-18T01:51:02Z","lastModifiedDateTime":"2018-01-18T01:50:36Z",...
但是,我要补充的是,ItemAttachment中的嵌套电子邮件是不可提取的(或嵌套电子邮件中的任何附件)。我想要一种方法,将ItemAttachment作为FileAttachment来处理,以便只下载字节。我将就此打开另一个SO问题。

这对我很有用:

https://graph.microsoft.com/v1.0/users/myAccount/messages/{messageId}/attac
hments/{attachmentId}?$expand=microsoft.graph.itemattachment/item
返回的json有一个
节点,其值为:

{"@odata.type":"#microsoft.graph.message","id":"","createdDateTime":"2018-01-18T01:51:02Z","lastModifiedDateTime":"2018-01-18T01:50:36Z",...
但是,我要补充的是,ItemAttachment中的嵌套电子邮件是不可提取的(或嵌套电子邮件中的任何附件)。我想要一种方法,将ItemAttachment作为FileAttachment来处理,以便只下载字节。我将就此打开另一个SO问题