Knowledge Base

How to find the EWS URL and how to test it


You want to know the URL of Exchange Web Services (EWS).


Finding the EWS URL on a client access server

Most Exchange servers have the Client Access Server (CAS) role installed. This role gives them the possibility to receive and process EWS requests. If you confirm that your server has the ClientAccess server role installed (learn how to list Exchange servers and their roles), then itsFully Qualified Domain Name (FQDN) can be used to obtain the EWS URL in the following way:


where <FQDN> is your machine's Fully Qualified Domain Name. FQDN consists of your machine's name along with the domain, for example: In this case, EWS URL is:


You can use the localhost ( endpoint instead of FQDN, provided that the Exchange server where the software is installed is a Client Access Server (CAS). In this case, the EWS URL is:

If you want to test if the EWS URL is correct, see this section.

Using the configuration of Web Services Virtual Directory to get the EWS URL

You can get the address(es) of your Exchange Web Services by executing the following PowerShell cmdlet in the ems Exchange Management Shell:

Get-WebServicesVirtualDirectory | Select name, *url* | fl

If you need the EWS URL, for example to customize the configuration of the Sent Items Update Service in CodeTwo Exchange Rules family software, you will be interested in the address listed as InternalUrl.

For other purposes, you may need to use the ExternalUrl value. In some environments, the external URL might not have not been set up yet. If this is the case, refer to these instructions on how to configure external URLs on Microsoft's website.

Testing the EWS URL

You can test if the EWS URL is correct and EWS works on your machine (for example, on the machine where CodeTwo software is installed). To do so, you need to follow these steps:

  1. Launch a web browser, type your EWS URL (see the previous section to learn how to get it), and open it.
  2. Windows will ask you to provide your credentials (Fig. 1.).
    • If the credentials are correct, you will be connected (even if certificate error occurs - see Fig. 1.). This means that you can use this EWS URL to configure CodeTwo software.
    • If you are not asked for credentials, this means that there is no EWS endpoint under your URL or the connection is not possible. In such a case, make sure that you firewall does not block the connection and that your DNS information and settings are complete.

Fig. 1. After you open the EWS URL in your browser, you need to provide your account credentials to connect to EWS.

Was this information useful?