Returns a list of members of the specified user group.

Syntax

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

C# (declaration)
public XmlNode GetUserGroupMembers( 
string AuthenticationTicket, string DomainName, string GroupName)

Parameters

AuthenticationTicket
    string infoRouter ticket
DomainName
    string Domain Name of the usergroup if it is local.
GroupName
    string The User group name you wish get the member list

Return Value

Returns XML fragment.
<response success="true" error="">
if success = "true" the a list of "Users" are returned like the xml sample below
if success = "false" the error attribute returns the error description.

<response success="true" error="">
  <users>
    <User exists="true" Domain="" UserName="adamb" FirstName="Adam" LastName="Boeve" Email="adamb@inforouter.com" LastLogonDate="1980-01-01 00:00:00" LastPasswordChangeDate="1980-01-01 00:00:00" AuthenticationAuthority="INFOROUTER" ReadOnlyUser="FALSE" Enabled="TRUE">
      <Preferences>
        <Language>
        </Language>
        <DefaultPortal>
        </DefaultPortal>
        <ShowArchives>FALSE</ShowArchives>
        <ShowHiddens>FALSE</ShowHiddens>
        <NotificationType>INSTANT</NotificationType>
        <EmailType>HTML</EmailType>
        <AttachDocumentToEmail>FALSE</AttachDocumentToEmail>
      </Preferences>
    </User>
    <User exists="true" Domain="" UserName="diannaf" FirstName="Dianna" LastName="Finch" Email="diannaf@inforouter.com" LastLogonDate="1980-01-01 00:00:00" LastPasswordChangeDate="1980-01-01 00:00:00" AuthenticationAuthority="INFOROUTER" ReadOnlyUser="FALSE" Enabled="TRUE">
      <Preferences>
        <Language>
        </Language>
        <DefaultPortal>
        </DefaultPortal>
        <ShowArchives>FALSE</ShowArchives>
        <ShowHiddens>FALSE</ShowHiddens>
        <NotificationType>INSTANT</NotificationType>
        <EmailType>HTML</EmailType>
        <AttachDocumentToEmail>FALSE</AttachDocumentToEmail>
      </Preferences>
    </User>
  </users>
</response>

Remarks

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

minus gif Example

Visual Basic Example
Public Sub GetUserGroupMembers()
  
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxx"
 
        'leave it empty string if the usergroup is a global usergroup
        Const IR_DomainName As String = "Knowledge Base"
        Const IR_UserGroupName As String = "Authors"
 
        Dim IR_Obj As InfoRouter.srv
        Dim xmlResponse As System.Xml.XmlElement
        Try
 
            IR_Obj = New InfoRouter.srv
            xmlResponse = IR_Obj.GetUserGroupMembers(IRAuthenticationTicket, _
                                                     IR_DomainName, _
                                                     IR_UserGroupName)
 
            If xmlResponse.GetAttribute("success") = "true" Then
                Dim xmlusersElem As System.Xml.XmlElement
                xmlusersElem = xmlResponse.FirstChild

                Dim xmlelem As System.Xml.XmlElement
                For Each xmlelem In xmlusersElem.ChildNodes
                    Console.WriteLine(xmlelem.GetAttribute("UserName"))
                Next
                xmlusersElem = Nothing
 
            Else
                Console.WriteLine("Group members cannot be reached.")
                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