Assign user accounts to a group

To manage similar user accounts more easily, you can assign them to a group so that the user accounts inherit the properties, such as IT polices, software configurations, and WLAN configurations, of the group. You can assign a user account to multiple groups using the addUsersToGroup() method. To assign one user account to a group, you can use the addUserToGroup() method instead.
Before you begin: Retrieve the following data objects and variables:
  • userIDs integer array for the user account IDs that you want to add to the group
  • groupID integer for the group ID of the group you want to add the user accounts to
  1. Invoke addUserToGroup().
    AddUsersToGroupResult result = coreWebService.addUsersToGroup(groupID, userIDs);
  2. Check the result for errors and handle any errors.
    if (result.getAddUsersToGroupReturnStatus().getCode() != AddUserToGroupReturnStatusEnumType.SUCCESS) 
            // handle any errors
Previous topic: Retrieve group IDs

Was this information helpful? Send us your comments.