Azure Graph API 403 Error using Java tutorial
<p>I’ve been working through a doc at:</p>

<p><a href="https://docs.microsoft.com/en-us/azure/active-directory/active-directory-devquickstarts-webapp-java" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/active-directory/active-directory-devquickstarts-webapp-java</a></p>

<p>But when I run the project, I’m redirected to the ADFS login page and after authentication im receiving this error:</p>

<p>java.io.IOException: Server returned HTTP response code: 403 for URL: <a href="https://graph.windows.net/swisherint.onmicrosoft.com/users?api-version=2013-04-05" rel="nofollow noreferrer">https://graph.windows.net/swisherint.onmicrosoft.com/users?api-version=2013-04-05</a></p>

<p>I get this error when I run from local host.  I also deployed the sample app to Azure and getting the same error.</p>

<p>I've added permissions to Graph API with read directory permissions in active directory > App Registrations > Required permissions. I also added Windows Azure Active Directory permissions (sign in and read user profile) </p>

<p>Is this a common error?  Am I using the wrong version of the Graph API? I've tried several solutions from other questions but not working.  </p>