title: How does an admin grant access to an app?
body: <p>I have made a web app that using Microsoft Graph and the scopes <code>profile</code>,  <code>openid</code>, <code>email</code> and <code>User.Read</code>. This works fine.</p>
  <p>I now want to include <code>offline_access</code>, <code>User.Read</code>, <code>Mail.Send</code>, <code>Calendars.ReadWrite</code>, <code>Directory.ReadWrite.All</code>, <code>Directory.AccessAsUser.All</code>, <code>User.Read.All</code>, <code>Files.ReadWrite.All</code>, <code>Files.Read</code>, <code>Files.ReadWrite</code>, and  <code>Sites.Read.All</code> scopes.</p>
  <p>When trying to login I get the message:</p>
  <blockquote>
  <p>You can't access this application.</p>
  <p>Tutorial Sample App needs permission to access resources in your organisation that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.</p>
  </blockquote>
  <p>I registered the app at <code>https://apps.dev.microsoft.com/</code> and have these Graph Permissions set:</p>
  <p><a href="https://i.stack.imgur.com/aMrob.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aMrob.png" alt="enter image description here" /></a></p>
  <p>Using PHP, I use the following</p>
  <pre class="lang-php prettyprint-override"><code>use Microsoft\Graph\Graph;
  use Microsoft\Graph\Model;
  const CLIENT_ID          = 'xxx';
  const CLIENT_SECRET      = 'xxx';
  const REDIRECT_URI       = 'xxxx';
  const AUTHORITY_URL      = 'https://login.microsoftonline.com/common';
  const AUTHORIZE_ENDPOINT = '/oauth2/v2.0/authorize';
  const TOKEN_ENDPOINT     = '/oauth2/v2.0/token';
  const SCOPES             = 'profile openid email offline_access User.Read Mail.Send Calendars.ReadWrite Directory.ReadWrite.All Directory.AccessAsUser.All User.Read.All Files.ReadWrite.All Files.Read Files.ReadWrite Sites.Read.All';
  </code></pre>
  <p>and to create the <code>authorisationUrl</code></p>
  <pre><code>$authorizationUrl = $provider-&gt;getAuthorizationUrl();
  </code></pre>
  <p>So, how can I get admin to grant access?</p>