Microsoft Graph API .NET not able to read shared mail
<p>First post...here goes.  I am trying to display email from a shared mailbox but run into "ErrorAccessDenied Access is denied. Check credentials and try again".</p>

<p>The user does have permission to the mailbox, I can access/read email in Outlook and in O365 portal. In my app I have also assigned Mail.Read.Shared and Mail.ReadWrite.Shared scopes.</p>

<p>At first I tried Graph Explorer</p>

<pre><code>https://graph.microsoft.com/beta/users/&lt;userPrincipalNameOfSharedMailbox&gt;/messages
</code></pre>

<p>but same ErrorAccessDenied, assumed Graph Explorer did not have Mail.Read.Shared scope.</p>

<p>Next I tried to modify <a href="https://github.com/microsoftgraph/aspnet-snippets-sample" rel="nofollow noreferrer">Microsoft Graph Snippets Sample for ASP.NET 4.6</a></p>

<p>I added Mail.Read.Shared and Mail.ReadWrite.Shared and was prompted to accept these permissions</p>

<p>• Read and write mail you can access</p>

<p>• Read mail you can access </p>

<p>but I get the same error when I try get mail from the shared mailbox</p>

<pre><code>IUserMessagesCollectionPage messages = await graphClient.Users["userPrincipalNameOfSharedMailbox"].Messages.Request().GetAsync();
</code></pre>

<p>There was a similar post here <a href="https://stackoverflow.com/questions/40671453/microsoft-graph-api-sdk-net-issues-getting-other-users-emails">Microsoft Graph API SDK .NET Issues getting other users emails</a> and the answer implies this is possible.  If it is can anyone provide some insight as to what I am missing?  thanks</p>