繁体   English   中英

EWS Managed api 中是否有类似于 PowerShell 中的 Get-CalendarProcessing 方法的方法?

[英]Is there a method in EWS Managed api similar to Get-CalendarProcessing method in PowerShell?

使用 PowerShell,我可以通过执行命令Get-CalendarProcessing -Identity "ROOM_NAME" | Format-List轻松了解房间中的“BookInPolicy”状态Get-CalendarProcessing -Identity "ROOM_NAME" | Format-List Get-CalendarProcessing -Identity "ROOM_NAME" | Format-List但问题是通过使用 EWS 管理 api 执行类似的操作。 我花了很多时间在互联网上探索这个问题,不幸的是我一无所获。 真的可以做到吗? 我希望你给我一些有用的建议或解决方案。

通过使用 GetUserConfiguration EWS 请求,您可以获得一些 BookInPolicy 信息。

例如,通过发送以下对会议室日历的请求

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010_SP2"/>
  </soap:Header>
  <soap:Body>
    <m:GetUserConfiguration>
      <m:UserConfigurationName Name="Calendar">
        <t:DistinguishedFolderId Id="calendar">
          <t:Mailbox>
            <t:EmailAddress>room@company.com</t:EmailAddress>
          </t:Mailbox>
        </t:DistinguishedFolderId>
      </m:UserConfigurationName>
      <m:UserConfigurationProperties>All</m:UserConfigurationProperties>
    </m:GetUserConfiguration>
  </soap:Body>
</soap:Envelope>

您将获得包含(除其他外)以下两个字段的信息字典

<t:DictionaryEntry>
  <t:DictionaryKey>
    <t:Type>String</t:Type>
    <t:Value>AllBookInPolicy</t:Value>
  </t:DictionaryKey>
  <t:DictionaryValue>
    <t:Type>Boolean</t:Type>
    <t:Value>false</t:Value>
  </t:DictionaryValue>
</t:DictionaryEntry>
<t:DictionaryEntry>
  <t:DictionaryKey>
    <t:Type>String</t:Type>
    <t:Value>BookInPolicy</t:Value>
  </t:DictionaryKey>
  <t:DictionaryValue>
    <t:Type>StringArray</t:Type>
    <t:Value>75480a35-de48-46ad-8378-7c66137de736</t:Value>
    <t:Value>498e21e9-1d88-4254-bea0-8d976c3e451d</t:Value>
    <t:Value>08ffb1dd-64b8-438f-a924-ac3782975abf</t:Value>
  </t:DictionaryValue>
</t:DictionaryEntry>

缺点是我不知道如何查询为 BookInPolicy 收到的 ID。

可以通过 GetFolder 请求获取一些权限信息

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010_SP2"/>
  </soap:Header>
  <soap:Body>
    <m:GetFolder>
      <m:FolderShape>
        <t:BaseShape>AllProperties</t:BaseShape>
      </m:FolderShape>
      <m:FolderIds>
        <t:DistinguishedFolderId Id="calendar">
          <t:Mailbox>
            <t:EmailAddress>room@company.com</t:EmailAddress>
          </t:Mailbox>
        </t:DistinguishedFolderId>
      </m:FolderIds>
    </m:GetFolder>
  </soap:Body>
</soap:Envelope>

并查看返回的权限集,但我没有找到将权限信息连接到 BookInPolicy ID 的任何方法。 (下面的示例许可)

<t:CalendarPermission>
  <t:UserId>
    <t:SID>S-1-5-21-799214634-780288877-1039276024-11759</t:SID>
    <t:PrimarySmtpAddress>group@company.com</t:PrimarySmtpAddress>
    <t:DisplayName>group</t:DisplayName>
  </t:UserId>
  <t:CanCreateItems>false</t:CanCreateItems>
  <t:CanCreateSubFolders>false</t:CanCreateSubFolders>
  <t:IsFolderOwner>false</t:IsFolderOwner>
  <t:IsFolderVisible>true</t:IsFolderVisible>
  <t:IsFolderContact>false</t:IsFolderContact>
  <t:EditItems>None</t:EditItems>
  <t:DeleteItems>None</t:DeleteItems>
  <t:ReadItems>FullDetails</t:ReadItems>
  <t:CalendarPermissionLevel>Reviewer</t:CalendarPermissionLevel>
</t:CalendarPermission>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM