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.
The GetRoleCollection method of the Users and Groups service returns information about the specified collection of site groups for the current site.
Parameters
roleNamesXml A System.Xml.XmlNode object that specifies one or more site group names in the following form:
<Roles>
<Role RoleName="Site_Group1"/>
<Role RoleName="Site_Group2"/>
.
.
.
</Roles>
Return Value
An XML fragment in the following form that can be assigned to a System.Xml.XmlNode object:
<GetRoleCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">
<Roles>
<Role ID="1073741830" Name="Site_Group1" Description="Description" Type="0" />
<Role ID="1073741831" Name="Site_Group2" Description="Description" Type="0" />
.
.
.
</Roles>
</GetRoleCollection>
Example
The following code example displays information about specified site groups on a site. The example assumes the existence of a local XML file that contains the names of the groups, which are loaded into a System.Xml.XmlDocument object.
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/UserGroup.asmx