Permissions.RemovePermission method

Removes the specified permission from the list.

Namespace:  WebSvcPermissions
Assembly:  STSSOAP (in STSSOAP.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemovePermission", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub RemovePermission ( _
    objectName As String, _
    objectType As String, _
    permissionIdentifier As String, _
    permissionType As String _
)
'Usage
Dim instance As Permissions
Dim objectName As String
Dim objectType As String
Dim permissionIdentifier As String
Dim permissionType As String

instance.RemovePermission(objectName, _
    objectType, permissionIdentifier, _
    permissionType)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemovePermission", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/directory/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/directory/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void RemovePermission(
    string objectName,
    string objectType,
    string permissionIdentifier,
    string permissionType
)

Parameters

  • objectName
    Type: System.String

    A string that contains the name of the list.

  • permissionIdentifier
    Type: System.String

    A string that contains the name of the site group, the name of the cross-site group, or the user name (DOMAIN\User_Alias) of the user to whom the permission applies.

  • permissionType
    Type: System.String

    A string that specifies user, group (cross-site group), or role (site group).

Remarks

To access the Permissions service and its methods, set a Web reference to https://Server_Name/[sites/][Site_Name/]_vti_bin/Permissions.asmx.

Examples

The following code example removes the permission to a list for the specified user.

Dim permService As New Web_Reference_Folder_Name.Permissions()
permService.Credentials = System.Net.CredentialCache.DefaultCredentials

permService.RemovePermission("List_Name", "List", "Cross-site_Group", "group")
Web_Reference_Folder_Name.Permissions permService = new Web_Reference_Folder_Name.Permissions();
permService.Credentials= System.Net.CredentialCache.DefaultCredentials;

permService.RemovePermission("List_Name", "List", "Cross-site_Group", "group");

See also

Reference

Permissions class

Permissions members

WebSvcPermissions namespace