Adds a global user group to the specified domain/library.

Syntax

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

C# (declaration)
public XmlNode AddUserGroupAsDomainMember( 
string AuthenticationTicket, string DomainName, string GroupName)

Parameters

AuthenticationTicket
    string inforouter ticket
DomainName
    string The Name of the group to be added.
GroupName
    string The Name of the group to be added.

Return Value

returns xml fragment.
<response success="true" error="">
if success = "true", the usergroup has been added.
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.
- The user group must be a global user group. Local User Groups cannot be made members of other domains.

minus gif Example

Visual Basic Example
Public Sub AddUserGroupAsDomainMember()
        Const IRAuthenticationTicket As String = "sid-XXXXXXXXXXX"
        Const IR_DomainName As String = "Accounting"
        Const IR_UserGroupName As String = "Employees"

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

            IR_Obj = New InfoRouter.srv
            xmlResponse = IR_Obj.AddUserGroupAsDomainMember(IRAuthenticationTicket, _
                                                            IR_DomainName, _
                                                            IR_UserGroupName)
            If xmlResponse.GetAttribute("success") = "true" Then
                Console.WriteLine("The user group added to the domain member")
            Else
                Console.WriteLine("The User group 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