sharepoint vti history links download or break with ?web=1, how can I force view in browser?

George Luther 0 Reputation points
2023-11-28T19:17:09.7833333+00:00

I want to access the most recent major version of a document dynamically
I only want to view it in the browser rather than allow copies
I discovered vti history followed by the version * 512 allows me to access the version

however, when I enter this in the browser, even with web=1 it still downloads the doc

https://myserver.sharepoint.com/_vti_history/1536/DocLibrary/myFile.docx?web=1
also
https://myserver.sharepoint.com/DocLibrary/myFile.docx?v=1.0&web=1

works for half a second and then redirects to the current version...

On a bigger note, I'd really like to prevent copy & download for everyone,
yet still allow doc libraries to sync in file explorer and allow those with edit access to do so in the desktop app.

How might I achieve this?

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | Word | For business | Windows
{count} votes

2 answers

Sort by: Most helpful
  1. Emily Du-MSFT 51,851 Reputation points Microsoft External Staff
    2023-11-29T07:50:22.4966667+00:00

    Per my research, by default, SharePoint allow users to download previous versions through link formatting "https://<SiteURL>/_vti_history/[MajorVersion*512+MinorVersion]/<Library>/Document.docx", users only can open the latest version of file in the browser.

    For prevent users download files, you could use conditional access policy to block download.

    Reference:

    https://learn.microsoft.com/en-us/answers/questions/1274429/how-to-enable-block-download-policy-in-office-365

    For prevent users copying files, go to Library settings -> Information Rights Management.

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. George Luther 0 Reputation points
    2023-11-29T13:41:41.55+00:00

    My understanding is that if I change the download setting either through the Offline Client Availability option in the library settings or by the method you shared, SharePoint file explore sync and co-authoring in the desktop app will be disabled. Is that true?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.