getting autodiscover URL from Exchange email address
Asked Answered
F

2

18

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 typically use the same sub-domain as the Outlook Web Access address, I thought I'd see if the same were true for autodiscovery URLS. Since the OWA URL is:

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

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 the autodiscover settings must be available without knowing the OWA URL, 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.

Fortran answered 4/5, 2010 at 10:23 Comment(0)
F
13

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.

Fortran answered 4/5, 2010 at 19:54 Comment(3)
I kinda have a newb question . If the autodiscovery service is down . Does that mean the data cannot be accessed from the exchange server ?Equerry
I'm not sure if that's newb or not. Exchange and the various services associated with it are a barrel of headaches (should be Microsoft's slogan). I know that admins enable autodiscover and therefore can disable it as well, so not being able to reach the autodiscover doesn't mean the Exchange server is down. But it could be, of course. If you know the OWA address of the server, try going to that. If it's working, the server is fine.Fortran
That link now says: "The document is archived and information here might be outdated"Darryldarryn
I
0

I am also facing a similar kind of issue the error i am getting is Autodiscover blocked a potentially insecure redirection to https://autodiscover.uhc.com/autodiscover/autodiscover.xml

i have migrated my Job to newer version of dotnet that is 8.0 and similarly other compatible ef core versions but Microsoft.Exchange.WebServices.dll is still 2.2.0 version i am not sure if this what causing the issue

Inarch answered 7/8 at 7:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.