我使用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"
}
}
}
错误至少在三月份左右没有返回。以下文件夹也是如此。
https://graph.microsoft.com/v1.0/users/user_id/mailFolders/ArchiveMsgFolderRoot/
https://graph.microsoft.com/v1.0/users/user_id/mailFolders/ArchiveDeletedItems/
Microsoft Graph文件夹命名方案是否已更改?
这不可能:The API does not support accessing in-place archive mailboxes,不在Exchange Online或Exchange Server上。
这就是为什么Well-known folder names下未列出ArchiveMsgFolderRoot和ArchiveDeletedItems的原因。>>
最后,Cross-mailbox API calls will fail从2020年4月15日开始。