getting autodiscover URL from Exchange email address

Posted by Anthony on Stack Overflow See other posts from Stack Overflow or by Anthony
Published on 2010-05-04T10:23:28Z Indexed on 2010/05/04 10:28 UTC
Read the original article Hit count: 773

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">
   <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.

© Stack Overflow or respective owner

Related posts about exchange-server

Related posts about exchangewebservices