When troubleshooting Office 365 client applications knowing what is normally expected to happen is invaluable. This article attempts to describe how Office 365 Outlook Autodiscover is normally expected to operate both in Exchange hybrid scenarios and with Exchange Online exclusively being used.
Factors that control Autodiscover
There are two primary factors which will determine where Autodiscover calls from Outlook land.
- Autodiscover Dynamic Naming System (DNS) records for your domain (both internal and external) can point to either Exchange running in your network or Exchange Online.
- Depending on the version of Outlook you are using Autodiscover behaves slightly differently.
These two topics are expanded on below.
Autodiscover DNS records
In order to start you need to know where Autodiscover points to within your internal and external Dynamic Naming System (DNS).
Typically if you have some user mailboxes, shared mailboxes or Public Folders in Exchange running within your network, Autodiscover will point to that in DNS.
Alternatively, if you have all your user mailboxes, shared mailboxes and Public Folders in Exchange Online your Autodiscover should point there.
We say should because it may not, but when all your email resources are in Exchange Online it makes the most sense to point Autodiscover to Exchange Online.
Autodiscover points to…
Exchange in your network
If Autodiscover points to Exchange running in your network, Outlook will make Autodiscover calls to autodiscover.yourdomain.com to discover where user mailboxes are located.
The Exchange running in your network should respond with a target address or remote routing address ending in mail.onmicrosoft.com for mailboxes which reside in Exchange Online.
Next, presuming correct redirection, Outlook will make an Autodiscover call to autodiscover.yourdomain.mail.onmicrosoft.com. This is the first Autodiscover call to Exchange Online.
The response to this first Exchange Online Autodiscover call, should result in a redirect to autodiscover-s.outlook.com.
Outlook makes another Autodiscover request to autodiscover-s.outlook.com and presuming authentication works, the response will be a long XML output.
This XML output tells Outlook where the primary mailbox is, where any alternative (shared) mailboxes are, where Public Folders are.
For each alternative mailbox and for public folders further Autodiscover calls follow to find where those mailboxes / resources are located.
Outlook needs to find each resource, whether it is located in Exchange running in your network or in Exchange Online.
If Autodiscover points to Exchange Online the process is much simpler.
All Autodiscover requests are redirected straight to Exchange Online via Dynamic Name System (DNS) CNAME records, rather than being sent to Exchange running in your network.
Presuming all email resources exist in Exchange Online, this gives the most robust experience for your users to connect to their mailboxes.
Outlook and Autodiscover
The Microsoft support article detailing the Autodiscover methods is here.
Outlook Autodiscover before Exchange Online
Before version of Outlook which are designed to more closely work with Exchange Online were released, the process for Autodiscover was as follows:
- SCP lookup
- HTTPS root domain query
- HTTPS Autodiscover domain query
- Local XML file
- HTTP redirect method
- SRV record query
- Cached URL in the Outlook profile. A.K.A. LastKnownGood
The above was typical for Autodiscover on Exchange running within your network. There were varying methods for making sure Outlook was able to get the XML response mentioned earlier. With the introduction of Exchange Online, the Autodiscover first used was the HTTP redirect method, which is described above.
The drawback is all of the Autodiscover methods listed above can best case scenario take extra time to complete. Worse case scenario, these expanded requests get responses from non-Exchange servers and start causing issues in the Outlook client.
This is where the version of Outlook downloadable from Office 365 comes in.
Autodiscover with Outlook from Office 365
Direct Connect to Office 365
The click-to-run version of Office, downloadable from the Office 365 portal does Autodiscover slightly differently.
Its first and last Autodiscover calls go straight to Exchange Online.
The result is Autodiscover requests are fulfilled much quicker where email resources are in Exchange Online. Any Autodiscover calls which need to go through the older methods still do.
This approach is overall much more efficient. For the purpose of troubleshooting it is important to understand these differences.
What does normal look like?
Presuming the Outlook client can get to the Autodiscover endpoint, for example autodiscover.domain.com, Autodiscover should respond with XML data.
This could be as short as giving you a redirect address to perform Autodiscover somewhere else (as in the example below), or it could be a much longer stream of data containing the locations to all Exchange resources the user operating Outlook has access to.
This is an example of an Exchange server giving a redirect address to the user mailbox which resides in Exchange Online.
<?xml version="1.0" encoding="utf-8"?> <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006"> <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a"> <Account> <Action>redirectAddr</Action> <RedirectAddr>[email protected]</RedirectAddr> </Account> </Response> </Autodiscover>
For the best tools to troubleshoot Office 365 Outlook Autodiscover check out the Office 365 Troubleshooting page!