RemoveDelegates method

Future<List<DelegateUserResponse>> RemoveDelegates(
  1. Mailbox mailbox,
  2. Iterable<UserId> userIds
)
Removes delegates on a specific mailbox. Calling this method results in a call to EWS. The mailbox to remove delegates from. The Ids of the delegate users to remove.

Implementation

Future<List<DelegateUserResponse>> RemoveDelegates(
  Mailbox mailbox,
  Iterable<UserId> userIds,
) async {
  EwsUtilities.ValidateParam(mailbox, "mailbox");
  EwsUtilities.ValidateParamCollection(userIds, "userIds");

  RemoveDelegateRequest request = RemoveDelegateRequest(this);

  request.Mailbox = mailbox;
  request.UserIds.addAll(userIds);

  DelegateManagementResponse response = await request.Execute();
  return response.DelegateUserResponses ?? <DelegateUserResponse>[];
}