0

I am trying to access from an MVC application, the OneDrive files from my office 365 account. What I need is to give my application user the possibility to edit a .docx file, in their browser.

I used Office 365 APIs Preview, to get the list of files, and their properties, but I don't know how to allow the user to edit that file in his browser.

A solution to this problem could be to share the file with different user of my application, by creating a guest link. From the office365 portal this is a simple task: - OneDrive, select the file -> manage -> share with -> get a link, the link can have read only or read write rights.

I don’t know how to create this link from the APIs.

Can you please tell me how can I generate this guest link or if there is a different solution to this problem.

1 Answer 1

0

In short, I don't think this can be done in a supported way.

There is a real risk that if you figure out the URL structure, that the structure could change. I suggest that you make a feature request by using UserVoice. It would be preferable that the REST API and the client objects construct this URL for you.

With that said, if you take the sharing link, and place it into a browser window, the link will redirect to Word Online with the document in the browser. Take a look at the structure of the URL in the Word Online browser window. You could use that as a template, and along with the information from the File.Url property from the Office 365 API Preview, you may be able to put together a URL to that file. Expect that this approach would not be supported and would be subject to URL structure changes.

If other people find that this would be a useful feature, please use UserVoice to let us know.

1
  • Thanks, I think this is the solution available for now to build the url. I check the UserVoice and there are already some question on this subject.
    – dany
    Sep 5, 2014 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.