Authenticating to SharePoint Online using Azure AD from javascript

Highlighted
New Contributor

Hello you all,

We need to create an overview in which users can see personalized information from different section within Office365. For example we need to show information about the tasks within Planner, Emails from Outlook, messages from Yammer and news items from SharePoint.

Almost all of this information can be retrieved using the Graph API, but some of the data like SharePoint news articles needs to be retrieved by SharePoint Search.

 

We now are working on a POC using a React/Typescript page in which we already have a connection to the Graph API using oAuth and registered Azure AD Application.
The problem is with creating a connection to SharePoint to execute a search query. We tried to connect without using an application id and secret but only the credentials of the user which the user has provided when loggin into Azure AD to connect to Graph.

 

Does anyone have an idea`s how to connect to SharePoint using the user credenitials to execute a search query when the user is already logged in into the Azure AD?

Many thanks in advance!

0 Replies