How to access shared calendars from Office REST API?
<p>This question has been asked several times and as per answers such as <a href="https://stackoverflow.com/a/31075944/295264">this</a> it seems the API didn't support this then until recently as <a href="https://stackoverflow.com/a/28369153/295264">here</a> which mentions that there are new scopes which allow accessing the shared calendars. But it still does not work. </p>

<p>I have tested this on two platforms: Azure and Microsoft Graph</p>

<ol>
<li>Azure Ad App</li>
</ol>

<p>My application in Azure AD has all the required permissions:
<a href="https://i.stack.imgur.com/j8S8I.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/j8S8I.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/EQ0jE.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/EQ0jE.jpg" alt="enter image description here"></a><a href="https://i.stack.imgur.com/V44gg.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/V44gg.jpg" alt="enter image description here"></a></p>

<p>I make a call to Office API v.1.0 as:</p>

<blockquote>
  <p>Authorise URL: </p>

<pre><code>https://login.microsoftonline.com/common/oauth2/authorize?client_id=%1$s&amp;redirect_uri=%2$s&amp;response_type=code
</code></pre>
  
  <p>Token URL: <code>https://login.microsoftonline.com/common/oauth2/token</code></p>
  
  <p>Calendars URL: <code>https://outlook.office.com/api/v1.0/Me/Calendars</code></p>
</blockquote>

<p>It only gives me the calendar created by the current logged-in/authorising user.</p>

<p>Since this didn't work, I tried with the version 2 of the API but I got the following:</p>

<blockquote>
<pre><code>Additional technical information:
Correlation ID: 7abf370a-d918-4514-bd74-cf5fc93fe3cf
Timestamp: 2016-10-31 09:32:06Z
AADSTS70001: Application 'f7571710-84e2-4444-8bfe-5eef92f4a46d' is not supported for this API version.
</code></pre>
</blockquote>

<p>So I tried with a Microsoft Graph Application</p>

<ol start="2">
<li>Microsoft Graph App</li>
</ol>

<p>My application here also contains all the required permissions.</p>

<p><a href="https://i.stack.imgur.com/MbCe6.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/MbCe6.jpg" alt="enter image description here"></a></p>

<p>I make call to the office API v2.0 as:</p>

<blockquote>
  <p>Authorize URL: </p>

<pre><code>https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=%1$s&amp;redirect_uri=%2$s&amp;response_type=code&amp;scope=%3$s
</code></pre>
  
  <p>Where scopes are:</p>

<pre><code>private static $scopes = array(
    'https://outlook.office.com/calendars.read',
    'https://outlook.office.com/calendars.readwrite',
    'https://outlook.office.com/calendars.read.shared',
    'https://outlook.office.com/calendars.readwrite.shared',
);
</code></pre>
  
  <p>Token URL:
  <code>https://login.microsoftonline.com/common/oauth2/v2.0/token</code></p>
  
  <p>Calendars URL: 
  <code>https://outlook.office.com/api/v2.0/Me/Calendars</code></p>
</blockquote>

<p>Again does not give me the shared calendars.</p>

<p>Any help is appreciated.</p>