title: Microsoft Graph API not returning refresh token
body: <p>I created an app on <a href="https://apps.dev.microsoft.com" rel="noreferrer">https://apps.dev.microsoft.com</a></p>
  
  <p>with the following Application Permissions:</p>
  
  <p><code>Calendars.Read (Admin Only)</code> <code>Calendars.ReadWrite (Admin Only)</code> <code>User.Read.All (Admin Only)</code></p>
  
  <p>The following is the only flow that has worked for me to be able to subscribe to notifications of another user, on another tenant, as described <a href="https://stackoverflow.com/questions/47572013/microsoft-graph-api-beta-subscribe-to-event-notifications-of-another-user">here</a></p>
  
  <p><strong>Admin Consent</strong></p>
  
  <p>Admin consent was then successfully granted via this URL</p>
  
  <pre><code>https://login.microsoftonline.com/common/adminconsent?client_id=bbb35336-faee-4c10-84b4-34136634db41&amp;state=1234&amp;redirect_uri=https%3A%2F%2Fdashmeetings.com%2Fmicrosoft%2Foauth
  </code></pre>
  
  <p><strong>Get access token</strong></p>
  
  <p>An access token was then obtained from </p>
  
  <pre><code>POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
  </code></pre>
  
  <p>with headers</p>
  
  <pre><code>Content-Type=application/x-www-form-urlencoded
  </code></pre>
  
  <p>with <code>{tenant}</code> the value of <code>tenant</code> returned in the callback url,</p>
  
  <p>and body with key-value pairs</p>
  
  <pre><code>grant_type=client_credentials
  client_id=bbb35336-faee-4c10-84b4-34136634db41
  client_secret=xxx
  scope=https://graph.microsoft.com/.default
  </code></pre>
  
  <p>This returns an access token, but not a refresh token. </p>
  
  <p>I think this might be because <code>offline_access</code> isn't requested.</p>
  
  <p>How can I get a refresh token?</p>