Permissions.GetPermissionCollection method

Returns the collection of permissions for a site or list.

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


<SoapDocumentMethodAttribute("", RequestNamespace := "",  _
    ResponseNamespace := "",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetPermissionCollection ( _
    objectName As String, _
    objectType As String _
) As XmlNode
Dim instance As Permissions
Dim objectName As String
Dim objectType As String
Dim returnValue As XmlNode

returnValue = instance.GetPermissionCollection(objectName, _
[SoapDocumentMethodAttribute("", RequestNamespace = "", 
    ResponseNamespace = "", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public XmlNode GetPermissionCollection(
    string objectName,
    string objectType


  • objectName
    Type: System.String

    A string that contains the name of the list or site.

  • objectType
    Type: System.String

    A string that specifies either List or Web.

Return value

Type: System.Xml.XmlNode
An XML fragment in the following form that can be assigned to a System.Xml.XmlNode object:

<GetPermissionCollection xmlns="">
      <Permission MemberID="1073741829" Mask="-1" MemberIsUser="False" MemberGlobal="False" 
         RoleName="Administrator" />
      <Permission MemberID="1073741828" Mask="1029638927" MemberIsUser="False" MemberGlobal="False" 
         RoleName="Web Designer" />
      <Permission MemberID="1073741827" Mask="1027801615" MemberIsUser="False" MemberGlobal="False" 
         RoleName="Contributor" />
      <Permission MemberID="1073741826" Mask="138608641" MemberIsUser="False" MemberGlobal="False" 
         RoleName="Reader" />
      <Permission MemberID="1073741825" Mask="134283264" MemberIsUser="False" MemberGlobal="False" 
         RoleName="Guest" />
      <Permission MemberID="1073741830" Mask="134414337" MemberIsUser="False" MemberGlobal="False" 
         RoleName="Site_Group1" />
      <Permission MemberID="1073741831" Mask="134283265" MemberIsUser="False" MemberGlobal="False" 
         RoleName="Site_Group2" />


To access the Permissions service and its methods, set a Web reference to http://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.


The following code example displays the set of permissions for a specified list on the current site.

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

Dim ndPermissions As XmlNode = permService.GetPermissionCollection("List_Name", "List")

Web_Reference_Folder_Name.Permissions permService = new Web_Reference_Folder_Name.Permissions();
permService.Credentials= System.Net.CredentialCache.DefaultCredentials;

XmlNode ndPermissions = permService.GetPermissionCollection("List_Name","List");


See also


Permissions class

Permissions members

WebSvcPermissions namespace