Creating link to document in Sp2019 On Premise

Jonsson, Lars Konsult 21 Reputation points
2021-09-09T11:11:51.917+00:00

We are have issues with the link that is created when chosing ... Copy link in document librarys.

The last part of the created URL: xxxx.xlsx?csf=1&e=lZbyNW , in this case when using the link the user gets message if he/she trusts the content etc. before opening the actual document, if we remove everything after xxxx.xlsx.... the link works fine and the document opens directly.

How do we get around the creation of ?csf= when copieing links?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,227 questions
0 comments No comments
{count} votes

Accepted answer
  1. Elsie Lu_MSFT 9,761 Reputation points
    2021-09-10T06:20:21.41+00:00

    Hi @Jonsson, Lars Konsult ,

    This this the behavior by default. Csf=1 means added when sharing with People with existing access.

    As mentioned, similar to:

    130975-57.jpg

    d= xxxx – this will help creating a unique URL to allow opening the file in the browser. If you remove this parameter, you’ll get a download request. This parameter is only added when you share with People with existing access.
    Csf=1 – added when sharing with People with existing access
    Web=1 – opens the file in the browser
    E= xxxx – The purpose of this parameter isn’t really known; if you remove it, the Share will work the same way.

    For more information you could refer to:
    Understanding how Share-links are built in SharePoint and OneDrive
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    A similar post:
    What is the purpose of "?csf=1" ?


    If the answer is helpful, please click "Accept Answer" and upvote it.

    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 additional answers

Sort by: Most helpful
  1. Wendy Li_MSFT 1,711 Reputation points Microsoft Vendor
    2021-10-01T08:58:38.527+00:00

    Hi @Jonsson, Lars Konsult ,

    Like Elsie said, "csf=1" is added when sharing with people with existing access, this behavior is similar to SharePoint Online.

    Did you configure Office Online Server(OOS) for your SharePoint 2019 environment?

    In my environment, I just have SharePoint 2019 (16.0.10371.20043) without OOS. I copied the link of an Excel file from a library via "Copy Link", then used the copied link with "?csf=1" directly to access the file again, it downloaded the document, which is a normal result without OOS.

    The copied link I used is:
    http://v19/Shared%20Documents/New%20Text%20Document.txt?csf=1&e=cSRwr4

    Result:
    136917-image.png

    Also, if I remove "?csf=1..." after the coped link, and use the new link to open the file, it also redirects me to download the file.

    So, please have a try and let's know your result.

    0 comments No comments

  2. Jonsson, Lars Konsult 21 Reputation points
    2021-10-22T13:22:19.737+00:00

    Would the OOS help us in this case.
    Right now staff who like to share a link with others with access to a document need to remove the "?csf=1..." for the user so they don't need to go trought the hazard of clicking on "would you like to open the file "xxxx" pop-up?

    /Lars

    0 comments No comments