What do the parameters in a shared SharePoint/OneDrive link mean?

Share the love

Have you used the Copy Link button in SharePoint or OneDrive for Business and noticed there’s some weird characters in the sharing URL? Examples include:

  • /:f
  • /:e
  • /:w and so on.

Well, there’s actually a reason behind those weird characters and what they mean. You’ll find these characters begin after your SharePoint base URL.

e.g. https://<TenantName>.sharepoint.com/:w:/r/sites/<SiteName>/<LibraryName>/<FileName.ext>?d=<RandomCharacters>?csf=<Number>?e=<RandomCharacters>

Let’s start with how to distinguish the file type of the shared file. This is the first character you’ll come across.

  • /:w – Microsoft Word
  • /:x – Microsoft Excel
  • /:p – Microsoft PowerPoint
  • /:o – Microsoft OneNote
  • /:b – PDF document
  • /:t – Text document
  • /:i – Image
  • /:v – Video file
  • /:f – Folder
  • /:u – Unidentified file type

After the file type, the characters directly after indicate who the file is shared to and whether the file was shared as a read-only or editable file.

  • /:r – Utilizes the permissions already on the file and indicates a read-only view
  • /:s – Utilizes the permissions already on the file and indicates an editable view
  • /:t – Shared with specific people
  • /:u – Shared with people in your organization
  • /:g – Shared with everyone

If you find your links are always displaying the editable version, it is best practice to change the default global sharing link settings in your tenant to avoid item-level permissions.

Finally, you’ll also find some parameters at the end of the URL (after the ? character).

  • d= parameter allows the document to be open in Office Online in the browser for people who already have access (i.e. /:r or /:s shares).
  • e= parameter is used to identify the document. For example, if you share a document, then rename or move it within your library, your sharing link will still work due to the seemingly random characters that follow.
  • email= if you shared your file with one person, their email will be displayed after this parameter.
  • csf= only shows on links that are shared with people who already have access (i.e. /:r or /:s shares).

You’ll also notice that the URL structure changes depending on the sharing option you choose. For links you create for people who already have access (i.e. /:r or /:s shares), the URL will include the path to the filename (which is the same as the example at the start of this article). For all other sharing options, the path is removed and random characters will follow the site name. For example:

e.g. https://<TenantName>.sharepoint.com/:w:/g/sites/<SiteName>/<RandomCharacters>?e=<RandomCharacters>

Personally, I’m still a fan of the old-fashioned URL (a URL that has the whole path to the file without parameters). This type of URL is handy for pages, folders or content that is not likely to move or be renamed. To find the direct link to a file or folder, click the checkbox next to your item. Make sure the details pane is open on the right and scroll down until you see Path.


Share the love

5 Replies to “What do the parameters in a shared SharePoint/OneDrive link mean?”

  1. Hello, very clear post. Thank you.

    A quick question, do folders in libraries have GUID’s and how can I get them manually and in a flow?

    Cheers!

  2. This is a great article. I’m in need of some help, as I am new to SharePoint.

    We have many hundreds of links to documents. These were all generated as “anyone with the link can view”, and this works great except for this one issue.

    If a person goes to this public link (for example):
    https://hydropoint.sharepoint.com/:b:/s/HydroPointDocuments/EdiM3h9p19lPvJltQTTplBsBZzoZT8d6CSapJSGNSK2WlQ?e=jQJiId

    Being that they are not logged into a Microsoft account, nor part of the SharePoint site, they will not (nor should), have any options available except Open/Print/Download – which is great.

    If they then decide to go into their browser tab to copy the link, to share with someone else (this is happening a lot), they get:
    https://hydropoint.sharepoint.com/sites/HydroPointDocuments/Shared%20Documents/Forms/AllItems.aspx?id=%2Fsites%2FHydroPointDocuments%2FShared%20Documents%2FDOCUMENTS%2FWeatherTRAK%2FWT%20Smart%20Controllers%2FOptiFlow%20XR%2FSales%2FWT%5FOptiFlow%20XR%5FCut%20Sheet%2Epdf&parent=%2Fsites%2FHydroPointDocuments%2FShared%20Documents%2FDOCUMENTS%2FWeatherTRAK%2FWT%20Smart%20Controllers%2FOptiFlow%20XR%2FSales&p=true&originalPath=aHR0cHM6Ly9oeWRyb3BvaW50LnNoYXJlcG9pbnQuY29tLzpiOi9zL0h5ZHJvUG9pbnREb2N1bWVudHMvRWMzSE4xZnJmcHhObXdkY25LbFVBWElCWFc3c1dwQzlQcmRmQldLbzVHYzRXUT9ydGltZT0zTC0wUDVWUTJVZw

    This link is no longer sharable and will direct them to a Microsoft login page. I’ve verified with a private browser window.

    Is there anything I can do to this Site, or the documents folder, that will either maintain the link from what was originally clicked on, or present them with a link that is still “…with the link can view?”

    Thank you!

    1. Hi Lance, welcome to SharePoint! As you have stated, when you give a person the first link, it contains all the information that SharePoint needs to understand the sharing requirements. When a person loads the page, it will go to the original URL, which is what you’re seeing in the second link and what people appear to be copying to send to others. As there is no such thing as public sites in SharePoint anymore, all users need to be authenticated to access your SharePoint. The first link is basically an authenticated link that let’s SharePoint know what access the person has to the page. However, if you access the page by the second URL, SharePoint is unsure who you are and if you should have access to the page, and therefore, will ask for you to log in.

Leave a Reply to Lance Elliott Cancel reply

Your email address will not be published.