public static void Run() { // ExStart:DeleteMembersFromPrivateDistributionList IEWSClient client = EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "testUser", "pwd", "domain"); ExchangeDistributionList[] distributionLists = client.ListDistributionLists(); MailAddressCollection members = client.FetchDistributionList(distributionLists[0]); MailAddressCollection membersToDelete = new MailAddressCollection(); membersToDelete.Add(members[0]); membersToDelete.Add(members[1]); client.DeleteFromDistributionList(distributionLists[0], membersToDelete); // ExEnd:DeleteMembersFromPrivateDistributionList }