Forum Discussion

DKTOA's avatar
DKTOA
Copper Contributor
Mar 09, 2025

Set expiration date to fixed date?

Hi,

When sharing a file in Onedrive, is it possible to set 'set expiration date' to a fixed date? I wish to set the date to current date + 30 days if possible  

 

2 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    Setting an expiration date beyond 30 days in OneDrive for Business:

    1. Manual Method (Per File, Any Expiration Date)

    • When sharing a file, you can manually set the expiration date to any future date (e.g., 60 or 90 days).
    • Steps: Right-click file → Share → Set expiration date → Choose desired date → Apply.
    • Pros: Simple, no admin rights needed.
    • Cons: You must do it manually for every file.

    2. Admin Policy (For "Anyone with the Link")

    • An admin can set a default expiration policy (e.g., 90 days).
    • Steps: Microsoft 365 Admin Center → SharePoint Admin → Policies > Sharing → Set expiration (max 730 days).
    • Pros: Automatically applies to all anonymous links.
    • Cons: Only works for "Anyone with the link" (anonymous sharing), not for internal or specific people links.

    3. Power Automate (Automated for Any Link Type)

    • Use Power Automate to automatically generate sharing links that expire 30+ days from today.
    • Steps: Create a flow → Use "Create sharing link" action → Set expiration to utcNow() + 30 days.
    • Pros: Works for all link types (Anyone, Specific People, Organization).
    • Cons: Requires setup and Power Automate knowledge.

    Option you can choice…

    • If you want quick manual control, use Option 1.
    • If you are an admin managing many users, use Option 2.
    • If you want full automation for any type of link, use Option 3.
    •  

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

     

    Was the answer useful? Mark as best response and like it!

    This will help all forum participants.

Resources