none
Embedding office documents within MVC5 application RRS feed

  • Question

  • Dear Office experts,

    We are building software for IT companies to document client sites, like the network setup, firewall configuration, licenses in place, etc.. All of this is done using custom templated office documentes we need the administrators (the IT company) to use within the application as office online integrated/embedded documents (both excel and word), so they can directly create and edit them within the web application.

    Now we found a way to use the OneDrive REST API's to have our application login with an office-365 account, upload a document based on the right template to SharePoint, share it and get the embed link within the right place inside of the application. This would most probably work.

    But now, we want the clients of these IT companies to get a portal login as well so they can see all the documents that were created for them as well. And this is where our question comes in.

    We have office-365 licenses/accounts for all of our employees and can also make that mandatory to the IT organizations we will sell this software to. But how do we handle these portal visitor accounts? One client could have many employees the want to give access to this portal and see the word and excel documents online.

    But if we require Office-365 licenses for all of them that would be impossible to do. Also, they would never use the license for anything else besides reading office documents within this portal. We do need it secured, client A should only be able to see documents for client A and not for client B and vice versa. So we need some sort of accounts to specify the access rights.

    Is there any way to accomplish this? A "invided user" or "document editor account" we can create using the API that does not require a full office-365 license?

    Otherwise the solution to use embedded office documents will never be possible. Our workaround would be to save the word templates to HTML and import it within a Telerik editor for the online editing and save it back to a local word docx on save from the application. But we would offcourse much rather use the online office power instead.

    Hope you can help and that this is indeed the right place to ask this question. My apologies if it is not.

    Tuesday, January 17, 2017 5:09 PM

All replies

  • Hi Arjan,

    >> share it and get the embed link within the right place inside of the application

    What do you mean by embed link? How did you get this embed link? Do you mean you share a SharePoint document by Share->Get a link in SharePoint site.

    >> But how do we handle these portal visitor accounts?

    What do you mean by “visitor accounts”? Do you mean Visitor accounts in SharePoint site?

    >> Is there any way to accomplish this? A "invided user" or "document editor account" we can create using the API that does not require a full office-365 license?

    Do you mean that you want to share a documents in SharePoint which is visible to Group A, but invisible to Group B

    If I misunderstood you, please feel free to let me know.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Wednesday, January 18, 2017 6:40 AM
  • Hi Edward,

    Thank you for your reply! What we currently do is have the MVC application create the templated office document within the background, logon to OneDrive with it's application user, upload the file to OneDrive, share the document with all of the team members and get the link to embed the document on another page. This embedded link is then presented within the MVC application to the user so he or she can see and alter the document within the application. Also, if another user within the team logs in, they can also use this document.

    But now we want to create external clients to access the portal as well. These would be the clients of our clients using the software. We can create an account for them within the MVC application, but we can't also create an Office-365 account for them to share the embedded documents to.

    So the question actually is, how to show office online embedded documents within an MVC5 application to users that don't have an Office-365 account, or at least, we can't be sure that they have one. But we do still want them to at least view the office documents within the application.

    Is there some kind of application integration license for this available? Or another way to accomplish this?

    Please let me know if I need to ellaborate further, thank you for your time and help.

    Best regards,

    Arjan.

    Thursday, January 19, 2017 6:41 AM
  • Hi Arjan,

    >> This embedded link is then presented within the MVC application to the user so he or she can see and alter the document within the application.

    Do you mean you follow OneDrive online->Shared->One Office file->Embed to get the embedded link? If so, I am afraid there is no way to edit the document without a Microsoft account. In my option, there is no need to create an Office 365 account. A Microsoft account would be enough.

    >> another way to accomplish this?

    I found that if you follow OneDrive online->Shared->One Office file->Share-> Get a link, there is no need to log in when you want to edit the document by follow this link. So, for a workaround, I would suggest you add a new button with function that open the file by this link. In other words, show Office file in MVC with Embed link, and edit Office file with a shared link.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, January 20, 2017 6:08 AM