Question: We have a cloud based audit application. While performing audit a user typically uploads a lot of documents. Currently in order to view the documents he has to download them. Business requirement is that on clicking the document it should directly open up in another browser tab using office 365 just like dropbox/onedrive. The user should be able to view, edit, save it on server (without downloading) and close it. How to achieve that in our application?

Our webapp is built using ReactJS, NodeJS & MongoDB. Whenever a user uploads a document it gets saved in a AWS S3 bucket.

I went through Microsoft Graph API and OneDrive RestAPI's. Looks like the only solution is to use the OneDrive API's to save files in OneDrive instead of S3. And then it should allow you to use the Office365 apps. Is this the right solution? Am I missing anything?

Is there any other solution?

Answer: 
While the easiest solution is indeed to store the documents in OneDrive, there's also another way. You can enroll in Microsoft's [Cloud Storage Partners Program](https://dev.office.com/programs/officecloudstorage) and implement the [WOPI protocol](http://wopi.readthedocs.io/en/latest/) on your service. This would allow the Office Online viewers/editors to integrate with your service's data directly.
You need to use both aws and O365 api to reach a working solution. Try the following steps (PS: I have not tried this. But I have saved edited documents from Office 365 to AWS) 

1. Read the uploaded document from AWS using AWS api's and upload it to office doc using office doc api.
2. Edit the doc using office docs api.
3. Save the doc back to S3