skip to Main Content

Autodiscover URL in Exchange hybrid

Frustration about the autodiscover URL when you migrate to Office 365/Microsoft 365. Where do you need to point your autodiscover URL to in an Exchange hybrid configuration? Do you need to point the autodiscover record to the Exchange on-premises or Exchange Online? In this article, we discuss when and how to configure autodiscover in Exchange hybrid deployment.

Introduction

In the previous articles, we already did write about the autodiscover URL. So it’s good to go through these articles and understand how to set up autodiscover URL in Exchange Server.

Autodiscover URL in Exchange hybrid deployment

In the table below, you can see where to point your autodiscover URL to in an Exchange hybrid deployment.

Mailbox locationPoint autodiscover URL
to Exchange on-premises
Point autodiscover URL
to Exchange Online
All mailboxes on-premises
All mailboxes in cloud✓*
Mailboxes on-premises and in cloud

*After migrating all the mailboxes to Exchange Online, and everything works as expected, you can point the autodiscover URL to Exchange Online. That’s when you want to null the autodiscover internal URL in the Exchange on-premises server. You have to do that with Exchange Management Shell (PowerShell). Also, remove the internal DNS entries which point to the autodiscover URL. More on that down below.

Point autodiscover URL to Exchange on-premises

Do you have mailboxes in Exchange on-premises only or both the mailboxes on-premises and in the cloud? Point the autodiscover URL to the Exchange on-premises server. Exchange on-premises will automatically direct clients to autodiscover for Exchange Online.

Most of the time, you will not have to edit anything because it’s already set. However, if it’s not set up correctly, configure the autodiscover internal URL, public DNS autodiscover, and the internal DNS autodiscover entries.

Autodiscover internal URL

Run Exchange Management Shell. Use the Get-ClientAccessServer cmdlet to check the autodiscover internal URL. In our example, there are two Exchange Servers in the organization.

[PS] C:\>Get-ClientAccessServer | Select Identity, AutoDiscoverServiceInternalUri, AutoDiscoverSiteScope | Format-List

Identity                       : EX01-2016
AutoDiscoverServiceInternalUri : https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml
AutoDiscoverSiteScope          : {Default-First-Site-Name}

Identity                       : EX02-2016
AutoDiscoverServiceInternalUri : https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml
AutoDiscoverSiteScope          : {Default-First-Site-Name}

Public DNS autodiscover

Configure the autodiscover CNAME record in Public DNS. Point the autodiscover record to mail.exoip.com.

Record Type    TTL    DNS Name       Priority   Value
-----------    ---    --------       --------   -----
CNAME          300    autodiscover              mail.exoip.com.

After 5 to 10 minutes, check the record with the MxToolbox CNAME lookup. Verify that the DNS record is published correctly.

Autodiscover URL in Exchange hybrid mxtoolbox Exchange on-premises

Internal DNS autodiscover

Suppose you are using Round-robin DNS. Add two CNAME or A records in the internal DNS server for autodiscover.exoip.com. Pointing to both the Exchange Servers EX01-2016 and EX02-2016. Assuming that both the Exchange Servers are the Client Access Servers (CAS).

If you are using a Load Balancer, create a VIP on the load balancer. Pointing to both the Exchange Servers EX0-2016 and EX02-2016. Assuming that both the Exchange Servers are the Client Access Servers (CAS). Add a CNAME or A record in the internal DNS server for autodiscover.exoip.com. Pointing to the load balancer.

In our example, we have a Kemp load balancer with internal IP 192.168.1.54.

Remove internal DNS autodiscover entries

On an internal machine, ping to the autodiscover DNS record. Ensure you get a reply from the load balancer or Exchange Server.

C:\>ping autodiscover.exoip.com

Pinging autodiscover.exoip.com [192.168.1.54] with 32 bytes of data:
Reply from 192.168.1.54: bytes=32 time<1ms TTL=64
Reply from 192.168.1.54: bytes=32 time<1ms TTL=64
Reply from 192.168.1.54: bytes=32 time<1ms TTL=64
Reply from 192.168.1.54: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.1.54:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Point autodiscover URL to Exchange Online

Do you have all the mailboxes moved to the cloud? First, point the autodiscover URL to Exchange Online. After that, null the internal autodiscover URL on the Exchange on-premises server. As of last, remove the internal DNS autodiscover entries.

Autodiscover internal URL

Run Exchange Management Shell. Use the Get-ClientAccessServer cmdlet to check the autodiscover internal URL. In our example, there are two Exchange Servers in the organization.

[PS] C:\>Get-ClientAccessServer | Select Identity, AutoDiscoverServiceInternalUri, AutoDiscoverSiteScope | Format-List

Identity                       : EX01-2016
AutoDiscoverServiceInternalUri : https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml
AutoDiscoverSiteScope          : {Default-First-Site-Name}

Identity                       : EX02-2016
AutoDiscoverServiceInternalUri : https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml
AutoDiscoverSiteScope          : {Default-First-Site-Name}

Use the AutoDiscoverServiceInternalUri parameter to null the autodiscover internal URL. In our example, we will run the command against both Exchange Servers.

[PS] C:\>Set-ClientAccessServer -Identity EX01-2016 -AutoDiscoverServiceInternalUri $null

[PS] C:\>Set-ClientAccessServer -Identity EX02-2016 -AutoDiscoverServiceInternalUri $null

Verify that the autodiscover internal URL is nulled.

[PS] C:\>Get-ClientAccessServer | Select Identity, AutoDiscoverServiceInternalUri, AutoDiscoverSiteScope | Format-List

Identity                       : EX01-2016
AutoDiscoverServiceInternalUri :
AutoDiscoverSiteScope          : {Default-First-Site-Name}

Identity                       : EX02-2016
AutoDiscoverServiceInternalUri :
AutoDiscoverSiteScope          : {Default-First-Site-Name}

Restart the Internet Information Services (IIS).

[PS] C:\>iisreset

Public DNS autodiscover

Configure the autodiscover CNAME record in Public DNS. Point the autodiscover record to autodiscover.outlook.com. This is the default autodiscover record for Exchange Online.

Record Type    TTL    DNS Name       Priority   Value
-----------    ---    --------       --------   -----
CNAME          300    autodiscover              autodiscover.outlook.com.

After 5 to 10 minutes, check the record with the MxToolbox CNAME lookup. Verify that the DNS record is published correctly.

Autodiscover URL in Exchange hybrid mxtoolbox Exchange Online

Internal DNS autodiscover

Remove the autodiscover DNS entries in the internal DNS.

Autodiscover URL in Exchange hybrid internal DNS Exchange Online

On an internal machine, ping to the autodiscover DNS record. Ensure you get a reply from an external IP address and not the internal load balancer or Exchange Server. That’s because it will reach outlook.autodiscover.com.

C:\>ping autodiscover.exoip.com

Pinging autod.ms-acdc-autod.office.com [40.101.80.184] with 32 bytes of data:
Reply from 40.101.80.184: bytes=32 time=9ms TTL=242
Reply from 40.101.80.184: bytes=32 time=10ms TTL=242
Reply from 40.101.80.184: bytes=32 time=15ms TTL=242
Reply from 40.101.80.184: bytes=32 time=13ms TTL=242

Ping statistics for 40.101.80.184:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 9ms, Maximum = 15ms, Average = 11ms

That’s it!

Read more: Configure Internal and External URL in Exchange Server »

Conclusion

In this article, you learned when and how to set up autodiscover URL in Exchange hybrid deployment. Make sure that you point the autodiscover URL to the Exchange on-premises server as long as you have mailboxes located on-premises. If all mailboxes are in the cloud, autodiscover can be pointed to Exchange Online.

Did you enjoy this article? You may also like Find IP addresses using Exchange SMTP relay. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *