I'm using the EWS Java API to hit our Exchange server. I would like to use autodiscover, but the autodiscover
service is on a subdomain (mail.mycompany.com instead of mycompany.com), and our email addresses are on the domain (user@mycompany.com). Is there a way, short of changing the source to accept that host, to tell the ExchangeService object to look for the autodiscover
service on the subdomain, rather than assume it's on the exact same domain as the email address?
You can first form autodiscover URL based on some prefix like in your case "mail" and primary SMTP address domain of mailbox to be autodiscovered (concatanate both to make combined URL as you like), and then send autodiscover request on that URL.
additionally, please make sure that the autodiscover URL you are forming based on your need as I mentioned in my earlier reply, points/directs to respective exchange Client Access Server which can respond to autodiscover requests with requested information.
Proposed as answer byNimeshkumar PatelTuesday, February 26, 2013 10:05 AM