none
Accessing a shared calendar using EWS Managed API?

    Question

  • Howdy,

    I recently discovered the EWS Managed API and was impressed at how quickly I was able to get up and running to access calendar data via the API. One thing I haven't been able to figure out how to do, however, is access shared calendar data (i.e. a calendar for another Exchange user who's granted me access to view it. It shows up in OWA in the "People's Calendars" list).

    Anyone have any quick little code snippets they can share for how to do this? Thanks!

    Neil

    Tuesday, April 06, 2010 5:58 AM

Answers

  • Just specify the Id of the folder to access the following way:

    FolderId folderToAccess = new FolderId(WellKnownFolderName.Calendar, "<email address of shared calendar>");

    In a FindAppointments call, that would look like:

    service.FindAppointments(new FolderId(WellKnownFolderName.Calendar, "<email address of shared calendar>"), calendarView);

    David Claux | Program Manager - Exchange Web Services
    • Proposed as answer by David Claux - MSFT Tuesday, April 06, 2010 11:07 PM
    • Marked as answer by Neil Enns Wednesday, April 07, 2010 1:03 AM
    Tuesday, April 06, 2010 11:07 PM

All replies

  • You can supply the sharing mailbox's email address when you specify the distinguishedfolderid.  Something like this:

    http://www.leederbyshire.com/EWS-FindItem-Other-Mailbox-Exchange-2007.asp


    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m
    Tuesday, April 06, 2010 1:31 PM
  • Just specify the Id of the folder to access the following way:

    FolderId folderToAccess = new FolderId(WellKnownFolderName.Calendar, "<email address of shared calendar>");

    In a FindAppointments call, that would look like:

    service.FindAppointments(new FolderId(WellKnownFolderName.Calendar, "<email address of shared calendar>"), calendarView);

    David Claux | Program Manager - Exchange Web Services
    • Proposed as answer by David Claux - MSFT Tuesday, April 06, 2010 11:07 PM
    • Marked as answer by Neil Enns Wednesday, April 07, 2010 1:03 AM
    Tuesday, April 06, 2010 11:07 PM
  • Thanks David, that's pretty much what I noodled out given Lee's pointer. Took me a while to figure out how to set up a view with from/to date range on it, but I got that set up as well. Thanks for the help!

    Neil

    Wednesday, April 07, 2010 1:03 AM
  • Just out of curiousity, what was difficult in setting up the view?
    David Claux | Program Manager - Exchange Web Services
    Wednesday, April 07, 2010 3:39 AM
  • The documentation is atrocious :) I find the API reference pretty much useless, and there are very few blog entries out in the world that show how to do things with the Managed API instead of using the XML directly.

    Neil

    Wednesday, April 07, 2010 5:27 AM
  • Hi

    I have a similar problem, but I need to get a list of all shared calendars on an Exchange Server 2010. I'm using the managed api as well. It works fine, the way it is described here, when I know the user who shares his calendar with me. But what if i don's have a list with all the users on an exchange who gave free theire calendars?

    Angelo

    Friday, February 17, 2012 1:00 PM