Returns a list of local user groups in the specified domain/library.

Syntax

Visual Basic (declaration)
Public Function GetLocalGroups( _ 
ByVal AuthenticationTicket as String, _ ByVal DomainName as String) as XmlNode

C# (declaration)
public XmlNode GetLocalGroups( 
string AuthenticationTicket, string DomainName)

Parameters

AuthenticationTicket
    string infoRouter ticket
DomainName
    string The Domain/Library Name of the local user groups you wish to get.

Return Value

Returns xml fragment. Response elements has two attributes ("Success" and "Error").
if success = "true" then the sub xml element returns a list of "User groups"
if success = "false" the error attribute returns the error message.

<response success="true" error="">
	<usergroups>
		<usergroup groupname="abc"/>
	<usergroups/> 
</response> 

Remarks

The caller must be the system administrator or a domain manager of the specified domain.

minus gif Example

Visual Basic Example
Public Sub GetLocalGroups_Sample()
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxx"
        Const IR_DomainName As String = "Public"
 
        Dim IR_Obj As InfoRouter.srv
        Dim xmlResponse As System.Xml.XmlElement
 
        Try
 
            IR_Obj = New InfoRouter.srv
 
            xmlResponse = IR_Obj.GetLocalGroups(IRAuthenticationTicket, _
                                                IR_DomainName)
  
           If xmlResponse.GetAttribute("success") = "true" Then
   
               Console.WriteLine("-- " & IR_DomainName & " [Local groups] --")
                Dim xmlGroups As System.Xml.XmlElement = xmlResponse.FirstChild
                Dim xmlgroup As System.Xml.XmlElement
  
                For Each xmlgroup In xmlGroups.ChildNodes
                    Console.WriteLine(xmlgroup.GetAttribute("GroupName"))
                Next
   
               Console.WriteLine("-----------")
                xmlGroups = Nothing
            Else
                Console.WriteLine("The local groups cannot be listed.")
                Console.WriteLine("server response:" & xmlResponse.GetAttribute("error"))
            End If
            xmlResponse = Nothing
 
        Catch ex As Exception
            Console.WriteLine("error:" & ex.Message)
        Finally
            IR_Obj = Nothing
        End Try
End Sub