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

%3CLINGO-SUB%20id%3D%22lingo-sub-286464%22%20slang%3D%22en-US%22%3EHow%20to%20create%20a%20new%20SharePoint%20add-in%20for%20Office%20Store%20(so%20no%20SPFX)%20that%20can%20use%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286464%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EI%20am%20trying%20to%20develop%20a%20new%20SharePoint%20add-in%20(SharePoint%20hosted)%2C%20that%20needs%20to%20use%20JavaScript%20to%20connect%20to%20Microsoft%20Graph%20API.%20Since%20it%20is%20use%20for%20Office%20Store%2C%20it%20should%20not%20use%20SharePoint%20Framework%20(SPFX).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAny%20idea%20how%20to%20handle%20authentication%20(ADAL%2FMSAL%20%3F)%20for%20graph.microsoft.com%20from%20such%20a%20SP%20add-in%20%3F%20and%20is%20it%20possible%20at%20all%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286616%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20create%20a%20new%20SharePoint%20add-in%20for%20Office%20Store%20(so%20no%20SPFX)%20that%20can%20use%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286616%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20actually%20isn't%20dependent%20on%20SPFx%20but%20SPFx%20makes%20certain%20operations%20easier.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20use%20PnPJs%20from%20a%20NodeJS%20app%2C%20for%20example%2C%20and%20authenticate%20via%20ADAL%20to%20Graph%20or%20SharePoint%20REST%20APIs.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENot%20sure%20if%20it%20helps%20the%20specifics%20of%20your%20situation%2C%20but%20you%20can%20definitely%20use%20it%20outside%20of%20SPFx.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fpnpjs%2Fcommon%2Fdocs%2Fadalclient%2F%23manually-configure%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpnp.github.io%2Fpnpjs%2Fcommon%2Fdocs%2Fadalclient%2F%23manually-configure%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286614%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20create%20a%20new%20SharePoint%20add-in%20for%20Office%20Store%20(so%20no%20SPFX)%20that%20can%20use%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286614%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20seems%20that%20following%20link%20is%20just%20dependent%20on%20SharePoint%20Framework%20(spfx)%20which%20I%20can%20not%20use%2C%20since%20it%20does%20not%20support%20putting%20app%20on%20SharePoint%20Store%20...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286606%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20create%20a%20new%20SharePoint%20add-in%20for%20Office%20Store%20(so%20no%20SPFX)%20that%20can%20use%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286606%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Hrvoje%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20you%20able%20to%20use%20PnPJs%3F%20You%20can%20use%20that%20outside%20SPFx%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fpnp%2Fpnpjs%2Fblob%2Fdev%2Fpackages%2Fgraph%2Fdocs%2Findex.md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fpnp%2Fpnpjs%2Fblob%2Fdev%2Fpackages%2Fgraph%2Fdocs%2Findex.md%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-643951%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20create%20a%20new%20SharePoint%20add-in%20for%20Office%20Store%20(so%20no%20SPFX)%20that%20can%20use%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-643951%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F241707%22%20target%3D%22_blank%22%3E%40Thomas%20Berman%3C%2FA%3E%26nbsp%3Bin%20that%20case%20it%20is%20to%20complex%20situation%20then%20for%20me%2C%20but%20tanks%20for%20the%20info%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
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
Highlighted
Highlighted

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 ...

Highlighted

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

Highlighted

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