Reputation: 4545
We would like to have the "Archiving" capabilities in our application using Outlook REST API (see the button I am referring to in OWA).
From the documentation, I see no possibility for knowing which folder is indeed the "Archive folder".
Can it be done ?
Upvotes: 1
Views: 625
Reputation: 17702
The Archive button moves items to a pre-selected folder in the mailbox. If you query for mail folders using the beta endpoint, you'll see that the archive folder has a WellKnownName
property set to archive
. So you can get it directly by doing:
GET https://outlook.office.com/api/beta/me/mailfolders/archive
This is separate from the archive mailbox some organizations setup. In that setup messages are archived to a secondary mailbox assigned to the user. Currently the REST API doesn't support archive mailbox access.
Upvotes: 2