IGroupServiceModifyGroupMembershipForGroup Method

Modifies the list of members for a group.

Namespace:  Dundas.BI.AccountServices
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
void ModifyGroupMembershipForGroup(
	Guid groupId,
	ICollection<Guid> accountsToAddIds,
	ICollection<Guid> accountsToRemoveIds,
	ICollection<Guid> groupsToAddIds,
	ICollection<Guid> groupsToRemoveIds
)

Parameters

groupId
Type: SystemGuid
ID of the group to be modified.
accountsToAddIds
Type: System.Collections.GenericICollectionGuid
IDs of accounts to be added to the group. if no accounts to be added.
accountsToRemoveIds
Type: System.Collections.GenericICollectionGuid
IDs of accounts to be removed from the group. if no accounts to be removed.
groupsToAddIds
Type: System.Collections.GenericICollectionGuid
IDs of groups to be added to the group. if no groups to be added.
groupsToRemoveIds
Type: System.Collections.GenericICollectionGuid
IDs of groups to be removed from the group. if no groups to be removed.
Exceptions
ExceptionCondition
ArgumentExceptiongroupId is Empty.
NotFoundException

The group with the specified ID does not exist.

-or-

accountsToAddIds, groupsToAddIds or groupsToRemoveIds contains the ID of an account or group which does not exist.

InvalidOperationException

Attempt to modify the membership of a system-controlled group (see remarks).

-or-

Same account ID found in both accountsToAddIds and accountsToRemoveIds.

-or-

Same group ID found in both groupsToAddIds and groupsToRemoveIds.

-or-

groupsToAddIds contains groupId or the ID of a group which is an explicit or inherited parent of groupId and causes a circular group membership.

-or-

A tenant account or group is being added as a member of the System Administrators group.

NotSupportedExceptionThe underlying groups provider does not allow modifications to groups.
NoPrivilegeException

The caller does not have system administration privileges.

-or-

The group is associated with a project, and the caller does not have administration privileges for that project.

-or-

The group is associated with a tenant, and the caller does not have administration privileges for that tenant.

-or-

The group is associated with a tenant, and an attempt has been made to add a member which is not associated with that tenant.

InvalidSessionExceptionThe caller context is not associated with a valid session.
Remarks
This method will throw InvalidOperationException if an attempt is made to modify system-controlled groups. System-controlled groups include the Everyone group as well as any Tenant Members groups.
See Also