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

3 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!

Leave a Reply

Your email address will not be published. Required fields are marked *