Public Sub RemoveUsergroupMember()
Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxxx"
Const IR_DomainName As String = "Knowledge Base"
Const IR_UserGroup As String = "Authors"
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.RemoveUsergroupMember(IRAuthenticationTicket, _
IR_DomainName, _
IR_UserGroup, _
IR_UserName)
If xmlResponse.GetAttribute("success") = "true" Then
Console.WriteLine("The user removed from the user group")
Else
Console.WriteLine("The User cannot be removed from the group.")
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
|