【问题标题】:Microsoft Graph API return ErrorInvalidMailboxItemId errorMicrosoft Graph API 返回 ErrorInvalidMailboxItemId 错误
【发布时间】:2020-05-19 03:22:03
【问题描述】:

我使用 Microsoft Graph API 来抓取 Exchange Online 中的电子邮件。 如果您尝试使用此 API 抓取 ArchiveMsgFolderRoot 文件夹,您将收到 ErrorInvalidMailboxItemId 错误。

GET https://graph.microsoft.com/v1.0/users/user_id/mailFolders/ArchiveRoot/
HTTP/1.1 404 Not Found
Cache-Control: private
Content-Type: application/json
request-id: ce60b00e-1703-450e-b8d2-0e8629519985
client-request-id: ce60b00e-1703-450e-b8d2-0e8629519985
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"Japan East","Slice":"SliceC","Ring":"2","ScaleUnit":"000","RoleInstance":"AGSFE_IN_5"}}
Strict-Transport-Security: max-age=31536000
Date: Mon, 18 May 2020 06:40:06 GMT
Connection: close
Content-Length: 257

{
  "error": {
    "code": "ErrorInvalidMailboxItemId",
    "message": "Item Id doesn't belong to the current mailbox.",
    "innerError": {
      "request-id": "ce60b00e-1703-450e-b8d2-0e8629519985",
      "date": "2020-05-18T06:40:07"
    }
  }
}

该错误至少在 3 月左右没有返回。 这同样适用于以下文件夹。

https://graph.microsoft.com/v1.0/users/user_id/mailFolders/ArchiveMsgFolderRoot/ https://graph.microsoft.com/v1.0/users/user_id/mailFolders/ArchiveDeletedItems/

Microsoft Graph 文件夹命名方案是否已更改?

【问题讨论】:

    标签: microsoft-graph-api microsoft-graph-mail


    【解决方案1】:

    这是不可能的:The API does not support accessing in-place archive mailboxes,不在 Exchange Online 上,也不在 Exchange Server 上。

    这就是为什么 ArchiveMsgFolderRoot 和 ArchiveDeletedItems 都没有在 Well-known folder names 下列出的原因。

    最后,Cross-mailbox API calls will fail 从 2020 年 4 月 15 日开始。

    【讨论】:

    • 谢谢阿尔弗雷多。由于 Microsoft Graph API 发生明显变化,我的系统出现故障,特别是过去可以正常工作的跨邮箱 API 调用现在失败。 Microsoft Graph API 有什么替代品吗?
    • @aptenodytes 没有支持这个。
    猜你喜欢
    • 1970-01-01
    • 2016-03-04
    • 2023-03-14
    • 2017-05-19
    • 2022-07-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-07
    相关资源
    最近更新 更多