Creating a DNS SRV record for Exchange / O365 to solve autodiscover errors

  • 7019538
  • 25-May-2017
  • 01-Sep-2017

Environment

Retain 3.x and later Exchange O365

Situation

Retain cannot connect to the Exchange server, getting autodiscover errors.

Resolution

Retain requests a connection to the Exchange autodiscover service, which runs on each Exchange client access server (CAS).  See "Autodiscover: How Retain Connects to Your Exchange Mailboxes".

If you only have a single domain in Active Directory (or if multiple domains, there is a trusted relationship between them), then all you have to do is add the Retain server to the domain to which the workstations belong that are running Outlook.  Retain connects to EWS through autodiscover just like Outlook.

However, some customers have multiple Active Directory domains and trusts do not exist for various reasons.  In such cases, SRV records are required.

Microsoft has a detailed article about the SRV record: Setting up a DNS SRV record


In simple terms:

  1. Go to the DNS Manager
  2. Expand Forward Lookup Zones
  3. Locate and right-click on the external DNS zone and choose Other New Records
  4. Click Service Location (SRV) and enter:

Service:  _autodiscover
Protocol:  _tcp
Port Number:  443
Host:  [your mail host, e.g. mail.gwava.net, usually the AD domain forest found in AD Domains and Trusts on the MS AD server]

  1. Click OK

The Microsoft autodiscover library in Retain expects a URL along the lines of https://autodiscover.[your domain]/Autodiscover/Autodiscover.xml (e.g., https://autodiscover.xyzcompany.com/Autodiscover/Autodiscover.xml), which can be found in the worker log as it attempts to login by searching for "Discovered endpoint:" or "AutoDiscover".

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 2402.