Returns a list of users and user groups who are members of the specified domain/library.
Visual Basic (declaration) |
---|
Public Function GetDomainMembers( _ |
C# (declaration) |
---|
public XmlNode GetDomainMembers( |
<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>
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 |