2017-08-28 71 views
1

我們從outlook創建會議,並將會議設置爲私人會議。但是,當使用Exchange服務器API(EWS託管API)時,我們無法檢索該信息,會議始終設置爲「正常」,而不是「私人」。 Exchange Server中是否存在阻止閱讀會議敏感屬性的設置?或者是否有API的要求來獲得該設置? 下面是示例代碼:使用EWS API獲取會議敏感數據

DateTime startDate = DateTime.Now.AddDays(-1); 
DateTime endDate = DateTime.Now.AddDays(1); 
const int NUM_APPTS = 15; 

// Initialize the calendar folder object with only the folder ID. 
FolderId CalendarFolderIdVal = new FolderId(WellKnownFolderName.Calendar, "[email protected]"); 
CalendarFolder calendar = CalendarFolder.Bind(service, CalendarFolderIdVal, new PropertySet()); 

// Set the start and end time and number of appointments to retrieve. 
CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS); 

// Limit the properties returned to the appointment's subject, start time, and end time. 
cView.PropertySet = new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End,AppointmentSchema.Sensitivity); 

// Retrieve a collection of appointments by using the calendar view. 
FindItemsResults<Appointment> appointments = calendar.FindAppointments(cView); 
通過任命循環時

,甚至會在Outlook中私人的,它總是讀爲「正常」。

回答

0

最有可能的,這是因爲郵箱的默認設置的情況發生,你正在試圖檢索約會見https://technet.microsoft.com/en-us/library/dd335046(v=exchg.160).aspx

的RemovePrivateProperty參數指定是否要清除私有標誌傳入會議請求。此參數的有效輸入是$ true或$ false。默認值是$ true。 默認情況下,傳入會議請求的私有標誌被清除。爲確保組織者在原始請求中發送的私有標誌保持指定狀態,請將tthis參數設置爲$ false。

+0

是的,「RemovePrivateProperty」設置解決了這個問題。謝謝!狹谷 –