UserGroup.GetRoleInfo Method

Returns information about the specified role definition.

Namespace:  [UserGroup Web service]
Web service reference: http://Site/_vti_bin/UserGroup.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/GetRoleInfo", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetRoleInfo ( _
    roleName As String _
) As XmlNode
'Usage
Dim instance As UserGroup
Dim roleName As String
Dim returnValue As XmlNode

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

Parameters

  • roleName
    Type: System.String

    A string that contains the name of the role definition.

Return Value

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

<GetRoleInfo xmlns=
   "https://schemas.microsoft.com/sharepoint/soap/directory/">
   <Role ID="1073741830" Name="Role_Definition" Description="Description" 
      Type="0" />
</GetRoleInfo>

Examples

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.

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)
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);

See Also

Reference

UserGroup Class

UserGroup Members

UserGroup Web Service