Search code examples
c#exchange-serverexchange-server-2010

MS Exchange server cloud, getting all items in a different


I am trying to figure out how to access all items from a 'room' account. Is it possible to somehow access the data from the room when that user isn't a real user?

I can get all rooms but the question is how to query the finditems using the room account.


Solution

  • You will need to authenticate as some user with a Mailbox and then grant that user access to the Room's Calendar (or the whole mailbox using Add-MailboxPermissions) or make it a delegate. Then you can just use the FolderId overload to specify you want to query that Room's Calendar folder eg

            FolderId RoomMailboxCalendarFolderId = new FolderId(WellKnownFolderName.Calendar, "[email protected]");
            CalendarView cvCalView = new CalendarView(DateTime.Now, DateTime.Now.AddDays(31));
            FindItemsResults<Appointment> appointments = service.FindAppointments(RoomMailboxCalendarFolderId, cvCalView);
    

    Cheers Glen