This documentation is archived and is not being maintained.

GetPermissionCollection Method

SharePoint 2003

The GetPermissionCollection method of the Permissions service returns the collection of permissions for a site or list.

Parameters

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

objectType   A string that specifies either List or Web.

Return Value

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

<GetPermissionCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">
   <Permissions>
      <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" />
         .
         .
         .
</GetPermissionCollection>

Example

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

This example requires that a using (C#) or Imports (Visual Basic .NET) directive be included for the System.Xml namespace.

Requirements

Platforms: Microsoft Windows Server 2003

Web Reference: http://Server_Name/[sites/][Site_Name/]_vti_bin/Permissions.asmx

Show: