title: How to get microsoft graph token without popup user login page?
body: <p>I need to write a backend app to read &amp; write one company emailbox.<br>
  I have registered Active Directory Application and granted Delegated permissions (read and write to user mailbox).
  Question is how to get the token needed for authenticate the graph api calls(for example ListMessages). 
  From the document I coundn't find any working example for backend app aquiring token and make api calls. </p>
  
  <p>There are two endpoint versions:<br>
  <strong>Azure AD and Azure AD v2.0 endpoints;</strong><br>
  And two authentication method:<br>
  <strong>1. Get access on behalf of a user</strong><br>
  <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user" rel="nofollow noreferrer">https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user</a><br>
  <strong>2. Get access without a user</strong><br>
  <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_service" rel="nofollow noreferrer">https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_service</a>      </p>
  
  <p>What shoud I use ? Really confused.<br>
  Thanks all.  </p>