Troubleshooting Autodiscover

There are often problems reported by users related to connectivity or you just setup your lab and want to know if you configured everything correct. But even when you double-checked and everything looks okay you might want to see what Autodiscover returns for a given user. Maybe not only for a given user, maybe just the result from one specific server or when you have larger environments from servers within a specific AD site.

Of course you can use Outlook and run “Test E-Mail AutoConfiguration”, but for this you need to have Outlook installed. Outlook on a server? Might not be a good idea and anyways not supported to have Outlook installed on an Exchange server.

If you want to send a request to Autodiscover service you can choose between two services:

  • POX, which is the older version
  • SOAP, which is the latest version

The main difference is that POX is returning always the complete configuration for a client, while with SOAP you can query individual elements/parts of clients configuration. Besides this POX can send 2 special headers:

  • X-MapiHttpCapability: If present and set to “1”, indicates that the client is requesting information that can be used to connect to the server by using the MAPI/HTTP protocol. This header is applicable to clients that implement the MAPI/HTTP protocol
  • X-ClientCanHandle: This header contains a comma-delimited list of capabilities that the client supports:
    • Negotiate  (min. server version 15.00.0995.014)
    • ExHttpInfo (min. server version 15.00.0995.014)

Now that we know the basics we can build our own request and parse the result. Therefore I wrote a script, which accepts the following parameters:

EmailAddress

This parameter is mandatory as we need at least an address to send a valid request

Server

If you want to have the request send to a specific server or endpoint this is your choice. Otherwise the script will extract the domain part from the given address and use “autodiscover + domain” as endpoint (e.g.:”autodiscover.adatum.com” for the address “trick@adatum.com”)

Credentials

In case you want to use different credential than the one you are logged on

MapiHttp

Here you tell AutoD that you are capable of using the new protocol. This switch could only be combined with a POX request

SOAP

Sending a SOAP request instead of a POX

FromAD

If you want to query AD in order to get your Autodiscover endpoint instead of using “autodiscover + domain”, then use this switch. The script will search AD for SCP

ADSite

In case you have multiple sites and want to query a specific one. Could be combined only with FromAD

Timeout

Here you can define the timeout of the request. Default is 20 seconds

POP3IMAP4

If this switch is used you will get also the IMAP/POP3 settings

Note: The only requirement for the script is PS3.0 as it uses the CmdLet Invoke-WebRequest!

Now you can query Autodiscover:

AutoD01

Alternative mailboxes like Delegates or PF could be found on the bottomAutoD02Here you can see the difference of the InternalURL/ExternalURL when using MapiHttp

AutoD03

And here is the result from a SOAP request

AutoD04

The IMAP/POP settings when using switch POP3IMAP4

AutoD05

But what about mobile clients? Well there is also a script available using POX, but a different schema. This script accepts only 3 parameters:

EmailAddress

This parameter is mandatory as we need at least an address to send a valid request

Server

If you want to have the request send to a specific server or endpoint this is your choice. Otherwise the script will extract the domain part from the given address and use “autodiscover + domain” as endpoint (e.g.:”autodiscover.adatum.com” for the address “trick@adatum.com”)

Credentials

In case you want to use different credential than the one you are logged on

AutoDMobile

Both scripts are available here:

Get-AutoD.ps1

Get-AutoDMobile.ps1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s