I am creating a webpart for SharePoint Online which accesse the user's calendar through the Microsoft Graph API.

In order to get the access_token, my webpart needs to open a new browser window where the user logs in with their Microsoft account. I am using OAuth v2.

However, my customer says this is not necessary because the user is already logged into SharePoint online, therefore there is no need to log in again an there must be a way to get the access token without having to log in again.

Is there a way to get the access_token for the Microsoft Graph API from inside a SharePoint online page without prompting the user and without opening that Microsoft account login window?

  • Have you found any work around for this problem? – Farhan Mar 11 '19 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy