Creates a user group. To create a local user group, specify an existing domain/library name.

Syntax

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

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

Parameters

AuthenticationTicket
    string infoRouter ticket
DomainName
    string The Domain name if the usergroup will be local.
GroupName
    string The New Usergroup Name

Return Value

returns xml fragment.
<response success="true" error="">
if success attribute "true", the user group has been created.
if success attribute "false", the error attribute returns the error description.

Remarks

The caller must be the system administrator or the domain manager of the specified domain.
- To create a "Local User Group" specify an existing domain name.

minus gif Example

Visual Basic Example
Public Sub CreateUserGroup()
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxx"
        Const IR_DomainName As String = "Knowledge Base"
        Const IR_UserGroup As String = "Authors"

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

            IR_Obj = New InfoRouter.srv
            xmlResponse = IR_Obj.CreateUserGroup(IRAuthenticationTicket, _
                                                 IR_DomainName, _
                                                 IR_UserGroup)
            If xmlResponse.GetAttribute("success") = "true" Then
                Console.WriteLine("The usergroup created successfully.")
            Else
                Console.WriteLine("The usergroup cannot be created.")
                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