EWS Autodiscover endpoints

Viewed 102

I need to get value for X-AnchorMailbox and X-PublicFolderMailbox header for public folder requests. I was using both of those articles first and second to retrieve values for headers but a problem happened during autodiscover process.

To send autodiscover request I use derived endpoint because i write my application in C++ and use only SOAP/POX requests to retrieve any data from EWS. If i understood correctly this kind of endpoints should be derived from user's e-mail address. So if the user has address user@test.onmicrosoft.com one of the endpoints should be https://test.onmicrosoft.com/autodiscover/autodiscover.xml (for POX). But this endpoint doesn`t work at all.

Is there any way to get correct endpoint or other ways to retrieve values for headers?

1 Answers

There are multiple endpoints (https and http redirect). Plus the endpoints from AD and DNS.

Start at Autodiscover for Exchange

In your particular case (redirect to a hosted M365 mailbox), you will most likely end up going through the unsecured (http://autodiscover.YourDomain.demo/autodiscover/autodiscover.xml) redirect (301, 302, 307, 308) to https://outlook.office365.com/autodiscover/autodiscover.xml

You can also see autodiscover steps if you try the connectivity analyzer at https://testconnectivity.microsoft.com/tests/Ola/input

Related