DeleteLongTermDelegationRule
Delete a long-term delegation rule.
Syntax
public void DeleteLongTermDelegationRule( int id )
Parameters
- id
- Type: System.Int32
Required. The identifier of the delegation rule.
Remarks
The current user is determined by the credentials of the user context specified when this method is invoked. If the credentials of the current user context cannot be determined, an error occurs. If the current user is not the user for which the delegation rule was added, an error occurs if the following requirements are not met:
-
The current user has site administrator permissions.
Specifically, the current user must have the following base permissions for the current SharePoint site: AddAndCustomizePages, BrowseDirectories, ManagePermissions, ManageWeb, Open, and ViewPages. For more information about SharePoint base permissions, see SPBasePermissions enumeration on Microsoft Developer Network.
-
The Allow site administrators to set long term delegation for other users global setting is set to Yes.
In addition, if the delegation rule is not defined on the same SharePoint web or SharePoint site as that of the current user, an error occurs.
Example
The following example demonstrates how to use this operation to delete a delegation rule.
Request
The following SOAP request attempts to delete a delegation rule with an identifier of 1.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:nin="http://nintex.com"> <soap:Header/> <soap:Body> <nin:DeleteLongTermDelegationRule> <nin:id>1</nin:id> </nin:DeleteLongTermDelegationRule> </soap:Body> </soap:Envelope>
Response
The following SOAP response indicates that the delegation rule was successfully deleted.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <DeleteLongTermDelegationRuleResponse xmlns="http://nintex.com"/> </soap:Body> </soap:Envelope>