UserGroup.GetUserInfo Method (Users and Groups)
UserGroup.GetUserInfo Method (Users and Groups)
Returns information about the specified user.

Web Service: Users and GroupsWeb Reference: http://<Site>/_vti_bin/usergroup.asmx
Syntax

'Usage

Dim instance As UserGroup
Dim userLoginName As String
Dim returnValue As XmlNode

returnValue = instance.GetUserInfo(userLoginName)

'Declaration

<SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/directory/GetUserInfo", RequestNamespace:="http://schemas.microsoft.com/sharepoint/soap/directory/", ResponseNamespace:="http://schemas.microsoft.com/sharepoint/soap/directory/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function GetUserInfo ( _
    userLoginName As String _
) As XmlNode

Parameters

userLoginName

A string that contains the user name (DOMAIN\User_Alias) of the user.

Return Value

An XML fragment in the following form that can be assigned to a System.Xml.XmlNode object.
<GetUserInfo xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">
   <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" />
</GetUserInfo>
Example

The following code example displays information about the specified user. This example requires that a using (Visual C#) or Imports (Visual Basic) directive be included for the System.Xml namespace.

Dim usrgrpService As New Web_Reference_Folder_Name.UserGroup()
usrgrpService.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim ndUser As XmlNode = usrgrpService.GetUserInfo("DOMAIN\User_Alias")

MessageBox.Show(ndUser.OuterXml)
See Also

© 2010 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View