Removes the specified user from the domain/library.

Syntax

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

C# (declaration)
public XmlNode RemoveUserFromDomainMembership( 
string AuthenticationTicket, string DomainName, string UserName)

Parameters

AuthenticationTicket
    string inforouter ticket
DomainName
    string The Name of the domain that the user to be removed
UserName
    string The username of the user to be removed

Return Value

returns xml fragment.
<response success="true" error="">
if success = "true", the user has been removed from domain membership.
if success = "false", the error attribute returns the error description.

Remarks

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

minus gif Example

Visual Basic Example
Public Sub RemoveUserFromDomainMembership()
 
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxxxx"
        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.RemoveUserFromDomainMembership(IRAuthenticationTicket, _
                                                                IR_DomainName, _
                                                                IR_UserName)
 
           If xmlResponse.GetAttribute("success") = "true" Then
                Console.WriteLine("The user removed from the domain memberships")
            Else
                Console.WriteLine("The User cannot be removed from the domain memberships.")
                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