Why Is MAPI over HTTP in Exchange Server Better Than RPC over HTTP?

6 minutes read
Written By
Updated On

Communication over any network requires a protocol to ensure the information is received and sent correctly. Earlier, Microsoft Outlook used the RPC (Remote Procedure Call) protocol to connect to the Exchange server. RPC is a request-response protocol. This protocol worked great for local and internal environments, where connectivity is good, and there is no threat to security. 

However, users had to work from outside the office or maybe from home as time passed. When working from home, there are chances that users will work over a slow public Wi-Fi or an even slower mobile data connection, where the real struggles start. As with the RPC protocol, keeping the RPC connection to an on-premise Exchange server hidden behind layers of firewalls is challenging.

This is why Microsoft later came up with the idea of Outlook Anywhere (OA). It used an advanced architecture where all the RPC calls are encapsulated within HTTP and are transported over an SSL for secure and encrypted communication. 

Finally, from Outlook 2016 and the later versions, Microsoft started using MAPI over HTTP. It uses HTTP for the transport by embedding MAPI commands directly in the HTTP stream. Instead of SSL, it uses TLS to provide encryption. Hence, you can say that MAPI over HTTP is not that different from RPC over HTTP. However, there are several advantages to this new connection over Outlook Anywhere. Read along to know more about MAPI over HTTP and its benefits. 

What is MAPI?

MAPI stands for Messaging Application Programming Interface. It is just a way or channel for a program to call functions on a messaging server. 

What is MAPI used for?

MAPI is a messaging system Microsoft uses to connect Outlook and Exchange servers for sending and receiving emails and contacts, setting appointments, managing tasks, sticky notes, etc. MAPI is quite similar to Microsoft’s earlier technology, Outlook Anywhere. It uses RPC-based communication to communicate with a MAPI-based mail server like Exchange.   

Why is Outlook Using MAPI over HTTP?

When you are using MAPI over HTTP, it eliminates the requirement to use two long-term TCP connections. Instead, MAPI uses one long-term connection and one short-term connection. This simplifies the process and provides more effective network use and email performance.  

Moreover, one more perk is that even after switching to MAPI over HTTP, it does not make you liable to use this protocol only for Outlook to access Exchange. Outlook clients not yet using MAPI over HTTP can still use Outlook Anywhere (RPC over HTTP) to access Exchange through a MAPI-enabled Client Access server.    

How To Check If MAPI over HTTP Enabled?

Whenever you install Outlook 2016, 2019, or Microsoft 365, MAPI over HTTP is enabled by default at the organization level, although you still need to configure the virtual directories.

How To Test MAPI over HTTP Connections?

You can use the Test-OutlookConnectivity cmdlettest to test the end-to-end MAPI over the HTTP connection. However, you must enable the Microsoft Exchange Health Manager (MSExchangeHM) service to use the Test-OutlookConnectivity cmdlet.

Advantages of MAPI over HTTP

  • MAPI over HTTP uses a more efficient way to interact with Exchange mailboxes than RPC. Even if you look at the architecture, both MAPI and RPC are encapsulated within HTTP. Still, users can reconnect to the Exchange server more quickly after the network is disrupted using MAPI over HTTP instead of Outlook Anywhere. The reconnection also works faster for MAPI if the computer comes out of sleep or hibernates.
  • It is a more secure option when switching from one network to another. For example, if you want to switch from the office to your cellular network. 
  • The server maintains the session that was going on before you switched the network for a considerable period.
  • MAPI over HTTP is a more secure and reliable protocol for Outlook clients to connect to the Exchange Server 2019 when not using the in-office network.
  • The sole goal of Outlook in switching over to MAPI/HTTP is to provide a better user experience by delivering emails at a much faster rate across all types of connections by providing faster connection times to Exchange. 
  • More excellent reliability and stability of the Outlook and Exchange connections by moving the transport layer to the industry-standard HTTP model. This makes the transport errors more straightforward to detect and, thus, enhances the recoverability. 

Note: If facing any MAPI related error, refer to this article. 

Conclusion

MAPI is not a protocol; it is an API. A protocol means "bits on the wire," whereas an API is a programmatic interface.

Earlier versions of Outlook relied on RPC, delivering significant advantages to application developers. However, because RPS is an older mechanism, MAPI took over. RPC’s limitation was that it was developed to work across LANs rather than the Web. 

MAPI over HTTP enabled the communication between Messaging API (MAPI) clients and servers across an HTTP connection without using remote procedure calls (RPCs).

However, even after Outlook is so advanced, you can still face MAPI errors in Outlook. In such scenarios, you must use a professional tool like Remo PST Repair Tool to fix all these MAPI errors on your Outlook 2010, 2016, 2019, etc. This tool can quickly fix any corruption or error in the Outlook PST file by scanning your corrupt Outlook data file and then extracting the important data from being lost. 

About the Author: Tony Landry

Tony Landry is a Web Content Editor at Remo Software. He loves to write, edit, and manage content for users trying to troubleshoot and fix problems on Windows, Outlook, storage drives, and Cloud storage networks. With an aptitude that transcends writing, Tony is recognized as a Microsoft Outlook, Word, and PowerPoint expert. His comprehensive solutions…