is it possible to use a link with parameters when using Document ID to set whether the document opens in SharePoint or downloads when the link is clicked? I am currently using /_layouts/15/DocIdRedir.aspx?ID=DOCID, but not all documents open in SharePoint (e.g. a PDF document is downloaded immediately). Is it possible to somehow force the download or opening of the document?

If not, is there a URL that would allow the document to be downloaded based on the Document ID? I only found /_layouts/download.aspx but couldn't find documentation for it or a parameter that supports Document ID.

Thanks, Jan

1 Answer 1


Use the “Copy link” Option and append “&download=1” Frame the download link to force Download instead of Open.

You can use the "Copy Link" option and append “?web=1” to force open.

  • Thank you for your answer. However, I think that if I use copy link, I will lose the benefits of Document ID (keeping the link when moving the file). Commented Nov 16, 2022 at 15:19
  • This doesn't seem to work in the Edge browser unfortunately. We have tried several approaches, eg 1) &download=1 2) &web=0 3) https://<tenant-name>.sharepoint.com/_layouts/download.aspx?SourceUrl=<document-url>. We have been googling and testing for hours but can't find a solution to the problem "How to force download document via link in SharePoint Online". Commented Jan 13, 2023 at 5:57
  • update and fyi, solution is here: sharepoint.stackexchange.com/a/121124 Commented Jan 13, 2023 at 6:08

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.