How to Share Files with Password-Protected Links and Expiration Dates in OneDrive

Cloud file sharing has made sending presentations, spreadsheets, and confidential documents effortless. However, sending unrestricted public links to sensitive assets—such as client contracts, financial forecasts, or personal identification records—poses significant security risks. If a standard recipient forwards your shared link or leaves it exposed in a thread, unauthorised third parties can easily download your data.

To eliminate this vulnerability, Microsoft OneDrive (both Personal and Microsoft 365 Business editions) provides advanced link security controls. By combining password protection with automated expiration dates, you can guarantee that only intended parties with the correct passkey can view your files, and that access automatically terminates after a designated timeframe. In this practical guide, you will learn how to configure password-protected and time-limited links in OneDrive on the web and through Windows 11 File Explorer.

Requirements for Advanced OneDrive Sharing Controls

Before creating secured sharing links, it is helpful to understand the account requirements for these advanced features:

  • OneDrive Personal: Password protection and custom link expiration dates are premium features available on Microsoft 365 Personal and Family subscriptions. Free 5 GB OneDrive accounts can share standard public links, but cannot set passwords or expiration dates.
  • OneDrive for Work or School (Business): These security capabilities are included across all standard business plans (such as Microsoft 365 Business Basic, Standard, and Premium). However, organisational IT administrators can mandate minimum expiration dates or require specific link policies through the SharePoint admin centre.

Method 1: Creating Secured Links via OneDrive on the Web

The OneDrive web browser interface provides the most direct and consistent method for applying advanced link protections:

  1. Open your web browser, navigate to onedrive.live.com (or your organisation’s Microsoft 365 portal), and log in.
  2. Browse your folders and locate the specific file or entire folder you wish to share.
  3. Hover over the item and click the circular selection tick, then click the Share button in the top command bar (or right-click the file and select Share).
  4. In the Send link dialogue, click the Settings gear icon located in the top-right corner of the sharing window.
  5. Under “Link settings”, choose your audience. To create a link accessible by any external contact who knows the password, select Anyone with the link.
  6. Under the More settings section, configure your security rules:
    • Can edit / Can view: Set whether the recipient can alter the document or strictly view/download it.
    • Set expiration date: Click the date picker and select the exact calendar day when access should expire. After this date, the URL will become invalid.
    • Set password: Click inside the password field and type a robust passkey. Make a note of this password so you can communicate it securely to your recipient.
    • Block download (Optional): If you select “Can view”, you can toggle this option on to prevent recipients from downloading a local copy, restricting them to in-browser viewing only.
  7. Click Apply to save your security configuration.
  8. Click Copy link to generate the protected URL.

You can now paste the link into an email, message, or chat. For optimal security, transmit the password through a separate communication channel (such as an encrypted text message or phone call) rather than in the same email containing the link.

Method 2: Sharing with Passwords via Windows 11 File Explorer

If you have the OneDrive desktop sync client installed on Windows 11, you can configure these exact security parameters directly from your desktop without opening a web browser:

  1. Open File Explorer on your Windows 11 computer (Win + E).
  2. Navigate to your synchronized OneDrive directory in the left navigation sidebar.
  3. Right-click the file or folder you want to share.
  4. In the modern Windows 11 context menu, select the blue OneDrive Share icon (or choose OneDrive > Share).
  5. In the sharing modal window that opens, click the Gear icon next to “Copy link”.
  6. Select Anyone (or Anyone with the link).
  7. Enter your desired Expiration date and enter a strong passkey in the Set password field.
  8. Click Apply, then click Copy link.

The generated link incorporates the exact same server-side security protections as links generated via the web browser.

What the Recipient Experiences

Understanding the recipient’s journey helps ensure smooth communication:

  1. When the recipient clicks the shared OneDrive URL, they do not see your document immediately.
  2. Instead, a clean Microsoft OneDrive lock screen appears stating: “This link is password protected. Enter the password to view this file.”
  3. The recipient enters the passkey you provided and clicks Verify (or presses Enter).
  4. Once authenticated, the document opens immediately in Office Online or begins downloading.
  5. If the recipient attempts to access the URL after the configured expiration date, OneDrive returns an error message: “This link has expired. Please contact the owner to request a new link.”

Managing, Modifying, or Revoking Shared Links

You maintain complete control over active links and can change passwords, extend deadlines, or revoke access entirely at any time:

  1. In OneDrive (web or File Explorer), right-click the shared file or folder and select Manage Access.
  2. In the right-hand panel, click the Links tab.
  3. You will see all active sharing links created for that file.
  4. To alter the password or extend the expiration date, click the link’s gear icon and revise your parameters.
  5. To terminate access immediately, click the Delete link (trash can) icon. The URL ceases functioning instantly worldwide.

Frequently Asked Questions

Does the recipient need a Microsoft account to open a password-protected link?

No. When you share using the “Anyone with the link” setting accompanied by a password, recipients can open the file in any browser without signing in or creating a Microsoft account.

Can I remove the password later without breaking the link?

Yes. Open Manage Access on the file, edit the link settings, clear the password field, and click Apply. The existing link URL will remain valid and active, but will no longer require a passkey.

What is the maximum expiration date allowed in OneDrive?

On personal Microsoft 365 accounts, you can set expiration dates up to 30 days or longer into the future. On business accounts, enterprise administrators can define a maximum allowed lifetime (such as 30, 60, or 90 days), after which links are automatically expired by policy.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.