Remove user accounts from a group
You can remove multiple user accounts from a group using the multi-object
RemoveUsersFromGroup() method in the
corews web service. To remove one user from a group, you can use the single-object
RemoveUserFromGroup()
method.
Before you begin: Retrieve the following variables:
- userIDs integer array for the IDs of the user accounts that you want to remove from to a group
- groupID integer for the ID of the group you want to remove the user from
- Invoke RemoveUsersFromGroup().
RemoveUsersFromGroupResult result = coreWebService.removeUsersFromGroup(groupID, userIDs);
- Check the result for errors and handle any errors.
if (result.getRemoveUsersFromGroupReturnStatus().getCode() != RemoveUserFromGroupReturnStatusEnumType.SUCCESS)
{
// handle any errors
}
Was this information helpful? Send us your comments.