views:

509

answers:

1

I'm starting with an address for an Exchange 2007 server:

[email protected]

And I attempted to send an autodiscover request, as documented at MSDN.

I attempted to use the generic autodiscover address documented at the TechNet White Paper.

So, using curl on PHP, I sent the following request:

<Autodiscover 
 xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"&gt;
   <Request>
     <EMailAddress>[email protected]</EMailAddress>
     <AcceptableResponseSchema>
       http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
    </AcceptableResponseSchema>
   </Request>
 </Autodiscover>

to the following URL:

https://domain.exchangeserver.org/autodiscover/autodiscover.xml

But got no response, just an eventual timeout.

I also tried:

https://autodiscover.domain.exchangeserver.org/autodiscover/autodiscover.xml

With the same result.

Now, since my larger goal is to use Autodiscover with Exchange Web Services, and since all of the EWS URLs start with the same sub-domain as the Outlook Web Access address, I thought I'd give that a try:

OWA:  https://wmail.domain.exchangeserver.org

So I tried:

https://wmail.domain.exchangeserver.org/autodiscover/autodiscover.xml

And sure enough, I got back the expected response.

However, I only knew the OWA sub-domain because it's the server I have access to and that I'm using to test everything. I would not know it for sure or be able to guess it if this were a live app and the user was entering in their own Exchange email.

I know that whatever generic autodiscover settings must be turned on, because I can enter:

[email protected]

into Apple Mail on Snow Leopard and it finds everything without trouble.

So the question is...

  1. Should https://domain.exchangeserver.org/autodiscover/autodiscover.xml have worked, and I just missed a step when trying to connect to it? Or,

  2. Is there some trick (maybe involving pinging the email address?) that Apple Mail and other clients use to resolve the address to the OWA subdomain before sending the autodiscover request?

Thanks to anyone who knows or can take a wild guess.

A: 

After a bit more banging my head against the Google, I found the following very helpful article on MSDN:

http://msdn.microsoft.com/en-us/library/ee332364.aspx

Specifically the section "Calling Autodiscover"

I'm still trying to figure out how to do a Active Directory Service Connection Point search via LDAP, but step 4, for my server at least, worked like a charm:

The application sends an unauthenticated GET request to http://autodiscover.contoso.com/autodiscover/autodiscover.xml. (Note that this is a non-SSL endpoint).

If the GET request returns a 302 redirect response, it gets the redirection URL from the Location HTTP header, and validates it as described in the section “Validating a Potentially Unsafe Redirection URL” later in this article.

Sure enough, a request sent to:

http://domain.exchangeserver.org/autodiscover/autodiscover.xml

sent back a 302 redirect URL:

https://wmail.domain.exchangeserver.org/autodiscover/autodiscover.xml

But this article gives a series of steps, so anyone wanting to implement autodiscover for an Exchange client has 5 things to try before giving up.

Anthony