Difference between RPC over HTTP and MAPI over HTTP
In this blog we will talk about difference between RPC over HTTP and MAPI over HTTP. We will discuss how these 2 protocols work, and how to configure and test RPC over HTTP (Outlook Anywhere) and MAPI over HTTP in Exchange Server 2019.
Table of Contents
Watch video
You our YouTube channel and watch this video to learn the difference between RPC over HTTP and MAPI over HTTP.
What is RPC over HTTP (Outlook Anywhere)
When a user wants to access company resources from outside the network or from Internet, generally they have to use a VPN. Virtual Private Network or VPN allows a connection to the organization’s network and inside its firewall so that users can access the company resources from the external network.
Outlook Anywhere or RPC over HTTP allows the users to connect to their mailboxes using outlook client from an external network without using a VPN. That means if Outlook Anywhere is configured in your exchange organization, users can connect to their mailboxes using outlook client from external network and they do not need a VPN. This is possible because outlook client can use RPC over HTTP to connect to the Exchange services.
Outlook Anywhere or RPC over HTTP is a facility that is provided by Microsoft Outlook for remote connections. It acts like an alternative to VPN connections that allows users to access outlook client without any restrictions. This facility allows you to access Exchange accounts remotely using Internet when you are not using the internal network.
RPC over HTTP is a Windows component. It wraps remote procedure calls or RPCs with an HTTP layer so that it can travel through the network firewalls without requiring RPC ports to be opened in your network. So if you are using RPC over HTTP, you do not have to open any extra ports on your network.
Important: Outlook Anywhere also uses MAPI protocol. When outlook client connects to exchange mailbox using Outlook Anywhere or RPC over HTTP, the MAPI protocol is wrapped with RPC, and then it is wrapped with HTTP. In RPC over HTTP all the RPC calls are encapsulated within HTTP and are transported over an SSL connection. But it requires 2 long-lived TCP connections. One connection for Outlook and Exchange Server and 1 for Exchange Server and Outlook connection.
In Exchange Server 2013, 2016, and 2019 this feature is enabled by default. But still you need to make certain changes in Exchange server so that outlook clients can use Outlook Anywhere to connect to the Exchange mailboxes.
Configure RPC over HTTP (Outlook Anywhere) in Exchange server 2019
To configure outlook anywhere in Exchange server 2019, go to Exchange admin center, click Servers, click servers again, and double click Exchange server name as shown below.
On the settings page, click Outlook Anywhere, and under Specify the external host name and Specify the internal host name, type the host name of your Exchange server.
Under Specify the authentication method for external clients, select Negotiate and check Allow SSL offloading. Click Save to save the settings.
To configure RPC over HTTP in Exchange server 2019 using PowerShell, run below command in Exchange Management Shell:
Set-OutlookAnywhere -Identity “Exchange/Rpc (Default Web Site)” -ExternalHostname mail.office365concepts.com -InternalHostname mail.office365concepts.com -ExternalClientsRequireSsl $true -InternalClientsRequireSsl $true -DefaultAuthenticationMethod Negotiate
Testing RPC over HTTP connectivity
To verify if RPC over HTTP is configured properly in Exchange server, run below command in Exchange Management Shell:
Test-OutlookConnectivity -ProbeIdentity Outlook.Protocol\OutlookRpcSelfTestProbe
In above image you can see Result shows Succeeded that indicates RPC over HTTP connectivity passes and RPC over HTTP is configured properly in Exchange server.
What is MAPI over HTTP
MAPI over HTTP is a transport protocol that replaces Outlook Anywhere. It was introduced in Exchange Server 2013 SP1.
In Exchange Server 2016 and 2019, MAPI over HTTP is enabled by default on the organization level, and outlook clients can use MAPI over HTTP to connect to the Exchange mailboxes. In MAPI over HTTP, MAPI is wrapped with only HTTP protocol and instead of 2 long-term connections, it uses 1 long-term connection and 1 short-term connection. Which results in faster communication when you are connecting to your Exchange server mailboxes.
By default Outlook 2016, 2019 or Outlook 365 uses MAPI over HTTP. But if MAPI over HTTP is not enabled in your Exchange Server, outlook clients can still use RPC over HTTP to connect to the Exchange server.
Configure MAPI over HTTP in Exchange Server 2019
To configure MAPI over HTTP, go to Exchange admin center, click servers, click virtual directories and double click mapi (Default Web Site).
Under Internal URL and External URL you need to specify the hostname of your Exchange server for which you have published DNS records in local and public DNS as described in this article.
Under authentication select the authentication method as Windows authentication – NTLM, Windows authentication – Negotiate, and Server to server authentication (OAuth) and click Save.
In Exchange server 2019 MAPI over HTTP is enable by default on the organization level. To verify run below PowerShell command in Exchange Management Shell:
Get-OrganizationConfig | fl *MAPIHTTPEnabled*
In the above image you can see MAPI over HTTP is enabled and the outlook clients will use this protocol to connect to the Exchange Server.
Testing MAPI over HTTP connectivity
To test MAPI over HTTP connectivity in Exchange server, create a user’s profile in outlook client and go to Connection Status as shown below:
On the Outlook Connection Status page, expand Server name and here you will find your Exchange server’s hostname along with the protocol being used as shown below:
Disable MAPI over HTTP in Exchange server
To disable MAPI over HTTP on the organization level, run below PowerShell command in Exchange Management Shell:
Set-OrganizationConfig -MapiHttpEnabled $false
To disable MAPI over HTTP on the user level, run below PowerShell command in Exchange Management Shell:
Set-CASMailbox Identity "Bob Ross" -MapiHttpEnabled $False
Now if you re-open outlook or configure a new profile for Exchange user, this time outlook will connect to Exchange server using RPC over HTTP as shown below:
To enable MAPI over HTTP on the organization level, run below PowerShell command in Exchange Management Shell:
Set-OrganizationConfig -MapiHttpEnabled $True
Difference between RPC over HTTP and MAPI over HTTP
RPC over HTTP: RPC over HTTP allows the users to connect to their mailboxes using outlook client from an external network without using a VPN. Outlook Anywhere or RPC over HTTP is a facility that is provided by Microsoft Outlook for remote connections. It acts like an alternative to VPN connections that allows users to access outlook client without any restrictions. This facility allows you to access Exchange accounts remotely using Internet when you are not using the internal network. RPC over HTTP wraps remote procedure calls or RPCs with an HTTP layer so that it can travel through the network firewalls without requiring RPC ports to be opened in your network. So if you are using RPC over HTTP, you do not have to open any extra ports on your network.
MAPI over HTTP: MAPI over HTTP is a transport protocol that replaces Outlook Anywhere. In MAPI over HTTP, MAPI is wrapped with only HTTP protocol and instead of 2 long-term connections, it uses 1 long-term connection and 1 short-term connection. Which results in faster communication when you are connecting to your Exchange server mailboxes.
Conclusion
In this blog we learnt what is RPC over HTTP and MAPI over HTTP. We also learnt how to configure RPC over HTTP and MAPI over HTTP and what is the difference between RPC over HTTP and MAPI over HTTP.
Found this article helpful and informative, please share it within your community. Please join us on our YouTube channel for latest videos on Cloud technology and join our Newsletter for the early access of blogs and updates.
Exchange Server 2019 related articles
We welcome you to browse our other articles on Exchange Server 2019 and Exchange Hybrid deployment:
Install Active Directory on Windows Server 2019 and promote to Domain Controller
DNS records in Active Directory
Exchange Server Roles, Architecture, and Functionality Explained
Exchange Server 2019 prerequisites
Install Exchange Server 2019 on Windows Server 2019. A step by step Guide
How to configure Exchange Server 2019 post installation
Transport Pipeline in Exchange Server 2019
Configure Mail Flow in Exchange Server 2019
Create FREE Let’s Encrypt certificate and install on Exchange Server
What is Edge Transport Server
How to install Edge Transport Server in Exchange 2019 organization
Setup EOP as a smart host in Exchange Server 2019
How to configure SMTP relay in Exchange server 2019
Demystifying Autodiscover. A Deep Dive into Autodiscover
Configure Client Access Services in Exchange 2019
Happy Learning!!