简体   繁体   中英

Can i use office 365 Rest Api implemented here [https://github.com/jasonjoh/node-tutorial] in node.js as a Web service?

As the mentioned https://github.com/jasonjoh/node-tutorial example is a web app. but i want to use it as a web service for example :-

i want to run this app on one machine(on server) and other apps made in(mobile apps, desktop and web app) could implemented or consume this services.

once user consume it my service would return [ https://login.microsoftonline.com/common/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fauthorize&response_type=code&client_id=9892b97f-0026-4t3f-aa4f-5cb2olpdee7e] then this url will be open in user's device/machine browser, then user could enter his/her office 365 credentials and once he clicked on SignIn it should aging come in web service and then it authorize the user using access token which is stored on server in cookies and then get/read emails from user office 365 account.

so please suggest me is it a possible scenario ? or if you have any alternate way to do this please let me know.

Thanks in Advance

Yes, this could work. You would need a web front end for the user to sign in, but you could then use the access token from a web service. Another alternative, assuming what you mean by web service, is to run in an unattended fashion by using the client credential OAuth flow , which allows an organizational admin to grant access to all mailboxes.

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