public static void Run() { // ExStart:CreatePrivateDistributionList IEWSClient client = EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "testUser", "pwd", "domain"); ExchangeDistributionList distributionList = new ExchangeDistributionList(); distributionList.DisplayName = "test private list"; MailAddressCollection members = new MailAddressCollection(); members.Add("*****@*****.**"); members.Add("*****@*****.**"); members.Add("*****@*****.**"); client.CreateDistributionList(distributionList, members); // ExEnd:CreatePrivateDistributionList }