1
votes

I'm currently developing an EWS client application under iOS, so I'm using the Exchange Web Services for communicating with the Exchange 2010 server (plain XML as opposed to the managed API). I am aware how to access the mailbox and calendar of a delegate and grant or delete delegate access to a mailbox, but before accessing I need to find these mailboxes first. That is, I want to find all mailboxes which my current user has access to (as opposed to all users who have access to the current mailbox, which is well-documented).

This question from 2011 (EWS API Delegate List) indicates that there is no possibility, but without providing any references. I have not found any resources and no hints in the documentation, but Outlook easily identifies these mailboxes. Maybe it is using some internal API, I was unable to find the corresponding requests in its communication with the server.

How can I find these mailboxes? Or is there still no way of achieving this, assuming the answer from 2011 was correct? If so, how does Outlook manage to do this?

1

1 Answers

1
votes

There are a few ways in which you maybe granted access to another users Mailbox, one method is via Outlook Delegates which basically modifies the Folder Ace's and also the FreeBusy object in the users Mailbox. The other method if the Admin Grants a somebody full access to a Mailbox using Add-MailboxPermission and then allows AutoMapping http://www.msexchange.org/articles-tutorials/exchange-server-2010/management-administration/mailbox-auto-mapping-exchange-server-2010-part1.html of the Mailbox. This mean Outlook will automatically connect the Mailbox as an additional Mailbox.

So to find Mailboxes that your user will Automap you can use Autodiscover and the Mailbox will be returned in the AdditionalMailboxes eg

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscove
r" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:xsi="http://www.w3.org
/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <a:RequestedServerVersion>Exchange2010_SP2</a:RequestedServerVersion>
    <wsa:Action>http://schemas.microsoft.com/exchange/2010/Autodiscover/Autodiscover/GetUserSettings</wsa:Action>
    <wsa:To>https://autodiscover-s.outlook.com/autodiscover/autodiscover.svc</wsa:To>
  </soap:Header>
  <soap:Body>
    <a:GetUserSettingsRequestMessage xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscover">
      <a:Request>
        <a:Users>
          <a:User>
            <a:Mailbox>[email protected]</a:Mailbox>
          </a:User>
        </a:Users>
        <a:RequestedSettings>
          <a:Setting>AlternateMailboxes</a:Setting>
        </a:RequestedSettings>
      </a:Request>
    </a:GetUserSettingsRequestMessage>
  </soap:Body>
</soap:Envelope>

For Outlook delegates its a little different story if some random user adds you as a delegate (and doesn't send you the summary) or let you know nothing will happen and Outlook won't show or know about this. However if you do know that somebody has delegated you access to their calendar for example and then you open that calendar in Outlook the first time you do this it will add a Wonderbar (Navigational) shortcut https://msdn.microsoft.com/en-us/library/ee202589(v=exchg.80).aspx that Outlook (and OWA) will then use in the future to show this calendar by default. You can make use of these Nav shortcuts in a mailbox by querying them in the CommonViews Folder eg EWS - Access All Shared Calendars . (note if you where using the new REST API in Office365 you can now do this natively in the API)