简体   繁体   中英

How would I go about using Microsoft Graph in an OfficeJS addin without server-side code?

I've been developing an office add-in that gets data from MS-Graph about the current user. I initially followed this tutorial ( Create a Node.js Office Add-in that uses single sign-on ). I have been able to modify it to function and call the Graph how I'd like. However, I was wondering if it is possible to do something similar without the need for back-end server-side code as this isn't something I'm all too familiar with.

I've looked at various different tutorials but have been unable to find a clear answer on how best to do it, reading that previous ways of doing this (such as implicit flow) aren't recommended.

Is it possible to do this, and if so, is it best practice? If I should be staying with using the current server-side implementation, what's the best way to go about deploying it?

Yes, it is possible to use Graph API without any back-end service. There is no special requirements or recommendations for the usage. Everybody decides on the best approach for each case separately. I think the back-end side is preferable if you need to do any processing or accessing any data outside of the add-in's APIs.

See Build JavaScript single-page apps with Microsoft Graph for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM