There's quite a few details that are involved in the Autodiscover process. First of all - probably the most important thing is that there are 2 stages to the whole process.
In the first stage, the client is simply concerned with getting the address of a CAS server that will help it further. We'll keep things simple and assume your scenario where the client is located inside the network and is domain-joined. The details of the
LDAP query are detailed in
this link. (At the time I was investigating this I've actually went ahead and ran the queries using the ldp.exe client against the Configuration partition of the respective AD domain - it's worth seeing the actual responses.) An interesting trick here is
the 'keywords' attribute that's stamped on those SCP entries. The reason behind it is that you don't want a client located in a site to go half across the globe in order to connect to a CAS server, when there's one available in its own site. One simple way
to get the 'keywords' attribute stamped is through the Set-ClientAccessServer cmdlet, using the -AutodiscoverSiteScope parameter. In your example, you'd probably want to run it against the CAS server in Site A and specify the name of the corresponding AD site
('SiteA') and correspondingly against the 2 CAS servers in Site B (using 'SiteB'). Once the client has got the response to his query, it will attempt to select one server that's handling the site he's in (essentially it will filter the results based on 'keywords'
-contains <client-site>). Now that we got our endpoint we can go to stage 2.
In stage 2, the client will actually use EWS in order to query the Autodiscover service itself running on our target server. There are 2 possible interfaces of accessing the Autodiscover service: POX (Plain Old XML) and SOAP. POX will be targeting the ../Autodiscover.xml
URLS, while the SOAP one will be using ../Autodiscover.svc URLs. Details about this including some hardcoded parts are
here. What happens next is detailed in point 3, section 2.1 The Autodiscover Process
here. This last link is the key to the whole process:
"It provides a list of CAS that has AutodiscoverSiteScope information set for the
Associated AD site of the Database where the client Mailbox is located."
In other words, the CAS is smart enough to return the URLs belonging to a CAS server in the AD site where the client's mailbox' database is active.
My advice is to test this on your scenario. Tests can be done here first-hand: the Outlook's tray icon Test E-Mail AutoConfiguration can be used or alternatively - if you want to see the details in the communication - SoapUI
for the SOAP access method, for POX there's an extension called 'Postman for Chrome' that can be used. I've used all these in my tests back when I was fighting conflicting results from the articles around the web about Autodiscover.
-
Marked as answer by
Amine.G
Friday, March 13, 2015 8:19 PM