Forum Discussion

Heisenberg's avatar
Heisenberg
Copper Contributor
Mar 29, 2019
Solved

Connect to SharePoint Online from ADAL protected MVC web app with logged in user's identity

Hi,

 

We are trying to surface the results of our SharePoint Online search in an ADAL protected MVC web app.

 

Looking at the SharePoint Online PnP Core CSOM extensions (OfficeDevPnP.Core namespace), it looks like the method AuthenticationManager.GetAzureADWebApplicationAuthenticatedContext(String, Func) would be the way to go. However, We've been unable to find any useful documentation on this method (or the SharePoint Online PnP package as a whole), in particular on how to obtain access tokens, or any working examples that do not include hard coding usernames and passwords. All the resources we've been able to find on the subject are either incomplete or out of date.

 

Does detailed documentation exist for this package? Or any working examples?

 

Thanks.

 

Failing that, is there a way to achieve this by some other means?

2 Replies

Resources