Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

UserGroup.GetUserCollectionFromWeb method

Returns information about the collection of users for the current Web site.

Namespace:  WebSvcUserGroup
Assembly:  STSSOAP (in STSSOAP.dll)
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/directory/GetUserCollectionFromWeb", RequestNamespace = "http://schemas.microsoft.com/sharepoint/soap/directory/", 
	ResponseNamespace = "http://schemas.microsoft.com/sharepoint/soap/directory/", 
	Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public XmlNode GetUserCollectionFromWeb()

Return value

Type: System.Xml.XmlNode
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="4" Sid="S-1-5-21-2127521184-1604012920-1887927527-34577" Name="User1_Display_Name" 
         LoginName="DOMAIN\User1_Alias" Email="User1_E-mail" 
         Notes="Notes" IsSiteAdmin="False" IsDomainGroup="False" />
      <User ID="5" Sid="S-1-5-21-2127521184-1604012920-1887927527-354403" Name="User2_Display_Name" 
         LoginName="DOMAIN\User2_Alias" Email="User2_E-mail" 
         Notes="Notes" IsSiteAdmin="False" IsDomainGroup="False" />
         .
         .
         .
   </Users>
</GetUserCollectionFromWeb>

The following code example displays information about the collection of users for the current Web site. This example requires that a using (Visual C#) or Imports (Visual Basic) directive be included for the System.Xml namespace.

Web_Reference_Folder_Name.UserGroup usrgrpService = new Web_Reference_Folder_Name.UserGroup();
usrgrpService.Credentials= System.Net.CredentialCache.DefaultCredentials;

XmlNode ndUsers = usrgrpService.GetUserCollectionFromWeb();

MessageBox.Show(ndUsers.OuterXml);
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.