Allow Graph API access to Archive Mailbox (aka In-place Archive)
Microsoft's official documentation for Graph API access to Archive mailboxes is non-existent, and what people cobble together on public sites like StackOverflow is highly contradictory:
- https://stackoverflow.com/questions/52991085/how-to-get-messages-from-archived-mailbox-using-ms-graph-api
- https://stackoverflow.com/questions/36939501/how-to-get-in-place-archive-mailbox-in-exchange-online-using-office-365-apis
- https://stackoverflow.com/questions/36939501/how-to-get-in-place-archive-mailbox-in-exchange-online-using-office-365-apis
(some say it's impossible, some possible, but suggested solutions don't actually work).
Suggestion:
- If it's possible to access Archive mailboxes (not just the regular archive folder in the normal mailbox!) via Graph API, document it properly.
- If it's not possible, make it possible.
Thanks!

6 comments
-
Conrad Chan commented
This is a key information missing from Graph API. Without it, a big portion of emails are missing from accessible by our customers. Please support this or let us know how to fill the gap.
-
Paul Park commented
It used to work and I have lots of solutions based on it but now it doesn't really need some way to get ot the archive.
-
Chris Park commented
Please add support for this!
As of 12/18/2020, I've verified that this does not work any longer (specifically, the information in this blog post is out of date: https://ivanderevianko.com/2020/02/get-messages-from-archived-mailbox-aka-in-place-archive-using-graph-api)
1. GET https://graph.microsoft.com/v1.0/users/some_user_id/mailFolders/ArchiveMsgFolderRoot
404
{
"error": {
"code": "ErrorInvalidMailboxItemId",
"message": "Item 'ArchiveMsgFolderRoot' doesn't belong to the targeted mailbox '...'. The item exists in an archive mailbox.",
"innerError": {
"date": "2020-12-18T05:13:28",
"request-id": "...",
"client-request-id": "..."
}
}
}200
(but messages are from the actual /Inbox instead of the one in the in-place archive, and same for /Archive) -
Anonymous commented
How is this not supported already?
-
Anonymous commented
That's doesn't work for the online archive
-
Ivan commented
This feature already exists, you can access the archived mailbox by using well-known folder name:
ArchiveMsgFolderRoot
For example, to get messages from the Inbox folder in the Archive Mailbox (aka In-Place Mailbox) you should execute the following query:
GET https://graph.microsoft.com/v1.0/users/<id>/mailFolders/ArchiveMsgFolderRoot/childFolders/Inbox/messages
More details available here: https://ivanderevianko.com/2020/02/get-messages-from-archived-mailbox-aka-in-place-archive-using-graph-api