Usage

Use ManageUserGroup to update User records based on the provided action.

Basic Steps

  1. Determine the IDs of the users you want to update. For example, you might call Search to retrieve a set of User IDs you want to update. If you store the Cvent IDs for your User records within your database, you can use these IDs to update the desired users.

  2. Construct an ID array and populate it with the IDs of each User record you want to update.

  3. Optionally, specify the MessageId if you need to track the result of each record. Message IDs can represent unique identifiers from your system. Message IDs will be returned as Reference IDs in the result array for your tracking purposes.

  4. Call ManageUserGroup, passing in the ID array, the action you want to take on the Users and the User Group ID.

    Note

    The “Remove” action removes users from the group and does not delete the user group itself.

  5. Process the results in the ManageUserGroup object to verify whether the objects have been successfully updated.

General Syntax

ManageUserGroupResultArray = cventapi.ManageUserGroup (ManageGroupAction Action, ID GroupId, CvObjectArray CvObjects)

Input

NameTypeDescription
ActionManage Group ActionThe action being taken on the objects. Valid actions: Add and Remove.
GroupIdIDThe ID of the Group you are adding or removing objects to or from.
CvObjectsCvObject ArrayArray of one or more CvObject, which contains object IDs to be updated, and optionally MessageIds which will be returned as ReferenceIds.

Output

NameTypeDescription
IdIDID of the user that you attempted to update.
ReferenceIdIDThe MessageId value in the input CvObject.
SuccessBooleanIndicates whether the ManageUserGroup call succeeded (True) or not (False) for this user.
ErrorsError ArrayIf an error occurred during the Create call, an array of one or more Error objects providing the error code and description.

Notes

Take into account the following notes when using the ManageUserGroup call:

  • Maximum Number of Users Updated: You can update up to 200 individual users in a single ManageUsersGroupMembers call. If the ManageUsersGroupMembers request exceeds 200 users, then the entire operation fails.

Validation Rules

The following validation rules should be applied to the ManageUserGroup call:

Validation RuleDescription
ActionsValid actions are Add and Remove. For the Add action to succeed, the user must not already be a member of the specified user group. For the Remove action to succeed, the user must already be a member of the specified user group.
UniquenessBased on ID, only the first instance of a user in the array will update the User record. All subsequent instances will return an error message.
Last updated on