使用EWS API获取会议敏感度数据

问题描述 投票:1回答:1

我们从outlook创建会议,并将会议设置为私有。但是当使用Exchange服务器API(EWS托管API)时,我们无法检索该信息,会议始终设置为“正常”,而不是“私有”。 Exchange Server中是否有任何设置阻止读取会议的敏感属性?或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中是私有的,它也总是读作“正常”。

exchangewebservices
1个回答
0
投票

最有可能发生这种情况是因为您尝试从中检索约会的邮箱上的默认设置请参阅https://technet.microsoft.com/en-us/library/dd335046(v=exchg.160).aspx

RemovePrivateProperty参数指定是否清除传入会议请求的私有标志。此参数的有效输入为$ true或$ false。默认值为$ true。默认情况下,将清除传入会议请求的私有标志。为确保组织者在原始请求中发送的私有标志保持指定状态,请将此参数设置为$ false。

© www.soinside.com 2019 - 2024. All rights reserved.