IGroupServiceModifyGroupMembershipForAccount Method |
Modifies the list of groups to which an account belongs.
Namespace: Dundas.BI.AccountServicesAssembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (26.2.0.1000)
SyntaxOperationResult ModifyGroupMembershipForAccount(
Guid accountId,
ICollection<Guid>? addToGroupIds,
ICollection<Guid>? removeFromGroupIds
)
Function ModifyGroupMembershipForAccount (
accountId As Guid,
addToGroupIds As ICollection(Of Guid),
removeFromGroupIds As ICollection(Of Guid)
) As OperationResult
OperationResult^ ModifyGroupMembershipForAccount(
Guid accountId,
ICollection<Guid>^ addToGroupIds,
ICollection<Guid>^ removeFromGroupIds
)
abstract ModifyGroupMembershipForAccount :
accountId : Guid *
addToGroupIds : ICollection<Guid> *
removeFromGroupIds : ICollection<Guid> -> OperationResult 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
OperationResultAn object describing the result of the operation.
Exceptions| Exception | Condition |
|---|
| ArgumentException | accountId 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. |
| NotSupportedException | The 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. |
| InvalidSessionException | The 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