1

I am trying to get full meeting details from a Conference Room meeting. The below code works fine for a user's calendar but when I change the calendar to the meeting room (resource calendar) it doesn't return all of the information (specifically the meeting "Subject" and "Body".

The user that I'm using (in the credentials portion) has "Discovery Management" role as well as "Full Access" to the room calendar yet this still seems to point to permissions.

I also tried to add the following impersonation with no success:

ImpersonatedUserId uidSMTP = new ImpersonatedUserId(ConnectingIdType.SmtpAddress,”MeetingRoom@Domain.com");
service.setImpersonatedUserId(uidSMTP);

Any ideas would be much appreciated!

ExchangeService service = new ExchangeService();
ExchangeCredentials credentials = new WebCredentials(“User@Domain.com", “Password”);
service.setCredentials(credentials);
service.setUrl(new URI("https://outlook.office365.com/EWS/Exchange.asmx"));
EmailAddress emAddr = new EmailAddress("MeetingRoom@Domain.com");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String td1 = "2015-12-23 15:00:00";
String td2 = "2015-12-23 23:00:00";
Date d1 = format.parse(td1);
Date d2 = format.parse(td2);
CalendarView cView = new CalendarView(d1,d2);
PropertySet prop = new PropertySet();
cView.setPropertySet(prop);
FolderId folderId = new FolderId(WellKnownFolderName.Calendar, new Mailbox(emAddr.getAddress()));
FindItemsResults<Appointment> findResults = service.findAppointments(folderId, cView);
ArrayList<Appointment> calItem = findResults.getItems();
PropertySet itemPropertySet = new PropertySet(BasePropertySet.FirstClassProperties); 
itemPropertySet.setRequestedBodyType(BodyType.Text);
int numItems = findResults.getTotalCount();
for (int i=0;i<numItems;i++) {
    Appointment Details = Appointment.bind(service, calItem.get(i).getId(),itemPropertySet);
    calItem.get(i).load();
    System.out.println(calItem.get(i).getOrganizer().getName());
    System.out.println(calItem.get(i).getStart());
    System.out.println(calItem.get(i).getEnd());
    System.out.println(calItem.get(i).getSubject());
    System.out.println(calItem.get(i).getDisplayTo());
    System.out.println(calItem.get(i).getLocation());
    System.out.println(Details.getBody());
}

1 Answers1

0

You might want to check the Meeting room yourself with Outlook as a security feature Exchange will change the Subject and remove the Body eg see https://technet.microsoft.com/en-us/library/dd335046(v=exchg.160).aspx and the aAddOrganizerToSubject and DeleteComments parameters which are enabled by default. This is to prevent sensitive meeting information from being accessed by anybody who has access to the Meeting room mailbox.

Cheers Glen

Glen Scales
  • 20,495
  • 1
  • 20
  • 23
  • Thanks Glen! This hasn't fixed my issue but did give me more items to consider. The subject still only shows the administrative user name and the body still shows empty. – user2867040 Dec 22 '15 at 14:04
  • Hi Glen, I found an inconsistency: When I go to the scheduling assistant in Outlook (O365) I am able to see room meetings BUT I cannot see them when just showing the calendar. Any idea what I'm missing? – user2867040 Dec 22 '15 at 19:48
  • Hi, I know this is 3 years later, but I am having very similar issues to what you had in 2015. Did you manage to find a solution to this? – dabarnard Feb 05 '19 at 06:27