Cannot share an autoopen-tagged document in read-only mode - ms-office

I have an Excel file in my OneDrive, I want to create a URL link such that:
1) when my colleagues open the URL in a browser, it could open the file in Excel Online in the read-only mode,
2) and the task-pane of Script Lab is auto-opened.
I have followed this to tag my document, then uploaded it to OneDrive. Then, I used Share to share this document in OneDrive as follows. Note that I well set "Anyone with the link can view"
Here is the link: https://1drv.ms/x/s!AmAcI5jpNEmng2vYPFkfDRVMDFCP?e=F1I824
My tests showed that for an authenticated user, the link does trigger the auto-open of the task-pane of ScriptLab. Though, for a non-authenticated user, the link does NOT trigger the auto-open, it is a known bug, which has not been fixed.
However, my tests showed that a non-authenticated user can not edit the file (which is expected), whereas another authenticated user can well edit the file, this is not what the read-only mode is supposed to do.
Additionally, my tests showed that a non-autoopen-tagged file does not have this problem; the read-only mode works well.
Does anyone know what is happening here, is it a bug?
Is there any other way to share a document (by Microsoft Graph?) such that it could 1) trigger autoopen and 2) be read-only?

Related

Auto-open does not work for people who have not signed in in browser

I want to share a document online by a URL with some colleagues. When they click the URL and view the document online, I want a task-pane add-in to be automatically opened.
I used Office-OOXML-EmbedAddin to create such a file with Script Lab auto-opened, then I put the file (view-only) on my OneDrive:
https://1drv.ms/x/s!AmAcI5jpNEmng1NhS0xbIMcUnUNZ
However, our tests show that, for people who have not signed in with Microsoft Account in their browser, the auto-open does NOT work, though they can view the document.
Is this behavior expected, given that people may not stay signed in all the time?
PS: note that if people download the document, they don't need to sign in to enable auto-open in Excel desktop.
This is a known bug. Until it is fixed, users will have to be logged in when they open a document on OneDrive in order for the autoopen feature to work. Sorry for the bad news, but it is on Microsoft's radar and we know it is important.

Links i harmon.ie offers a download, not the actual SharePoint document

When I attach a link in an email using harmon.ie, I get an url that includes the file name. However when the recipient clicks it, it starts to download a copy instead of opening the actual SharePoint document.
The link is typically on this format:
[company].sharepoint.com/sites/[subsite]/[library]/[filename.docx]
The same link retrieved directly from SharePoint would look something like this:
[company].sharepoint.com/:w:/s/sites/[subsite]/EZ31C3wRKuVPnOOB7vNGMsMBiI9eYAjGTuiaEODu_c3wpw
That link will typically open the document in SharePoint as expected.
It did not use to be like this. The links from harmon.ie used to open documents instead of downloading copies. I am afraid I cannot say when we discovered this, but I believe it was a couple of months ago. We are using the free plan, and are not qualified for support from harmon.ie. We were pointed in the direction of this forum, and I would be most grateful if someone could help us.
Thanks
Eigil
Harmon.ie creates plain valid links to Sharepoint document and they are opened by default browser (like any link you will add inside an email)
The behavior is only controlled by the browser not by harmon.ie (you can check it out by adding the url in the browser)
The only solution to control the behavior is to use the feature to generate OWA link so that it opens in Office online.
Indeed, we have feature allowing to create links that will open in OWA (hence in the browser)
Please read carefully register key: GenerateOWALinks as detailed at https://harmon.ie/provision-harmonie-outlook-all-users
Note also that if the recipient of the email has harmon.ie installed, he can right click on the link, select Open in Harmon.ie. The document will appear in harmon.ie sidebar (at the Sharepoint location), double clicking on it with open the document in MS Word.
Thanks,
----- Jean

SharePoint CSOM: Open .docx file in Word Online (Office 365)

I have written some code to connect to a SharePoint online server and get a list of *.docx (Microsoft Word) files from a folder on there.
I then display this list of files in a web page and each file is a tag, so that the user can click on it and "open" the file.
When the user clicks on the file, it prompts the user to Open/Save the file (the standard IE/Chrome file open/save dialog). Instead, I want the file to open up in Word Online (in the same/separate browser tab).
I tried searching for possible API support online, but can't seem to find any. SharePoint Online itself seems to be able to do this. If you click on a .docx (or any other Office file), it will open it in Office 365 (provided you have that provisioned).
Any help would be greatly appreciated.
You need to add the appropriate parameters to the link that the user clicks on.
Have a look at an existing document library and see the links that it creates:
https://mytenant.sharepoint.com/_layouts/15/WopiFrame.aspx?sourcedoc={1767368F-62FB-4C40-B3F2-C4EE44E88735}&file=My%20Document.doc&action=default
If the user is not licensed for Office 365, I think that they will still be offered a download. Not entirely sure though as we don't allow that on our tenancy. Certainly if they are only provisioned with SP Online and not the rest of O365, they can view the document online but cannot edit. Though recently we've seen people still able to edit - not yet sure if that is one of Microsoft's secret updates or a mistake by them.
RESPONSES TO COMMENTS:
When I say not provisioned in the rest of O365, I really meant that they were licensed for SharePoint but not anything else (a P2 license rather than an E3), that doesn't give rights to use the online (or iPad) editors. As far as I know, the only real way to test for that is to either try it or to use an Admin account to look at the license.
You cannot "pass credentials" to WOPI since credentials for Office 365 applications come from a separate system. You have to get credentials before you are allowed to access anything in Office 365. Basically Azure AD is the service & the login is done via login.microsoft.com, the login provides a token to your browser that is exchanged with the server on every request. To reuse an existing credential, you have to be using an application that "knows" you have already logged in. Typically, Microsoft use a helper application that picks up the login from IE if that's how you logged in and makes it available to other applications such as Office. If you are using Firefox to log in, IE & Office may not know that you have done so (though there is a plugin for FF that gets installed if you let it which does the same thing).
By the way, if you know how it REALLY works, please don't shoot me down for trying to simplify the process for others. :)

Opening documents after checkout from SharePoint

Why won't my document that i'm checking out from SharePoint not open after the checkout?
The status of the document after the check on SharePoint shows that I checked out the document but it won't open automatically.
What's even more annoying is that I don't know where the file has been checked out to.
Is there any way to find out where the document is being checked out to and how to get it to open automatically after the checkout?
I tried it both on Chrome and IE.
Check Out in short means "Reserve the file for me so that no one else makes any changes to it. It does not mean "Open the document"
SharePoint also shows the Checkout status and to whom it is checked out. I will be able to explain more if you tell me "what exactly you see" and why you think these details are missing.
In Sharepoint the checkout prevents other user to modify the document.
You can then open the document clicking on the title.
Your client application (Word for example) will open the document directly from the Sharepoint site.
When you will save the document after changes, it will be saved on the site.
You don't need to save a local copy because the document library works like as a shared folder.
You can even connect the document library on a drive letter if you want.
Try this from a command prompt:
net use k: http://YourSite/YourDocumentLibrary
This will create a network drive that point on the library.
(it works only with WebClient service running on client machine).
The best way to "checkout and edit" is to open the document using its sharepoint url.
For example, if you have a Word file to edit, you can copy its sharepoint url and go to MS Word and paste it in Open dialog box.
You will be asked for credentials and then it shows the checkout button on top of the document.
Later, you can checkin the edited doc using checkin option in file menu.

Sharepoint 2007: Disabling Edit/Read Only mode?

If I open a doc in read only mode I'm able to press save and then it opens up a save as box and the default directory is the directory on the sharepoint server and if you press save you save it to the server.
This actually makes the whole process not really "read only" mode since I could actually update the document.
Is there a way to prevent this from happening so that if someone chooses read only there is no way possible to updload any changes back to the sharepoint site?
Also, it has been suggested as a solution to get rid of the edit/read only option so that people have to check out the document. Is there a way to remove the edit/read only option on documents?
Rather than relying on the client software to prevent saving, you need to modify the permissions on the server - give the user read only access to the document or even the whole list. That way they will get an access denied error if they try what you describe or uploading a different file with the same name.
The Read-only and Edit prompt are driven by SharePoint and a setting in the DOCICON.XML file. If you have added PDF as a Document extension inside the DOCICON.XML you will need to also add an additional attribute in the line and that is opencontrol=”” this seems to stop SharePoint from applying it's header to open the document.
<Mapping Key="pdf" Value="icpdf.gif" OpenControl=""/>
-Rob
(Edit : Sorry I have not tested this on SharePoint 2007 only SharePoint 2010)

Resources