RemoveDelegate operation
The RemoveDelegate operation removes one or more delegates from a user's mailbox.
SOAP Headers
The RemoveDelegate operation can use the SOAP headers that are listed and described in the following table.
Header | Element | Description |
---|---|---|
Impersonation |
ExchangeImpersonation |
Identifies the user whom the client application is impersonating. |
MailboxCulture |
MailboxCulture |
Identifies the RFC3066 culture to be used to access the mailbox. |
RequestVersion |
RequestServerVersion |
Identifies the schema version for the operation request. |
ServerVersion |
ServerVersionInfo |
Identifies the version of the server that responded to the request. |
RemoveDelegate request example
Description
The following code example shows how to remove two delegates from user1's mailbox. In this example, one delegate is removed by using the delegate's primary SMTP address, and the other one is removed by using the delegate's security identifier (SID).
Code
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2007_SP1"/>
</soap:Header>
<soap:Body>
<RemoveDelegate xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
<Mailbox>
<t:EmailAddress>user1@example.com</t:EmailAddress>
</Mailbox>
<UserIds>
<t:UserId>
<t:PrimarySmtpAddress>user2@example.com</t:PrimarySmtpAddress>
</t:UserId>
<t:UserId>
<t:SID>S-1-5-21-1333220396-2200287332-232816053-1118</t:SID>
</t:UserId>
</UserIds>
</RemoveDelegate>
</soap:Body>
</soap:Envelope>
Comments
The RemoveDelegate operation does not require the specified delegate user to have a mailbox or to exist in the Active Directory directory service. The RemoveDelegate operation will succeed if the delegate entry is orphaned.
RemoveDelegate response example
Description
The following example of a RemoveDelegate response shows a successful response to a RemoveDelegate request. The response contains a DelegateUserResponseMessageType element for each delegate that is removed from the mailbox.
Code
<?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="Exchange2007_SP1"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />
</soap:Header>
<soap:Body>
<m:RemoveDelegateResponse xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
ResponseClass="Success"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>
<m:DelegateUserResponseMessageType ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
</m:DelegateUserResponseMessageType>
<m:DelegateUserResponseMessageType ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
</m:DelegateUserResponseMessageType>
</m:ResponseMessages>
</m:RemoveDelegateResponse>
</soap:Body>
</soap:Envelope>
RemoveDelegate Error response example
Description
The following example of a RemoveDelegate error response shows the results of a request to remove a delegate that does not exist.
Code
<?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="Exchange2007_SP1"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />
</soap:Header>
<soap:Body>
<m:RemoveDelegateResponse xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
ResponseClass="Success"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>
<m:DelegateUserResponseMessageType ResponseClass="Error">
<m:MessageText>The user is not a delegate for the mailbox.</m:MessageText>
<m:ResponseCode>ErrorNotDelegate</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
</m:DelegateUserResponseMessageType>
</m:ResponseMessages>
</m:RemoveDelegateResponse>
</soap:Body>
</soap:Envelope>
See also
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기