How to create a new SharePoint add-in for Office Store (so no SPFX) that can use using Graph API

MVP

Hello,

I am trying to develop a new SharePoint add-in (SharePoint hosted), that needs to use JavaScript to connect to Microsoft Graph API. Since it is use for Office Store, it should not use SharePoint Framework (SPFX).

 

Any idea how to handle authentication (ADAL/MSAL ?) for graph.microsoft.com from such a SP add-in ? and is it possible at all?

4 Replies

It seems that following link is just dependent on SharePoint Framework (spfx) which I can not use, since it does not support putting app on SharePoint Store ...

It actually isn't dependent on SPFx but SPFx makes certain operations easier.

 

You can use PnPJs from a NodeJS app, for example, and authenticate via ADAL to Graph or SharePoint REST APIs.

 

Not sure if it helps the specifics of your situation, but you can definitely use it outside of SPFx.

 

https://pnp.github.io/pnpjs/common/docs/adalclient/#manually-configure

@Thomas Berman in that case it is to complex situation then for me, but tanks for the info :)