开发者

Exchange Web Services (EWS) delete a RequiredAttendees from a meeting?

开发者 https://www.devze.com 2023-02-19 09:03 出处:网络
how I can delete a user from a meeting with XML? I have this code that delete all RequiredAttendees <?xml version=\"1.0\" encoding=\"utf-8\"?>

how I can delete a user from a meeting with XML?

I have this code that delete all RequiredAttendees

<?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>
    <UpdateItem MessageDisposition="SendAndSaveCopy" ConflictResolution="AutoResolve" SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy" 
                xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <ItemChanges>
        <t:ItemChange>
          <t:ItemId Id="AAALAGVkaUB...=" ChangeKey="DwAAABYAAA...."/>
          <t:Updates>
            <t:DeleteItemField>
              <t:FieldURI FieldURI="calendar:RequiredAttendees"/>
            </t:DeleteItemField>
          </t:Updates>
        </t:ItemChange>
      </ItemChanges>
    </UpdateItem>
  </soap:Body>
</soap:Envelope>

and this code to add a RequiredAttendee

<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>
    <UpdateItem MessageDisposition="SendAndSaveCopy" ConflictResolution="AutoResolve" SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy" 
                xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <ItemChanges>
        <t:ItemChange>
          <t:ItemId Id="AAALAGVkaUBlbGl...." ChangeKey="DwAAABYAAAC......"/>
          <t:Updates>
                    <t:AppendToItemField>
          <t:FieldURI FieldURI="calendar:RequiredAttendees" />
          <t:CalendarItem>
            <t:RequiredAttendees>
              <t:Attendee>
                <t:Mailbox>
                  <t:EmailAddress>user@localhost.comm</t:EmailAddress>
                </t:Mailbox>
              </t:Attendee>
            </t:RequiredAttendees>
          </t:CalendarItem>
        </t:AppendToItemField>
          </t:Updates>
        </t:ItemChange>
      </ItemChanges>
    </UpdateItem>
  </soap:Body>
</soap:Envelope>

both work perfectly for me, but I can not find a way to delete one used from the me开发者_开发问答eting and not all!

any help?


The answer here looks promising. Instead of being able to remove attendees, it seems that you have to update the attendees list with just the people you want.

You could also use the API.

0

精彩评论

暂无评论...
验证码 换一张
取 消