EWS:访问共享日历 [英] EWS: Access shared calendars

查看:729
本文介绍了EWS:访问共享日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用Exchange Web服务访问日历数据,但我不知道如何访问其他用户不是默认日历时共享的日历。假设我公司的另一个用户创建了共享日历并与我共享,我甚至不能找到日历文件夹,更不用说获取其中的项目。

I am trying to use Exchange Web Services to access calendar data, but I can't seem to figure out how to access calendars which have been shared by other users when it is not their default calendar. Assuming another user in my company created a shared calendar and shared it with me, I can't even find the calendar folder, let alone get the items within it.

答案可以是EWS管理的API(版本1.0或1.1),直接的服务对象,甚至是需要的SOAP消息的XML主体发送到服务器。我只需要一些起点。

The answers can be in terms of the EWS Managed API (version 1.0 or 1.1), the service objects directly, or even just the XML body of the SOAP message that needs to be sent to the server. I just need some kind of starting point. Any help would be greatly appreciated.

推荐答案

这是我设法做到的:

Dim _cal As New Microsoft.Exchange.WebServices.Data.FolderId(Microsoft.Exchange.WebServices.Data.WellKnownFolderName.Calendar, New Microsoft.Exchange.WebServices.Data.Mailbox(_otherAddress))
Dim _calendarView As New Microsoft.Exchange.WebServices.Data.CalendarView(_startTime.Date, _endTime.Date.AddDays(1))

For Each appointmentItem As Microsoft.Exchange.WebServices.Data.Appointment In _
    service.FindAppointments( _
    _cal, _
    _calendarView)
Next

注意:这只适用于默认日历,因为这是我需要的所有内容。

Note: this only works for the default calendar as that is all I needed for my requirements

非默认日历,您是否已查看 ExchangeService.FindFolders 方法,我没有尝试,但这可能不需要root收件箱访问。

For non-default calendars, have you looked into the ExchangeService.FindFolders method, I have not tried but this might not require root inbox access.

这篇关于EWS:访问共享日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆