title: Office 365 Api c# Windows Service
body: <p>I'm trying to use the Office 365 api inside a Windows Service to link e-mails to in-house projects.</p>
  
  <p>I've been able to authenticate myself using the <a href="https://msdn.microsoft.com/office/office365/APi/mail-rest-operations#Getmessages" rel="nofollow">Office 365 API documentation</a></p>
  
  <p>Although I have some problems/questions.
  First problem: 
  <code>await outlookClient.Me.Folders["inbox"].Messages.ExecuteAsync();</code>
  Isn't working for me, I don't get any response, even after 5 min...</p>
  
  <p>Another question is:
  Is it possible to never ask for the office365 credentials when starting the program?
  Because this is running in a windows Service.</p>
  
  <p>Did anybody successfully implement this?
  If so: Is it possible to get a full working example?
  I've been trying different things now, but much examples are for asp.net of other where an authentication is always required.</p>