GetAllUserCollectionFromWeb Method

The GetAllUserCollectionFromWeb method of the Users and Groups service returns information about the collection of users for the current site.

Return Value

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

<GetUserCollectionFromWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">
   <Users>
      <User ID="9" Sid="S-1-5-21-2127521184-1604012920-1887927527-207153"
         Name="User1_Display_Name" LoginName="DOMAIN\User1_Alias"
         Email="User1_E-mail" Notes="Notes" IsSiteAdmin="False" IsDomainGroup="False" />
      <User ID="10" Sid="S-1-5-21-2127521184-1604012920-1887927527-4270"
         Name="User2_Display_Name" LoginName="DOMAIN\User2_Alias"
         Email="User2_E-mail" Notes="Notes" IsSiteAdmin="False" IsDomainGroup="False" />
         .
         .
         .
   </Users>
</GetUserCollectionFromWeb>

Example

The following code example displays information about the collection of users for 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/UserGroup.asmx