Difference between revisions of "Autodiscover"

(Autodiscover for Outlook, Exchange Activesync and Exchange Web Services)
(Check the Autodiscover using the Official Online Microsoft Tool)
Line 44: Line 44:
  
 
==Check the Autodiscover using the Official Online Microsoft Tool==
 
==Check the Autodiscover using the Official Online Microsoft Tool==
Microsoft has an Online tool where we can test the Autodiscovery, if needed: https://testconnectivity.microsoft.com/ You will see the next window, then select the option called '''Microsoft Office Outlook Connectivity Tests > Outlook Autodiscover'''
+
Microsoft has an Online tool where we can test the Autodiscovery, if needed: https://testconnectivity.microsoft.com/  
 +
 
 +
===Check the Autodiscover for an EAS environment===
 +
'''Important note:''' You will receive an error if you will not enable the EAS functionality to the account you will test. You need to enable Mobile Sync Feature in the COS.
 +
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/a/ae/Autodiscover-005.png</div><br/>
 +
 
 +
You will see the next window, then select the option called '''Microsoft Exchange ActiveSync Connectivity Tests > Exchange ActiveSync Autodiscover'''
 +
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/a/aa/Autodiscover-006.png</div><br/>
 +
 
 +
In the next Window, use an account where you can login into your Zimbra server to test Autodiscover. '''Note:''' Please use a test account that you can delete later, or use an account where you can change the password after this test.
 +
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/e/e2/Autodiscover-007.png</div><br/>
 +
 
 +
After a few seconds, you will be able to see the results. In this case everything seems to be OK:
 +
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/4/44/Autodiscover-008.png</div><br/>
 +
 
 +
If we click Expand All, we can see the steps that Autodiscover tried to work. As explained before, the only step that works here is the DNS one because:
 +
* First, in example.com I don't have the Zimbra Server, I have my regular Website.
 +
* Second, because autodiscover.example.com doesn't have the proper SSL certificate. I have a SSL certificate for mail.example.com for example.
 +
* Third, finally the DNS record is valid, and Outlook can use this method to get the configuration.
 +
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/1/16/Autodiscover-009.png</div><br/>
 +
====The autodiscover Log trace for EAS====
 +
You can see under the /opt/zimbra/log/mailbox.log the attempt of the Autodiscover and the final OK response, you can see in the Autodiscover content the Exchange Activesync data:
 +
<pre>2015-08-04 18:32:34,804 INFO  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - Handling autodiscover request...
 +
2015-08-04 18:32:34,808 WARN  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - No basic auth header in the request
 +
2015-08-04 18:32:34,808 WARN  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - HTTP/1.1 401 Unauthorized
 +
2015-08-04 18:32:35,072 INFO  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - Handling autodiscover request...
 +
2015-08-04 18:32:35,081 INFO  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - Response: <?xml version="1.0"?>
 +
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 +
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006">
 +
<Culture>en:en</Culture>
 +
<User>
 +
<DisplayName>admin</DisplayName>
 +
<EMailAddress>admin@zimbra.io</EMailAddress>
 +
</User>
 +
<Action>
 +
<Settings>
 +
<Server>
 +
<Type>MobileSync</Type>
 +
<Url>https://zimbra86.zimbra.io:8443/Microsoft-Server-ActiveSync</Url>
 +
<Name>https://zimbra86.zimbra.io:8443/Microsoft-Server-ActiveSync</Name>
 +
</Server>
 +
</Settings>
 +
</Action>
 +
</Response>
 +
</Autodiscover></pre>
 +
 
 +
2015-08-04 18:32:35,081 INFO  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - sending autodiscover response...
 +
===Check the Autodiscover for an EWS environment===
 +
'''Important note:''' You will receive an error if you will not enable the EWS functionality to the account you will test. You need to enable EWS Feature in the COS.
 +
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/5/5d/Autodiscover-004.png</div><br/>
 +
 
 +
You will see the next window, then select the option called '''Microsoft Office Outlook Connectivity Tests > Outlook Autodiscover'''
 
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/1/16/Autodiscover-000.png</div><br/>
 
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/1/16/Autodiscover-000.png</div><br/>
  
 
In the next Window, use an account where you can login into your Zimbra server to test Autodiscover. '''Note:''' Please use a test account that you can delete later, or use an account where you can change the password after this test.
 
In the next Window, use an account where you can login into your Zimbra server to test Autodiscover. '''Note:''' Please use a test account that you can delete later, or use an account where you can change the password after this test.
'''Important note:''' In my first test using the Test Connectivity from Microsoft, I received an error because I didn't enable the EWS funcionality to the account I was testing. Enabling the EWS Feature in the COS did the trick to work.
+
 
 
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/4/4c/Autodiscover-001.png</div><br/>
 
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/4/4c/Autodiscover-001.png</div><br/>
  
Line 59: Line 110:
 
* Third, finally the DNS record is valid, and Outlook can use this method to get the configuration.
 
* Third, finally the DNS record is valid, and Outlook can use this method to get the configuration.
 
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/b/b1/Autodiscover-003.png</div><br/>
 
<div class="thumbnail img-thumbnail">https://wiki.zimbra.com/images/b/b1/Autodiscover-003.png</div><br/>
 +
====The autodiscover Log trace for EWS====
 +
You can see under the /opt/zimbra/log/mailbox.log the attempt of the Autodiscover and the final OK response, you can see in the Autodiscover content the EWS data:
 +
<pre>2015-08-04 18:37:40,648 INFO  [qtp509886383-286:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - Handling autodiscover request...
 +
2015-08-04 18:37:40,654 WARN  [qtp509886383-286:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - cannot parse body:
 +
2015-08-04 18:37:40,654 WARN  [qtp509886383-286:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - HTTP/1.1 400 Body cannot be parsed
 +
2015-08-04 18:37:41,345 INFO  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - Handling autodiscover request...
 +
2015-08-04 18:37:41,354 WARN  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - No basic auth header in the request
 +
2015-08-04 18:37:41,354 WARN  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - HTTP/1.1 401 Unauthorized
 +
2015-08-04 18:37:41,611 INFO  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - Handling autodiscover request...
 +
2015-08-04 18:37:41,617 INFO  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - Response: <?xml version="1.0"?>
 +
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 +
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
 +
<User>
 +
<DisplayName>admin</DisplayName>
 +
<EmailAddress>admin@zimbra.io</EmailAddress>
 +
<DeploymentId>dacff30e-ee1d-4b5e-98f1-037a6a45dbfd</DeploymentId>
 +
</User>
 +
<Account>
 +
<AccountType>email</AccountType>
 +
<Action>settings</Action>
 +
<Protocol>
 +
<Type>EXCH</Type>
 +
<EwsUrl>https://zimbra86.zimbra.io:8443/ews/Exchange.asmx</EwsUrl>
 +
</Protocol>
 +
</Account>
 +
</Response>
 +
</Autodiscover></pre>
 +
 
==Configure the Mail Clients==
 
==Configure the Mail Clients==
 
Now that you have your Autodiscover properly configured, you can follow the next Articles to configure your Mail clients:
 
Now that you have your Autodiscover properly configured, you can follow the next Articles to configure your Mail clients:

Revision as of 22:39, 4 August 2015

Autodiscover for Outlook, Exchange Activesync and Exchange Web Services

   KB 22222        Last updated on 2015-08-4  




0.00
(0 votes)

Autodiscover uses the Network Edition features Exchange Activesync (EAS) and Exchange Web Services (EWS) to allow any Mail Client that supports Autodiscover to configure the appropriate Server settings for Communication, so you don’t have to input all the configuration manually. It’s very useful for IT Administrators and for all Users. Autodiscover also uses SSL certificates. For several years, Microsoft has recommended the use of Public domain names for Active Directory domains to avoid the use of non-public TLD like domain.local.

How does Autodiscover work?

Outlook, or the Mail App, has a few ways to look for domain information when configuring itself based on the user's email address. 1. Post to https://example.com/Autodiscover/Autodiscover.xml 2. Post to https://autodiscover.example.com/Autodiscover/Autodiscover.xml 3. Same as the previous but in HTTP http://autodiscover.example.com/Autodiscover/Autodiscover.xml 4. Autodiscover uses the DNS SRV lookup and will get the autodiscover.tcp.example.com that will reply to "mail.example.com"

Example using just the DNS SRV record in Zimbra

Let's say I want to set up Outlook as john@example.com, but my site does not have the required Autodiscovery XML files set up. I enter that email address in Outlook, now Outlook does the following:

Creating the proper DNS entries

To set the proper DNS, you should have 2 different DNS entries.

  • The first one is a CNAME DNS entry pointing to the proper Zimbra FQDN, for example autodiscover.zimbra.io to zimbra86.zimbra.io. Please be aware that the SSL Certificate needs to have the autodiscover.zimbra.io inside using a Wildcard Certificate or a SAN for the record, or Autodiscover will fail in this step:
Autodiscover-DNS-001.png

  • The second DNS record that we need is the SRV one, with the Zimbra FQDN, the service, the protocol, the priority, the weight, the port, and the hostname. For example, using Bind you will need to add a DNS entry like the next one:
Autodiscover-DNS-002.png

Note: You can play with the priority and weight of the DNS record for an Autodiscovery HA based in DNS.

Check the Autodiscover using the DNS

You can check if you have the proper DNS configuration using the regular DNS tools provided by your Operating System. This doesn't necessarily mean that your Autodiscover works in the Zimbra server, but at least you can see if you have properly configured your DNS Server.

In Microsoft Windows

You can test it in Microsoft Windows using nslookup, open a CMD, and introduce the next command to test your Autodiscover DNS record:

nslookup -q=srv _autodiscover._tcp.example.com
Autodiscover-DNS-003.png

In Linux/OS X

You can test it in Linux or OS X using dig, open a terminal/console, and introduce the next command to test your Autodiscover DNS record:

dig _autodiscover._tcp.zimbra.io SRV
Autodiscover-DNS-004.png

Check the Autodiscover using the Official Online Microsoft Tool

Microsoft has an Online tool where we can test the Autodiscovery, if needed: https://testconnectivity.microsoft.com/

Check the Autodiscover for an EAS environment

Important note: You will receive an error if you will not enable the EAS functionality to the account you will test. You need to enable Mobile Sync Feature in the COS.

Autodiscover-005.png

You will see the next window, then select the option called Microsoft Exchange ActiveSync Connectivity Tests > Exchange ActiveSync Autodiscover

Autodiscover-006.png

In the next Window, use an account where you can login into your Zimbra server to test Autodiscover. Note: Please use a test account that you can delete later, or use an account where you can change the password after this test.

Autodiscover-007.png

After a few seconds, you will be able to see the results. In this case everything seems to be OK:

Autodiscover-008.png

If we click Expand All, we can see the steps that Autodiscover tried to work. As explained before, the only step that works here is the DNS one because:

  • First, in example.com I don't have the Zimbra Server, I have my regular Website.
  • Second, because autodiscover.example.com doesn't have the proper SSL certificate. I have a SSL certificate for mail.example.com for example.
  • Third, finally the DNS record is valid, and Outlook can use this method to get the configuration.
Autodiscover-009.png

The autodiscover Log trace for EAS

You can see under the /opt/zimbra/log/mailbox.log the attempt of the Autodiscover and the final OK response, you can see in the Autodiscover content the Exchange Activesync data:

2015-08-04 18:32:34,804 INFO  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - Handling autodiscover request...
2015-08-04 18:32:34,808 WARN  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - No basic auth header in the request
2015-08-04 18:32:34,808 WARN  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - HTTP/1.1 401 Unauthorized
2015-08-04 18:32:35,072 INFO  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - Handling autodiscover request...
2015-08-04 18:32:35,081 INFO  [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - Response: <?xml version="1.0"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006">
<Culture>en:en</Culture>
<User>
<DisplayName>admin</DisplayName>
<EMailAddress>admin@zimbra.io</EMailAddress>
</User>
<Action>
<Settings>
<Server>
<Type>MobileSync</Type>
<Url>https://zimbra86.zimbra.io:8443/Microsoft-Server-ActiveSync</Url>
<Name>https://zimbra86.zimbra.io:8443/Microsoft-Server-ActiveSync</Name>
</Server>
</Settings>
</Action>
</Response>
</Autodiscover>

2015-08-04 18:32:35,081 INFO [qtp509886383-258:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.124;] AutoDiscoverServlet - sending autodiscover response...

Check the Autodiscover for an EWS environment

Important note: You will receive an error if you will not enable the EWS functionality to the account you will test. You need to enable EWS Feature in the COS.

Autodiscover-004.png

You will see the next window, then select the option called Microsoft Office Outlook Connectivity Tests > Outlook Autodiscover

Autodiscover-000.png

In the next Window, use an account where you can login into your Zimbra server to test Autodiscover. Note: Please use a test account that you can delete later, or use an account where you can change the password after this test.

Autodiscover-001.png

After a few seconds, you will be able to see the results. In this case everything seems to be OK:

Autodiscover-002.png

If we click Expand All, we can see the steps that Autodiscover tried to work. As explained before, the only step that works here is the DNS one because:

  • First, in example.com I don't have the Zimbra Server, I have my regular Website.
  • Second, because autodiscover.example.com doesn't have the proper SSL certificate. I have a SSL certificate for mail.example.com for example.
  • Third, finally the DNS record is valid, and Outlook can use this method to get the configuration.
Autodiscover-003.png

The autodiscover Log trace for EWS

You can see under the /opt/zimbra/log/mailbox.log the attempt of the Autodiscover and the final OK response, you can see in the Autodiscover content the EWS data:

2015-08-04 18:37:40,648 INFO  [qtp509886383-286:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - Handling autodiscover request...
2015-08-04 18:37:40,654 WARN  [qtp509886383-286:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - cannot parse body: 
2015-08-04 18:37:40,654 WARN  [qtp509886383-286:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - HTTP/1.1 400 Body cannot be parsed
2015-08-04 18:37:41,345 INFO  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - Handling autodiscover request...
2015-08-04 18:37:41,354 WARN  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - No basic auth header in the request
2015-08-04 18:37:41,354 WARN  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - HTTP/1.1 401 Unauthorized
2015-08-04 18:37:41,611 INFO  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - Handling autodiscover request...
2015-08-04 18:37:41,617 INFO  [qtp509886383-288:https://127.0.1.1:8443/Autodiscover/Autodiscover.xml] [oip=134.170.52.123;] AutoDiscoverServlet - Response: <?xml version="1.0"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<User>
<DisplayName>admin</DisplayName>
<EmailAddress>admin@zimbra.io</EmailAddress>
<DeploymentId>dacff30e-ee1d-4b5e-98f1-037a6a45dbfd</DeploymentId>
</User>
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>EXCH</Type>
<EwsUrl>https://zimbra86.zimbra.io:8443/ews/Exchange.asmx</EwsUrl>
</Protocol>
</Account>
</Response>
</Autodiscover>

Configure the Mail Clients

Now that you have your Autodiscover properly configured, you can follow the next Articles to configure your Mail clients:

Identified Support/Known Issues

Known issues include the following bugs:

  • Bug 85262 - Admin: Add Appendix to Admin Guide which documents the various autodiscovery settings
Verified Against: ZCS 8.6, 8.5 Date Created: 08/04/2015
Article ID: https://wiki.zimbra.com/index.php?title=Autodiscover Date Modified: 2015-08-04



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Wiki/KB reviewed by Jorge SME2 Gayle B. Last edit by Jorge de la Cruz
Jump to: navigation, search