Autodiscover provides Outlook configuration in format of XML file in order to reduce configuration steps. Inside the organization where clients are domain joined they find Autodiscover using SCP (Service Connection Point) which is created in Active Directory when deploying Exchange Server in the organization.
Autodiscover in Hybrid Environment
It depends on the current scenario that if all users are migrated to Exchange Online and no one left behind or some mailboxes exist on Exchange On-premise and others on Exchange Online. In hybrid the Autodiscover will be pointing to on-premise Exchange Server.
For migrated mailbox, autodiscover service will redirect On-premise autodiscover record to Office 365 (autodiscover-s.outlook.com), and access to Office 365.
In above illustration, organization user contoso.com as their SMTP address space and for the mailboxes in Office 365, On-Premise will have a remote mailbox account with the target address as contoso-mail.onmicrosoft.com as the target address.
- Once the user launches the outlook and enter the credential, Outlook will query Active Directory for SCP record to get the Autodiscover Service information.
- After authentication it will try to validate the user and it can’t find mailbox for Bob and only remote mailbox account available for this user in On-Premise and it will inform outlook to try Autodiscover request for Bob’s Target Address.
- Outlook will try to get the Autodiscover information for contoso-mail.onmicrosoft.com by dns query to internet. Autodiscover.contoso.mail.onmicrosoft.com will have a CNAME record that points to Exchange Online Autodiscover record.
- Outlook will connect Autodiscover.outlook.com endpoint.
- Exchange Online validate the user by an authentication.
- Once verified, Bob will get Autodiscover configuration in xml format.
If all mailboxes has been migrated to Exchange online. You could set up the Autodiscover DNS records point to Exchange online instead of to on-premises. And run the following command to remove the Servcie Connection Point(SCP) values on your Exchange servers.
Get-ClientAccessService | Set-ClientAccessService -AutoDiscoverServiceInternalUri $Null
In hybrid environment, on-premise Autodiscover can redirect to Office 365 but Autodiscover pointing to Exchange Online can’t redirect to on-premise Exchange Server.