Showing results for 
Search instead for 
Did you mean: 
New Member

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



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.



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...?



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

Community Support
Community Support

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:


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.

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'.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,552)