Access SharePoint Online via JSOM and Auth Bearer Token

Copper Contributor

I know that I can access the Microsoft Graph with an Auth Bearer Token obtained from Azure AD. I know that I can access SharePoint Online with an Auth Bearer Token via CSOM as well. And I know that I can access SharePoint Online with an Auth Bearer Token via REST.

 

But can I also do that with JSOM? 

 

Is there a way to create in JSOM to create a SP.ClientContext object and set the Auth Bearer Token like it's done in CSOM?

 

Thanks!

2 Replies

Have a look at the following project in Github:

 

https://github.com/SharePoint/PnP-JS-Core

Thanks for the link. I will use this library when using REST. But it is not for JSON.

 

So the question still remains: Can we use JSON with Auth Bearer Token?

 

I ask this because Taxonomy Service is not available via REST, only via JSON.