如何为我自己的公司电子邮件交换获取outlook free / busy rest api?

时间:2018-03-13 06:57:50

标签: outlook outlook-2010 outlook-restapi outlook-2013

我使用Microsoft Outlook作为客户端来查看我的邮件。

如何获取日历的特定用户空闲/忙碌详细信息的详细信息?

我怎么能看到其余的api?

我已经看过C#代码,并检查过。

Get appointments from coworker via EWS only with "Free / Busy time, subject, location" permission level

但我需要REST api。我检查了这个。

https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations#FindMeetingTimes

我如何在我的案例中实现这一点?

如果需要更多信息,请告诉我。

任何提示都表示赞赏。感谢

1 个答案:

答案 0 :(得分:0)

好的,我终于解决了这个问题。

让我告诉你如何做到这一点。

你需要做的两件事就是。

1)您的交换服务器网址

你可以通过这种方法得到它。 对于Exchange服务器URL,信用转到此URL。

https://support.neuxpower.com/hc/en-us/articles/202482832-Determining-the-Exchange-Web-Services-EWS-URL

我正在添加步骤

2. Use Microsoft Outlook (2007 and later) that connects to the same Exchange EWS Connector.

Hold the Ctrl key and right click on the Outlook Icon in the system tray
Select “Test E-mail Auto Configuration” from the menu
Type in an email address located on the desired Exchange server
Click Test
The URL is listed as 'Availability Service URL'

你有网址之后。

2)发送POST text \ xml请求

url https://--your-exchange-url--/EWS/Exchange.asmx

和来自此处的xml正文

https://msdn.microsoft.com/en-us/library/office/aa564001(v=exchg.150).aspx

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Body>
    <GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
                xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <t:TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
        <Bias>480</Bias>
        <StandardTime>
          <Bias>0</Bias>
          <Time>02:00:00</Time>
          <DayOrder>5</DayOrder>
          <Month>10</Month>
          <DayOfWeek>Sunday</DayOfWeek>
        </StandardTime>
        <DaylightTime>
          <Bias>-60</Bias>
          <Time>02:00:00</Time>
          <DayOrder>1</DayOrder>
          <Month>4</Month>
          <DayOfWeek>Sunday</DayOfWeek>
        </DaylightTime>
      </t:TimeZone>
      <MailboxDataArray>
        <t:MailboxData>
          <t:Email>
            <t:Address>user1@example.com</t:Address>
          </t:Email>
          <t:AttendeeType>Required</t:AttendeeType>
          <t:ExcludeConflicts>false</t:ExcludeConflicts>
        </t:MailboxData>
        <t:MailboxData>
          <t:Email>
            <t:Address>user2@example.com</t:Address>
          </t:Email>
          <t:AttendeeType>Required</t:AttendeeType>
          <t:ExcludeConflicts>false</t:ExcludeConflicts>
        </t:MailboxData>
      </MailboxDataArray>
      <t:FreeBusyViewOptions>
        <t:TimeWindow>
          <t:StartTime>2006-10-16T00:00:00</t:StartTime>
          <t:EndTime>2006-10-16T23:59:59</t:EndTime>
        </t:TimeWindow>
        <t:MergedFreeBusyIntervalInMinutes>60</t:MergedFreeBusyIntervalInMinutes>
        <t:RequestedView>DetailedMerged</t:RequestedView>
      </t:FreeBusyViewOptions>
    </GetUserAvailabilityRequest>
  </soap:Body>
</soap:Envelope>

希望这也适合你。

如果有任何问题请问我。我喜欢分享。