Autodiscover and you…part 1
Posted by Jake | Posted in Exchange, Exchange 2010, Office 2007, Office 2010, Techie Stuff | Posted on 04-10-2011-05-2008
0
You may be tempted to wing it
Use a hardcoded link submit it
But performance will suffer
When you’re left to your druthers
Should have Autodiscovered
Then all would be well
The Autodiscover Song
http://blogs.technet.com/b/exchange/archive/2008/08/08/3406026.aspx
I usually don’t like to write how-to articles. Don’t get me wrong, I love helping people and that’s why I love consulting, but I leave the how-to articles to my friends Scott Feltmann, Elan Shudnow and Jeff Guillet. Me on the other hand, am an entertainer, always have been. I like to hit the topics that no one usually wants to touch. Like our friend the Exchange Autodiscover service.
Over the past few months, I’ve been called in by several clients to clean up the work of other “Exchange experts” who underbid me (well, the company I work for), and then pass off the work as a job well done. Then, when they leave and move on to their next work of art, the clients call me back and ask them to fix the laundry list of “out of scope” issues the “expert” left behind.
More times than most, one thing fixes 90% of these issues. Sing it with me kids….A-U-T-O-D-I-S-C-O-V-E-R.
What Does Autodiscover do?
Why, I’m so glad you asked! Here is the official Technet description of the service. (Yes, I am the MASTER of cut and paste!)
The Autodiscover service does the following:
- Automatically configures user profile settings for clients running Microsoft Office Outlook 2007 or Outlook 2010, as well as supported mobile phones. Phones running Windows Mobile 6.1 or a later version are supported. If your phone isn’t a Windows Mobile phone, check your mobile phone documentation to see if it’s supported.
- Provides access to Exchange features for Outlook 2007 or Outlook 2010 clients that are connected to your Exchange messaging environment.
- Uses a user’s e-mail address and password to provide profile settings to Outlook 2007 or Outlook 2010 clients and supported mobile phones. If the Outlook client is joined to a domain, the user’s domain account is used.
Now, that’s pretty self-explanatory, right? From what I’m seeing in the field, I think most people are reading the first sentence and clicking the next link. (…and I thought I had a severe case of ADD!)
AUTODISCOVER DOES MUCH MORE THAN PROFILE CREATION PEOPLE!
Let’s read the second bullet, you know, the one they didn’t read!
- Provides access to Exchange features for Outlook 2007 or Outlook 2010 clients that are connected to your Exchange messaging environment.
Now, first a little bit of side info that’s pretty valuable for this topic. Exchange 2007 and 2010 uses Exchange Web Services (EWS) to serve clients like Outlook 2007, 2010, (2011 for you Mac users), OWA, ActiveSync, and even that waste of silicon the Blackberry.
No really, I may end up voting Republican if Obama doesn’t ditch the BB and get a real phone.
Outlook 2000 or 2003 does not use the Autodiscover service. But that doesn’t mean you shouldn’t deploy it if you use those clients exclusively. Remember those ActiveSync clients, they need some Autodiscover love too!
If you are still on Office 98 call me, please. I’ll steal some 2007 or 2010 licenses for you somehow. (Kidding!)
With EWS, these clients get the much improved Availability Service (Free/Busy for those of you still suck on 2003), Out of Office, MailTips, Offline Address Book and even access to the new, and seriously cool Exchange Control Panel, securely and efficiently! (read: No WebDav!)
Besides, when you take advantage of that new kick-ass cross-site DAG you just implemented, how are your Outlook clients going to find their mailbox after your basement datacenter just took in several hundred gallons of the Minnesota River, and you (thankfully) failed over to the backup datacenter? Magic? A quick desktop support staff? Nope, Autodiscover.
So here’s how it works:

When you first setup the Outlook or ActiveSync client internally from a domain joined client, the client will query the Autodiscover Service Connection Point for the list of CAS servers. The client sends an HTTP POST command to the Autodiscover service. This command includes XML data that requests the connection settings and URLs for the Exchange services that are associated with the Outlook provider. The service will gather the locations of the different Exchange Web Services (EWS) from Active Directory which will then present the client with the results in an HTTP request formatted in XML.
What if something changes or breaks?
The Outlook client queries Autodiscover periodically (1 hour). If there are changes in the Exchange architecture, Autodiscover will change the profile automatically. If Outlook fails to connect to the Exchange server, it will attempt to connect to the URL’s it was presented every five minutes.
Now when the underlying network layer disconnects, after the first initial reconnection, Outlook’s MAPI layer will attempt to query Autodiscover every six hours.
Note: For the client changes to take effect, you still need to restart the client or do a manual “Repair” under Account Settings.
The Service Connection Point
Let’s talk about the SCP Connection point. This is AUTOMAGICALLY created by setup when you install the Client Access Role. Setup will register this connection point under the CN=Services, CN=Microsoft Exchange, CN=Administrative Groups, CN=”AG NAME”, CN=Servers, CN=Servername, CN=Protocols, CN=Autodiscover container. The Internal domain joined Outlook client will query AD for these connection points. AD will return a list (one for every CAS server in the organization and another set of lists with the CAS servers in your site and outside your site), and will usually take the first one in the closest or same AD Site on the list.
Now before you go all ADSIEdit on your NTDS.dit, hold yer horses! You do realize you have options that do not involve an authoritative restore after you accidentally bump the delete key on the root container, right? In the Exchange Management Shell (oh come on, Powershell isn’t that bad!), you can use your carefully planned out Autodiscover URL to set the Autodiscover Internal URI value.
Set-ClientAccessServer -Identity “CAS-01″ -AutoDiscoverServiceInternalUri https://cas01.contoso.com/autodiscover/autodiscover.xml
Do this on every CAS server in your organization and it will return a properly formatted list to you every time. Well, maybe. Unless you neglected to plan for Autodiscover properly and did not include the server (or another hostname like Autodiscover) name on your brand new and very carefully crafted SAN certificate.
If this happens, you get the dreaded certificate error! Plan, plan, plan, I say!
Certificates are another thing that gets a lot of “experts” into trouble. Microsoft recommends using a SAN (Subject Alternative Name) Certificate, also called a UC (Unified Communications) Certificate. A lot of them try get away with using a single name certificate, but it really is more trouble than it is worth. I never recommend their use.
Make sure whatever name you use for your Autodiscover url, there is a valid certificate imported and assigned in Exchange with that name in the SAN field!
The names Microsoft recommends are:
CN (Common Name): *owaname*. Domain.com
SAN: Autodiscover.domain.com
SAN: legacy.domain.com (for legacy coexistience to Exchange 2003, if needed)
Note: Personally, I like to add the local CAS server names into the cert as well, just to cover for any static client issues or testing. It is not required though by any means. With properly configured URL’s, you do not need to add them. It’s just my personal preference after some late nights of troubleshooting some wacky environments. YMMV J
I could go much deeper into this subject, but I’m out of…ahem, beverages. In Part II of this thrilling series on Autodiscover, I will go into external Autodiscover configuration, OCS/Lync dependencies, and how your phone finds Exchange from anywhere in the world.
For more information:
White Paper: Exchange 2007 Autodiscover Service
http://technet.microsoft.com/en-us/library/bb332063%28EXCHG.80%29.aspx
Understanding the Autodiscover Service: Exchange 2010 SP1
http://technet.microsoft.com/en-us/library/bb124251.aspx
And if you’re really geeky:
[MS-OXDISCO]: Autodiscover HTTP Service Protocol Specification
http://msdn.microsoft.com/en-us/library/cc433481%28EXCHG.80%29.aspx













