Returns a list of users and user groups who are members of the specified domain/library.

Syntax

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

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

Parameters

AuthenticationTicket
    string infoRouter ticket
DomainName
    string The domain/library name of the members to be listed

Return Value

returns xml fragment.
<response success="true" error="">
if success = "true", the <users> and <usergroups> sub nodes to be returned.
if success = "false", the error attribute returns the error description.

<response success="true" error="">
  <users>
    <User exists="true" Domain="" UserName="jimy" FirstName="Jim" LastName="York" Email="jimy@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="victora" FirstName="Victor" LastName="Alvarez" Email="victora@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>
  <usergroups>
    <usergroup GroupName="Accountants" />
    <usergroup GroupName="Auditors" />
  </usergroups>
</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 GetDomainMembers()
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxx"
        Const IR_DomainName As String = "Accounting"
 
        Dim IR_Obj As InfoRouter.srv
        Dim xmlResponse As System.Xml.XmlElement
        Try
 
            IR_Obj = New InfoRouter.srv
            xmlResponse = IR_Obj.GetDomainMembers(IRAuthenticationTicket, _
                                                  IR_DomainName)
 
            If xmlResponse.GetAttribute("success") = "true" Then
                Dim xmlelem As System.Xml.XmlElement
                'list users
                Console.WriteLine("------- [Member Users] ----------")
 
                Dim xmlusersElem As System.Xml.XmlElement
                xmlusersElem = xmlResponse.ChildNodes(0)
                For Each xmlelem In xmlusersElem.ChildNodes
                    Console.WriteLine(xmlelem.GetAttribute("UserName"))
                Next
                xmlusersElem = Nothing
 
                'list usergroups
                Console.WriteLine("------- [Member Groups] ---------")
                Dim xmlusergroupsElem As System.Xml.XmlElement
                xmlusergroupsElem = xmlResponse.ChildNodes(0)
                For Each xmlelem In xmlusergroupsElem.ChildNodes
                    Console.WriteLine(xmlelem.GetAttribute("GroupName"))
                Next
                xmlusergroupsElem = Nothing
 
            Else
                Console.WriteLine("Domain 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