0
votes

I retrieve an appointment by its unique ID. Now I want to find out which mailbox it is in.

I tried using appointment.Organizer, but this does not work for meetings, or for normal appointments - since appointments can be moved around between mailboxes, the Organizer can be different from the user that has the appointment in his calendar.

Is there a function to get a folder, given only an appointment and an ExchangeService?

1

1 Answers

0
votes

If you want to get the SMTP address of the mailbox associated with a particular EWSId one way that should work is using convertId to convert the EWSId to a StoreId and just use generic mailbox address in the Mailbox field then the results you get back (if that ID is good) should contain the Mailbox its associated with eg

            String EWSId = "AQMkADY4ZDQ4M2UyLTRhYjItNDhkYy1hMG...";
        AlternateId aiRequest = new AlternateId();
        aiRequest.UniqueId = EWSId;
        aiRequest.Mailbox = "[email protected]";
        aiRequest.Format = IdFormat.EwsId;

        AlternateId aiResultsStore  = (AlternateId)service.ConvertId(aiRequest, IdFormat.StoreId);
        Console.WriteLine(aiResultsStore.Mailbox);

Cheers Glen