cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sacheu
New Member

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

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

3 REPLIES 3
SandyU
MVP

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

 

Sandy
@SandyU



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

Proud to be a Flownaut!


v-litu-msft
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:

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

 

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

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (44,960)