title: Including "prompt=consent" on Office 365 OAuth authorization request for resource "https://graph.microsoft.com/" generates an error
body: <p>I'm moving our existing Office365 API usage over to the Unified API (at <a href="https://graph.microsoft.com/v1.0" rel="nofollow noreferrer">https://graph.microsoft.com/v1.0</a>).</p>
  
  <p>For reasons explained in <a href="https://stackoverflow.com/questions/31025263/adding-an-additional-windows-azure-ad-delegated-permission-to-an-existing-grant">Adding an additional Windows Azure AD delegated permission to an existing grant</a>, I need to include <code>prompt=consent</code> in my authorization request Url, and so up until now my authorization Url has looked like:</p>
  
  <p><code>https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3a%2f%2fgraph.windows.net%2f&amp;prompt=consent&amp;client_id=ec49c780-6767-46f2-8697-bdd816e42504&amp;redirect_uri=https%3a%2f%2flogin.airhead.io%2fservices%2freply%2foffice365%2foauth&amp;scope=UserProfile.Read+Calendars.Read+Files.Read+Sites.Read.All+Mail.Read&amp;response_type=code</code></p>
  
  <p>..which (after auth and consent) returns me to something like:</p>
  
  <p><code>https://login.airhead.io/services/reply/office365/oauth?code=AAABAAAAiL9Kn2Z27UubvWFPbm0gLeSvP6UG3gEwceCQ8hU_03hUjXRvPUfs_Y-324csuR0rDFE-qdNIsD0on-DjKGoSzvVL4PKh7_uQkghxtOGCZGEJ7GwcUDpvoHH86pjct3vAb94wPt8Pkdm46HhvPeBn6JDrK5VIBYdwxS2r8dLRmjqiyIBbGZDsOUCDymeFebYsFc-V39sQ9WFSx5ErjIeHvZ_Qf4zB1SDjT-iEqJPTW7H5bZpvFJQHhUqn3TvVL37Up4ZzkWxz5fb0zMk_7yKuz6G-DW6kz_Y1S30ZNgO45maDEw9KBqmdIR_NeewmFSKokgF4Unsfi__xNzjf6xO6VcMOidych7V7uQi_jxX7zP5hLvXgAoNmqBU-AnV2NVZ-5tq2s4w8vvl61TXUjR1MtwVf4TzcsL55uvyP16lid6JpWsdssZvWJNXna_zJC0Ok629vE5-4pzu-zF5C_PJztkx8VQ8QDmP4_JqkHkRmq2zO0doY25AF6Sh3odyNEx6IwWxe9jirPv_8NfwlmldYnpItzbmYlqLilOIEBNXpESgUmPz02A0Czu--pZP45JfjNDrVnUBBV9liPToK_QPe99xOSNHmk70h171M5BjVnhggAA&amp;session_state=8494e152-60ab-4ddc-a247-ee55798e0595</code></p>
  
  <p>..which allows me to continue with the flow, using the code auth'd against the old <code>https://graph.windows.net/</code> resource. All good.</p>
  
  <p>However, after modifying the <code>resource</code> param value on the authorization Url to <code>https://graph.microsoft.com/</code> to authorize against the new Unified API, i.e.:</p>
  
  <p><code>https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3a%2f%2fgraph.microsoft.com%2f&amp;prompt=consent&amp;client_id=ec49c780-6767-46f2-8697-bdd816e42504&amp;redirect_uri=https%3a%2f%2flogin.airhead.io%2fservices%2freply%2foffice365%2foauth&amp;scope=UserProfile.Read+Calendars.Read+Files.Read+Sites.Read.All+Mail.Read&amp;response_type=code</code></p>
  
  <p>..I'm returned an error response:</p>
  
  <p><code>https://login.airhead.io/services/reply/office365/oauth?error=access_denied&amp;error_description=AADSTS65005%3a+The+client+application+has+requested+access+to+resource+%27https%3a%2f%2fgraph.microsoft.com%2f%27.+This+request+has+failed+because+the+client+has+not+specified+this+resource+in+its+requiredResourceAccess+list.%0D%0ATrace+ID%3a+d9cc9773-feb5-42b4-9414-eaf64620fc0f%0D%0ACorrelation+ID%3a+ea1f37de-35bb-4b41-af49-c877dda75d11%0D%0ATimestamp%3a+2016-01-18+13%3a15%3a18Z</code></p>
  
  <p>..with description "AADSTS65005: The client application has requested access to resource '<a href="https://graph.microsoft.com/" rel="nofollow noreferrer">https://graph.microsoft.com/</a>'. This request has failed because the client has not specified this resource in its requiredResourceAccess list".</p>
  
  <p>If I try the same authorization Url (against resource <code>https://graph.microsoft.com/</code> again), but drop the <code>prompt=consent</code> param this time, i.e:</p>
  
  <p><code>https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3a%2f%2fgraph.microsoft.com%2f&amp;client_id=ec49c780-6767-46f2-8697-bdd816e42504&amp;redirect_uri=https%3a%2f%2flogin.airhead.io%2fservices%2freply%2foffice365%2foauth&amp;scope=UserProfile.Read+Calendars.Read+Files.Read+Sites.Read.All+Mail.Read&amp;response_type=code</code></p>
  
  <p>..it works.</p>
  
  <p>The documentation at <a href="https://msdn.microsoft.com/en-US/library/azure/dn645542.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-US/library/azure/dn645542.aspx</a> still suggests that <code>prompt=consent</code> is valid, so is the documentation wrong (i.e. I can't use <code>prompt=consent</code> with resource <code>https://graph.microsoft.com/</code>) or is this a bug?</p>