private static void CreateUserMailBoxRule() { const string alias = "admin"; var mailboxHelper = new MailboxHelper(_graphServiceClient); mailboxHelper.CreateRule(alias, "ForwardBasedonSender", 2, true, "svarukal", "*****@*****.**").GetAwaiter().GetResult(); }
private static void SetUserMailboxDefaultTimeZone() { const string alias = "admin"; var mailboxHelper = new MailboxHelper(_graphServiceClient, _httpClient); mailboxHelper.SetUserMailboxDefaultTimeZone(alias, "Eastern Standard Time"); }
private static void GetUserMailboxDefaultTimeZone() { const string alias = "admin"; var mailboxHelper = new MailboxHelper(_graphServiceClient); var defaultTimeZone = mailboxHelper.GetUserMailboxDefaultTimeZone(alias).Result; Console.WriteLine("Default timezone: " + defaultTimeZone); }
// Add a private method to do any necessary setup and make calls to your helper private static void ListUserMailInboxMessages() { const string alias = "admin"; var mailboxHelper = new MailboxHelper(_graphServiceClient); List <ResultsItem> items = mailboxHelper.ListInboxMessages(alias).Result; Console.WriteLine("Message count: " + items.Count); }
private static void ListUserMailBoxRules() { const string alias = "admin"; var mailboxHelper = new MailboxHelper(_graphServiceClient); List <ResultsItem> rules = mailboxHelper.GetUserMailboxRules(alias).Result; Console.WriteLine("Rules count: " + rules.Count); foreach (ResultsItem rule in rules) { Console.WriteLine("Rule Name: " + rule.Display); } }