Click or drag to resize

RuntimeServiceAddGroupsToUser Method

Adds groups to a user. Intended for web use only.

Namespace:  Advantys.Workflow.Web.Services.Processes.Runtime
Assembly:  Advantys.Workflow.Web.Services.Processes.Runtime (in Advantys.Workflow.Web.Services.Processes.Runtime.dll) Version: (
public void AddGroupsToUser(
	string username,
	string groupsDefinition


Type: SystemString
Type: SystemString
Definition of groups to associate to the user. Element names are case sensitive.
Available since WorkflowGen version: 6.2.0

The method receives a list of groups to associate to the user. Groups must be in the same directory as the user directory. For parameters that support both a name and an id, the name will be ignored if an id is set.

Optional Parameters.

These parameters can be used in the query string or as parameters of the Headers object in the RuntimeService class instance. See example below.
UserId (int)Specifies the user id. Supercedes the username.
IgnoreMissingAssociations (bool)Sets whether or not to return an error when an association (group) is missing from the target. Default = true.

Sample groups definition:

Sample code:
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService();
RuntimeServiceWebService.UserHeader myUserHeader = new RuntimeServiceWebService.UserHeader();
myRuntimeService.UserHeaderValue = myUserHeader;

myUserHeader.IgnoreMissingAssociations = ignoreMissingAssociations;

myRuntimeService.AddGroupsToUser(username, groupsDefinition);
See Also