Export (0) Print
Expand All

4.2 GetDelegate Operation

The following code example shows how to retrieve the delegate settings for all the delegates that are set on user3's mailbox. All the permissions for each user are returned in the response.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2013"/>
  </soap:Header>
  <soap:Body>
    <GetDelegate xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
                 xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
                 IncludePermissions="true">
      <Mailbox>
        <t:EmailAddress>user3@example.com</t:EmailAddress>
      </Mailbox>
    </GetDelegate>
  </soap:Body>
</soap:Envelope>

The following example of a GetDelegate response shows a successful response to a GetDelegate request. The response contains information about the delegate access permissions, whether the delegate can view private items, whether the delegate receives copies of meeting messages, and to whom meeting requests were delivered.

<?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:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <t:ServerVersionInfo MajorVersion="8" 
             MinorVersion="1" 
             MajorBuildNumber="206" 
             MinorBuildNumber="0" 
             Version="Exchange2013" 
             xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"/>
  </soap:Header>
  <soap:Body>
    <tns:GetDelegateResponse
           xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" 
           ResponseClass="Success" 
           xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
      <tns:ResponseCode>NoError</tns:ResponseCode>
      <tns:ResponseMessages>
        <tns:DelegateUserResponseMessageType ResponseClass="Success">
          <tns:ResponseCode>NoError</tns:ResponseCode>
          <tns:DelegateUser>
              <t:UserId>
                <t:SID>S-1-5-21-1333220396-2200287332-232816053-1116</t:SID>
                <t:PrimarySmtpAddress>User1@example.com</t:PrimarySmtpAddress>
                <t:DisplayName>User1</t:DisplayName>
              </t:UserId>
              <t:DelegatePermissions>
                <t:CalendarFolderPermissionLevel>Author</t:CalendarFolderPermissionLevel>
                <t:ContactsFolderPermissionLevel>Reviewer</t:ContactsFolderPermissionLevel>
              </t:DelegatePermissions>
              <t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>
            <t:ViewPrivateItems>false</t:ViewPrivateItems>
            </tns:DelegateUser>
          </tns:DelegateUserResponseMessageType>
      </tns:ResponseMessages>
      <tns:DeliverMeetingRequests>DelegatesAndMe</tns:DeliverMeetingRequests>
      </tns:GetDelegateResponse>
  </soap:Body>
</soap:Envelope>
Show:
© 2014 Microsoft