SOLVED

Making OneDrive links last longer or be renewable?

Steel Contributor

At my school teachers have used onedrive links to build QR codes that are then used in books or on posters. The problem is now that OneDrive / SharePoint link have a maximum lifetime of 730 days those QR codes start failing. Is there anyway to allow a user to make a forever link or to renew the existing link so it keeps working without changing? If the link changes then the QR code changes and then they have to redo all the work.

4 Replies

Hello! Usually you can create documents in word, then use the qr codes with the mergefields, eg invoice.
In my case i prefer qrcodemonkey or visualead to create these.
You need a Sourcelist like php links for each asset, in an excel sheet saved on OneDrive, with Name, Number and Link. In your case your link on OneDrive depends on your oneDrive item Settings only, thats why they are dynamic ones. The static/dynamic QR Code actually does not have an expiry date .

 

You can set a QR Code in single items in OneDrive and as you have Office 365 Subscription you can set an expiry date then. If you haven´t, i guess its these 730 days you mentioned.

 

See that article pls.: https://www.drwindows.de/news/12697-onedrive-freigaben-verfallsdatum-bereits-aktiv

For example, in a word doc and an excel list both saved on onedrive, not directly the link in onedrive/sharepoint,  the field in a word doc can be entered with {DISPLAYBARCODE} {MERGEFIELD yournumber} QR \q 3 (q3 means hig quality)

Pls. see that tutorial for further details (maybe one of your teachers speaks german?) Link is:“ https://blog.egovernment.krzn.de/dynamische-qr-codes-im-ms-office-word-serienbrief-macwindows/

I guess they have a qr app and they depend on everlasting links as information stored within. And they are haypy with that. It’s german public sector, one of the most accurate businesses in Germany. They do it without O365. Hope that helps. Greets, Eva

best response confirmed by Brian Hoyt (Steel Contributor)
Solution

I believe the 730 limit only applies if you have configured link expiration. You can simply turn it off (set to 0).

It is true that the maximum number of days a link can be valid for is 730 days. It is just the way it is at this moment.

However, there is a potential solution which would require some development.

  1. Create a link programmatically using the OneDrive File Sharing API.
  2. Create a record in your custom application with a unique ID that points to this URL along with creation date (or expiration date).
  3. Create an HTTP endpoint say https://yoursite.com/url/<ID>. This endpoint simply redirects the user to the actual OneDrive file sharing URL. The HTTP endpoint will have some kind of logic which would simply create a fresh OneDrive link for a file when requested if the actual OneDrive link is about to or has already expired. This little logic would be executed before redirection.

Now, instead of this custom application, you could instead use a URL shortener service like Google URL Shortener or Tiny URL. However, the problem is that their own expiration policy would still be out of your control. Google URL Shortener's URLs don't expire as per their current policy. For reference, here is the Google URL Shortener API documentation https://developers.google.com/url-shortener/v1/getting_started


@Vasil Michev wrote:

I believe the 730 limit only applies if you have configured link expiration. You can simply turn it off (set to 0).


Wow, that was easy. It would be nice if UI mentioned that option. After you enter 0 and hit save it actually changes it to say Never.OneDrive Link Length.png

1 best response

Accepted Solutions
best response confirmed by Brian Hoyt (Steel Contributor)
Solution

I believe the 730 limit only applies if you have configured link expiration. You can simply turn it off (set to 0).

View solution in original post