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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharelink with externa...
Power Automate
Unanswered

Sharelink with external user + expiration

(0) ShareShare
ReportReport
Posted on by 169

Hello!

I have a Send an http request that sends a sharelink to an external user. This link has a feature I was looking for which is the code verification requirement without having to type your email.

 

image.png

 

Now I would like to set a specific expiration on this link (7 days). I tried to replace null with a specific date like "2023-02-05" or variables such as utcnow + add days (1) and none of my tried worked. Would someone here know what I'm doing wrong? The option is there and set to null so I guess there is a way to modify it, right?

 

By the way, thanks to this post I was able to get this far.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Volt26,

     

    Can you try the value below for the 5th of Feb?

     

     

    20230205T000000-0000

     

     

     

    Just had a quick look in the Developer toolbar when setting this field with the 1st of March:

     

     

    {"request":{"createLink":true,"settings":{"allowAnonymousAccess":true,"trackLinkUsers":false,"linkKind":5,"expiration":"20230301T000000-0000","role":2,"restrictShareMembership":false,"updatePassword":false,"password":"","scope":0}}}

     

  • Volt26 Profile Picture
    169 on at

    Unfortunately I get this error (that I don't get when expiration is set to null)

    image.png

  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Volt26,

     

    You forgot the quotes around the value. Can you add those?

  • Volt26 Profile Picture
    169 on at

    Oh this is great, I don't get an error anymore! The script works but there is an issue. After the link expires, the external user can still access the folder and write in it as if the link never expires..

     

    Screenshot of the folder access BEFORE expiration (it was 10h57 and expiration was set for 11h00) :
    image.png

     

    At 11:01 I looked again at the access rights of the folder and here is what I see :

    image.png

     

    I logged on my other computer to make sure it had nothing to do with my member access (this 2nd computer never logs in there other than with an external link). This external user is still able to access the folder and upload files.

     

    I think the script works. Maybe it is something that has to be done in the Sharepoint settings itself?

    I noticed this :

    image.png

    image.png

     

    So my guess is that to make it work, I probably need to follow this tutorial : New Expiring Access Policy to Control Guest Access to SharePoint Online Sites | Practical365 under the "Site-Specific Expiration Settings" section. Unfortunately I don't have the access to change that setting. I sent a request to our IT admin. I expect long delays before they even understand what I'm talking about.

     

    Would someone know of another way? I guess there is none but it's worth asking.

     

    Thank you very much Expiscornovus for giving me the answer!

  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Volt26,

     

    I tried to reproduce your issue in my environment, but I was unable to. In my setup I have set the expiry date to 16:30 via a flow for an anonymous link:

     

    {"request":{"createLink":true,"settings":{"allowAnonymousAccess":true,"trackLinkUsers":false,"linkKind":5,"expiration":"20230203T163000-0000","role":2,"restrictShareMembership":false,"updatePassword":false,"password":"","scope":0}}}

     

    2. The interface shows this time for the anonymous link

     

    testingaccess_expiry.png

     

    3. When I navigate to that link in an in-private browsing session I get an expired message for the anonymous link at 04:31 PM (ignore the 08:31 AM, different time zone, lol)

    linkexpired02.png

  • Volt26 Profile Picture
    169 on at

    Then you proved me it can work. It is most likely because the option isn't set by the admin. I'll wait for a reply from them... Thank you! I'll mark your answer as Accepted solution!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard