使用PowerShell,我可以通过执行Get-CalendarProcessing -Identity "ROOM_NAME" | Format-List命令轻松地了解房间中的“BookInPolicy”状态
但是问题是通过使用EWS管理API可以实现类似的功能。
我花了很多时间在互联网上探索这个问题,但不幸的是我什么也没发现。这真的可行吗?希望您能给我一些有用的建议或解决方案。

最佳答案

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

例如。通过发送以下 session 室日历请求

<?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>[email protected]</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>[email protected]</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>[email protected]</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>

08-28 03:03