IGroupServiceModifyGroupMembershipForAccount Method

Modifies the list of groups to which an account belongs.

Namespace: Dundas.BI.AccountServices
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (26.2.0.1000)
Syntax
OperationResult ModifyGroupMembershipForAccount(
	Guid accountId,
	ICollection<Guid>? addToGroupIds,
	ICollection<Guid>? removeFromGroupIds
)

Parameters

accountId  Guid
The ID of the account to be modified.
addToGroupIds  ICollectionGuid
Group IDs which this account to be added to. It can be if no groups to add to.
removeFromGroupIds  ICollectionGuid
Group IDs which this account to be removed from. It can be if no groups to remove from.

Return Value

OperationResult
An object describing the result of the operation.
Exceptions
ExceptionCondition
ArgumentExceptionaccountId is Empty.
NotFoundException

The account with the specified ID does not exist.

-or-

addToGroupIds or removeFromGroupIds contains the ID of a group which does not exist.

InvalidOperationException

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

-or-

Same group ID found in both addToGroupIds and removeFromGroupIds.

-or-

A tenant account 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 account is associated with a tenant, and the caller does not have administration privileges for that tenant.

-or-

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

-or-

The caller does not have administration privileges for all the specified groups.

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 and Global Users groups as well as any Tenant Members groups.
See Also