1
votes

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".

Archive button

Can it be done ?

1

1 Answers

2
votes

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.