web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How can I create a sha...
Power Automate
Unanswered

How can I create a share link of a file in my 'Onedrive for business' with longer than 1 hr expiration?

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

In my MS flow, I am using 'Create share link' in  'Onedrive for business'.

But I find out that that link will expire after 1 hr of creation.  I have tried using 'anonymous' or 'organization'

but both will expired in an hr.

How can I create a share link which lasted longer than an hr?

 

Thank you.

Sam

Categories:
  • SandyU Profile Picture
    225 on at

    Hi @sacheu 

    I don't find this to be the case when I use the OneDrive for Business Create share link by path action. The link doesn't expire in my case, because I don't have an expiration set in the SharePoint Admin Center for anyone links. Perhaps there is a global expiration policy set in your tenant?

    Although in any case I thought any expiration should be in terms of days, not hours. So your case sounds very unusual. I'm unsure where you're located and exactly how SharePoint/OneDrive calculates the expiration date of a link, but I wonder if your timezone could have anything to do with that (i.e. if 1 day = only 1 hour for you before it's the next UTC day) - just a thought, I haven't tested that theory.

    Does this help you...?

     

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @sacheu,

     

    I have tested on my side 3 hours ago, create a share link of Onedrive file and email it. 3 hours later, the URL of the Onedrive still could access, the following screenshot is how I configure it:

    Annotation 2019-11-19 163030.png

     Just like @SandyU said, there is no expire setting when you create the Share link in Flow, the default expiration is very long.

     

    There is a post about the default expiration in OneDrive, hope it can help you:

    https://answers.microsoft.com/en-us/msoffice/forum/all/default-expiration-in-onedrive/8133d277-2bac-4786-93ec-fec785def02f

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • sacheu Profile Picture
    4 on at
    I test it by going to 1 sample run of my MS flow, check the output of the 'create share link'. 
    Then  I manually load that link after 1+ hr. I get this error message:
     
    Sorry, something went wrong
    The access token has expired. It's valid from '11/20/2019 5:01:11 AM' and to '11/20/2019 6:01:11 AM'.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard