1

会議室の会議から完全な会議の詳細を取得しようとしています。以下のコードはユーザーのカレンダーに対しては正常に機能しますが、カレンダーを会議室 (リソース カレンダー) に変更すると、すべての情報 (具体的には会議の「件名」と「本文」) が返されません。

私が使用しているユーザー (資格情報部分) には、ルーム カレンダーへの "Discovery Management" ロールと "Full Access" がありますが、これはまだアクセス許可を指しているようです。

また、次の偽装を追加しようとしましたが、成功しませんでした:

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

どんなアイデアでも大歓迎です!

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());
}
4

1 に答える 1