Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Removes permissions from the list for the specified members.
Namespace: [Permissions Web service]
Web service reference: http://Site/_vti_bin/Permissions.asmx
Syntax
'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemovePermissionCollection", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/", _
ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub RemovePermissionCollection ( _
objectName As String, _
objectType As String, _
memberIdsXml As XmlNode _
)
'Usage
Dim instance As Permissions
Dim objectName As String
Dim objectType As String
Dim memberIdsXml As XmlNode
instance.RemovePermissionCollection(objectName, _
objectType, memberIdsXml)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemovePermissionCollection", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/directory/",
ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/directory/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void RemovePermissionCollection(
string objectName,
string objectType,
XmlNode memberIdsXml
)
Parameters
objectName
Type: System.StringA string that contains the name of the list.
objectType
Type: System.StringA string that specifies List.
memberIdsXml
Type: System.Xml.XmlNodeAn XML fragment in the following format that specifies the permissions to remove and that can be passed as a System.Xml.XmlNode object:
<Members> <Member ID="ID1" /> <Member ID="ID2" /> . . . </Members>
Remarks
To access the Permissions service and its methods, set a Web reference to https://Server_Name/[sites/][Site_Name/]_vti_bin/Permissions.asmx. This example requires that a using (C#) or Imports (Microsoft Visual Basic) directive be included for the System.Xml namespace
Examples
The following code example removes a specified collection of permissions from a list. The example assumes the existence of a local XML file that specifies the IDs of members to remove, which are loaded into a System.Xml.XmlDocument object.
Dim permService As New Web_Reference_Folder_Name.Permissions()
permService.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim myDocument As New XmlDocument()
myDocument.Load("C:\\File_Name.xml")
Dim ndPermissions As XmlNode = myDocument.DocumentElement
permService.RemovePermissionCollection("List_Name", "List", ndPermissions)
Web_Reference_Folder_Name.Permissions permService = new Web_Reference_Folder_Name.Permissions();
permService.Credentials= System.Net.CredentialCache.DefaultCredentials;
XmlDocument myDocument = new XmlDocument();
myDocument.Load("C:\\\\File_Name.xml");
XmlNode ndPermissions = myDocument.DocumentElement;
permService.RemovePermissionCollection("List_Name", "List", ndPermissions);