Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
Web Services
UserGroup Class
UserGroup Methods
 GetRoleInfo Method
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
UserGroup.GetRoleInfo Method (Users and Groups)
Returns information about the specified role definition.

Web Service: Users and GroupsWeb Reference: http://<Site>/_vti_bin/usergroup.asmx
Visual Basic (Declaration)
<SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/directory/GetRoleInfo", RequestNamespace:="http://schemas.microsoft.com/sharepoint/soap/directory/", ResponseNamespace:="http://schemas.microsoft.com/sharepoint/soap/directory/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function GetRoleInfo ( _
    roleName As String _
) As XmlNode
Visual Basic (Usage)
Dim instance As UserGroup
Dim roleName As String
Dim returnValue As XmlNode

returnValue = instance.GetRoleInfo(roleName)
C#
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/directory/GetRoleInfo", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/directory/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/directory/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public XmlNode GetRoleInfo (
    string roleName
)

Parameters

roleName

A string that contains the name of the role definition.

Return Value

An XML fragment in the following form that can be assigned to a System.Xml.XmlNode object.
Xml
<GetRoleInfo xmlns=
   "http://schemas.microsoft.com/sharepoint/soap/directory/">
   <Role ID="1073741830" Name="Role_Definition" Description="Description" 
      Type="0" />
</GetRoleInfo>

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

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

Dim ndGroup As System.Xml.XmlNode = usrgrpService.GetRoleInfo("Role_Definition_Name")

MessageBox.Show(ndGroup.OuterXml)
C#
Web_Reference_Folder_Name.UserGroup usrgrpService = new Web_Reference_Folder_Name.UserGroup();
usrgrpService.Credentials= System.Net.CredentialCache.DefaultCredentials;

System.Xml.XmlNode ndGroup = usrgrpService.GetRoleInfo("Role_Definition _Name");

MessageBox.Show(ndGroup.OuterXml);
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker