Add or invite N users to a single group. If autoAdd is true (if the user doing the adding has the 'portal:admin:assignToGroups' priv) then we attempt to auto add EVERY user to the group. If that call fails, then we attempt to invite them.

  • addGroupMembers(groupId: string, usernames: string[], auth: IUserRequestOptions, autoAdd: boolean) : Promise<IAddGroupMembersResult>


Parameter Type Default Notes
groupId Required string

ID of the group the users will be added to

usernames Required string[]

usernames of the users to add

auth Required IUserRequestOptions


autoAdd Required boolean

should we auto add users?



Property Type Notes
added string[]
invited string[]
notAdded string[]
notInvited string[]
responses IAddOrInviteMemberResponse[]

Function defined in common/src/groups/addGroupMembers.ts:21