Using Password-Protected Sharing Links with SharePoint Online

Stop Unwanted People Using Sharing Links Sent for Documents

Announced at session BRK3100 at the Ignite 2018 conference last September and then included in the OneDrive for Business Roadmap update for June 2019, password-protected sharing links are now available across Office 365.

Only for Anyone Links

Before getting too excited, let’s reflect that this feature only work for Anyone sharing links. These are the links that can be used by anyone who has them. Many Office 365 tenants tune the sharing controls for SharePoint Online and OneDrive for Business to prohibit the use of Anyone links because they consider them a security risk. But if your tenant allows Anyone links, you can now protect them with custom passwords. The password protected sharing link feature is available in the SharePoint Online and OneDrive for Business web clients. Block download is available in the OneDrive mobile client.

Sending Password-Protected Links

To begin, select a document and share it. Select “Anyone with the link” as the share. Click Anyone with the link to change the settings. In Figure 1 you can see that a password has been entered and we’ve also selected the option to block the recipient from downloading the document. This forces Office 365 to call the online app to display the content, so it only works for Office documents.

Adding a password to protect an Anyone link for a SharePoint document
Figure 1: Adding a password to protect an Anyone link for a SharePoint document

When you’ve updated the settings, click Apply. You should now see that the icons under the link have changed to include a padlock (password protected) and download barrier (Figure 2).

Reviewing the sharing link before sending it
Figure 2: Reviewing the sharing link before sending it

If a sharing link has already been created with a password, you’ll have the chance to update the link with a new password or use the existing password (Figure 3). It’s not a good idea to replace a password on a sharing link unless you update previous recipients with the new password.

A password already exists for a sharing link
Figure 3: A password already exists for a sharing link

Click Send to tell Office 365 to create and send the message with the sharing information. You’ll find the message in the Sent Items folder of your Exchange Online mailbox. When the recipient opens the message, they’ll see that the link will work for anyone with the password. Before they can open the content, you’ll need to give them the password through email, a voice message, SMS, Teams personal chat, or other method. Once they have the password, they can click the link, input the password (Figure 4) and see the content.

Entering a password for a sharing link
Figure 4: Entering a password for a sharing link

Limited Access to Content

In our case, the link we sent was both password-protected and blocked for download. As noted above, if the document is an Office file, Office 365 calls the relevant online app to open it. As you can see in Figure 5, the user is blocked from downloading and printing the file.

Document blocked from download by a setting in a sharing link
Figure 5: Document blocked from download by a setting in a sharing link

Modify Links

If necessary, you can use SharePoint’s Modify Access feature to update sharing links, including the ability to reset passwords in links. You can’t remove a password from a link once it is present.

Password-protected sharing links are straightforward to use. The sole difficulty might be for organizations to embrace the idea that they can permit Anyone links. After all, even if you decide that it’s OK to allow these links, there’s no way to force users to add passwords to the links every time. Perhaps that might be a future feature.


For more information about managing SharePoint Online and OneDrive for Business, read the chapter in the Office 365 for IT Pros eBook.

18 Replies to “Using Password-Protected Sharing Links with SharePoint Online”

  1. Hi, when i try to share a file with the “anyone with the link…” it does not give me the option to password protect the file. It shows only the option to allow edit and expiration. Any idea why?

    Thanks
    George

    1. Probably because the code has not yet reached your tenant. Can anyone in the tenant create a password-protected link?

  2. Hi, thanks for the reply
    For some strange reason i can see the Set Password option when i share a file from the web browser now. However it is not shown when i right click and choose Share from the context menu of windows explorer. Is this by design?

    Thanks

    1. You’re comparing the native UI (SharePoint browser) with an add-in to the Windows Explorer. It doesn’t surprise me that differences exist. Windows is updated at a different cadence to the browser app, so perhaps the two will mesh in the future.

    1. Your tenant administrator has probably blocked Anyone links. You’d have to ask them.

  3. I have an Excel doc with many hyperlinks. It is password encrypted. The data source of these links are extracted from files parked in Sharept. I then uploaded this file in Sharept. When i emailed the link to my team they can open the file but cannot open the links. When they tried to open the file in Sharept directly it says “we can’t open the workbook in the browser because it uses unsupported features’ . I have more than 150 hyperlinks in the file. Please can someone help with this big problem. Thanks!!

    1. I’m afraid I can’t help. This isn’t a support site. You should file a support call with Microsoft and have their technicians look into the problem.

  4. Hi Tony, Do you know if there is a way (PowerShell or other) to force users to add a password when using the Anyone with the link?

    I’ve been searching all over without success. I like this option but many prefer to disable it in fear of sharing important information that could be accessible to the entire world. I’m trying to confort them in using this link which is makes accessing files easier to use for not-tech users.

    1. I’m sorry. I don’t know how to force users to add a password. I’ll have a poke around and post something here if I find anything.

  5. I have created a spreadsheet on excel on-line using sharepoint.
    I have sent out password protected links to the people I want it shared with.
    However, it seems that the password is not sticking after you have gained access after the first password prompt.
    My question is, will this password protected link be sufficient after the first initial log in by the recipient say – if their emails were hacked and the link was clicked?
    I am concerned that if their email was hacked, anyone can gain unauthorised access using this “password protected” link in the emails I have sent out.

    1. The password acts as a method to authenticate the recipient. It is not a persistent protection once someone gains access to a file. If you want persistent protection, use a sensitivity label.

  6. Hi Tony,
    Can we setup this via CSOM? I didn’t get any option of password protected a document via CSOM?
    Is there any option to do it programmatically?

  7. Is their an option to be able to view what password you set on ‘Share with anyone with link’ to ensure the password is correct before sending it out to people with the link

  8. Is there a way to send a zipped password protected file using the “people you specify” option? It won’t seem to let those people edit the doc after entering the password to access it, even though editing was enabled in the sharing function.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.