查看完整版本: [-- 如何通过EWS-API 获取所有会议室的日历信息 --]

Exchange技术论坛 -> Exchange 二次开发 -> 如何通过EWS-API 获取所有会议室的日历信息 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

zhangyi 2015-08-03 18:16

如何通过EWS-API 获取所有会议室的日历信息

   大家好:
         有个业务需求就是通过一个权限账号获取到该域内所有的会议室的日历信息,目前通过ews-API 只能取到连接exchange的当前账号的日历信息,不知道有什么办法获取到所有会议室的日历信息?我看到exchange有日历共享的功能 ews-API 里面试了很久也没找到获取共享日历的办法?(exchange版本是2013)

         希望大家帮帮忙,多谢了!

xiaolanglong 2015-08-11 10:50
楼主您找到解决办法了吗,我也有个类似的问题,想跟您请教下,请问您知不知道如何获取到所有Exchange中用户的邮件地址呢,如aa@bb.com这样形式的,也是在当前用户下,我用的是EWS Java API 1.2 。

zengnan 2015-11-27 20:57
楼主,我需要你现有的:目前通过ews-API 只能取到连接exchange的当前账号的日历信息这个代码。可否分享一下

jquery_8023 2016-01-13 14:39
暂时没有,我这里2010的,都连接不上去!

liaoyungchun 2017-07-13 09:41
        /// <summary>
        /// 获取用户在某段时间内的所有会议。最长时间间隔为42天。
        /// </summary>
        /// <param name="startDate">要查询的开始时间。</param>
        /// <param name="endDate">要查询的结束时间</param>
        /// <param name="mailbox">要查询的邮箱日历,如果查询当前登录的用户的日历,可不填。</param>
        /// <returns>返回一个会议列表。列表对象不包含详细信息(如接受拒绝状态等),需使用<see cref="GetMeetingStatus"/> 方法获取。</returns>
        public List<Appointment> GetMeetings(DateTime startDate, DateTime endDate, string mailbox = null)
        {
            CalendarFolder calendar = null;

            if (mailbox == null)
            {
                calendar = CalendarFolder.Bind(Service, WellKnownFolderName.Calendar);
            }
            else
            {
                FolderId folderid = new FolderId(WellKnownFolderName.Calendar, mailbox);
                calendar = CalendarFolder.Bind(Service, folderid);
            }

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

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

            // Retrieve a collection of appointments by using the calendar view.
            FindItemsResults<Appointment> appointments = calendar.FindAppointments(cView);
            return appointments.Where(m => m.IsMeeting).ToList();
        }


查看完整版本: [-- 如何通过EWS-API 获取所有会议室的日历信息 --] [-- top --]



Powered by phpwind v8.7.1 Code ©2003-2011 phpwind
Time 0.055391 second(s),query:6 Gzip enabled