Search code examples
exchange-servermapioutlook-redemptionexchange-server-2016

Access mailbox using MAPI or Outlook Redemption on Exchange 2016/2019


I have been asked to do some research on how to access a user's mailbox and execute some basic tasks(copy emails, create folders, delete folders/emails, move emails from one folder to another based on a certain criteria) on Exchange Server 2016/2019 without Outlook. I have seen that the recommended method is through EWS. But EWS or "anything" over http is not an option as it would be too slow for what we're looking for. So what i have looked at was MAPI. But i have seen a lot of posts indicating that MAPI beacame obsolete and won't work with Exchange 2016/2019.
So my question is: Can i perform these basic tasks mentioned above with MAPI or Outlook-Redemption on Exchange Server 2016/2019 without Outlook?


Solution

  • The standalone version of MAPI went out of support a couple year ago and is no longer available for download from Microsoft. Even if it were available, it never supported MAPI-over-HTTP and OAuth2 authentication.

    For EWS or Graph, your application must be registered on the server if OAuth2 authentication is to be used. Only Basic authentication (which is disabled by default for M365 mailboxes) will work out of the box without any setup on the server.

    To use Redemption, you will need the MAPI system, which nowadays means Outlook must be installed. In that case, you can use an existing profile created for Outlook, nothing needs to be done on the server since Outlook is pre-authorized to connect to any Exchange mailbox as long as authorization is successful. In that case you can use either Outlook Object Model (which wraps both Extended MAPI and Outlook GUI, but can only be used on the main Outlook thread) or Redemption (which also wraps Extended MAPI, but can be used on secondary threads).