infoRouter Document Management System - Web Services API Documentation Version 7.0
AddUserAsDomainMember
Adds a user to the specified domain
Syntax
[Visual Basic]
Public Shared Function AddUserAsDomainMember(ByVal AuthenticationTicket As String, _
Byval DomainName as string, _
Byval UserName as string) as xmldocument
Parameters
AuthenticationTicket
infoRouter Authentication Ticket
PWD
infoRouter Login user password
DomainName
The name of the domain you wish to add the user
UserName
The user name of the user to be added
Return Value
returns xml fragment.
<response success="true" error="">
if success = "true", the user has successfully been added to the domain.
if success = "false", the error attribute returns the error description.
Remarks
The caller must be the system administrator or the domain manager of the specified domain.

- Only Global Users can be added as members to domains.
- Local Users remain local to their original domains. They cannot be made members of other domains.
Example
   Public Sub AddUserAsDomainMember()
Const IRAuthenticationTicket As String = "sid-XXXXXXXXXXXX"
Const IR_DomainName As String = "Accounting"
Const IR_UserName As String = "JoeD"

Dim IR_Obj As InfoRouter.srv
Dim xmlResponse As System.Xml.XmlElement
Try

IR_Obj = New InfoRouter.srv
xmlResponse = IR_Obj.AddUserAsDomainMember(IRAuthenticationTicket, _
IR_DomainName, _
IR_UserName)

If xmlResponse.GetAttribute("success") = "true" Then
Console.WriteLine("The user successfully added to the domain members")
Else
Console.WriteLine("The User cannot be added to the domain members.")
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
See Also
GetDomainMembers | RemoveUserFromDomainMembership | AddUserGroupAsDomainMember
Web Services API Syntax based on infoRouter Document Management System Version 7.0
Copyright() 1998-2008 Active Innovations, Inc.
infoRouter Enterprise Document Management System