title: Server-side task to query Office 365 account for new emails
body: <p>I need a server-side task on my .NET 4.6.1/MVC 5 app that will periodically check a specific O365 email address for new emails and retrieve them if found. This seems like a stupidly simple task, but I cannot find documentation <em>anywhere</em> for creating a server-side process to accomplish this. The only documentation Microsoft seems to have is for OAuth2 and passing through credentials when users sign in. I don't want that. I want to check one specific account, that's it. How would I accomplish this?</p>
  
  <p>These are the pages I've found. There are others, but all are along these lines.</p>
  
  <ul>
  <li><a href="https://msdn.microsoft.com/office/office365/api/use-outlook-rest-api" rel="nofollow">Intro to the Outlook API</a> - I don't see a way to use a service account with the v2 endpoint.</li>
  <li><a href="https://dev.outlook.com/restapi/tutorial/dotnet" rel="nofollow">Get Started with the Outlook REST APIs</a> - This is specific to logging users in with OAuth2, unhelpful for my purposes.</li>
  </ul>