Currently in the Microsoft Flow 'Create sharing link for a file or folder' the Link Scope field only has the following options:
- Anyone with the link, including anonymous
- People in your organization
Please also add the following option which is available in SharePoint and OneDrive:
- Specific people
We really need to be able to create a sharing link just for specific people.
I tried it about 20 mins ago - set the link expiration to be 2 minutes after the link was created. I tested before and after the 2 minutes were up, using incognito windows, and both times I could still access the share and the files.
My HTTP Requests specify linkKind 6 (Flexible) and Role 1 (View) - were you using the same settings when you tested?
The Inputs from the flow run:
However, a review of the Output reveals a null expiration date:
@David_Nguyen_vn Hi David! Thanks so much for your solution! Would you know how I can delete a shared link using the API as well? This would be super helpful for me!
You can delete the link with UnshareLink request
I use the Parse Json to Parse ShareID from createlink action. Then I delay 3 days so that receiver can access the file with the link. Then delete the link @adriaanvw This is also a good method for the expiration date.
Thank you @David_Nguyen - will give this a try
ThankYou! I have been searching all night for this!
I will try it in the morning!
Thanks mate! Legend!
@David_Nguyen_vn Hi David - that worked great! Thank-you! Follow up question - Do you know how I can set the "BlocksDownload" property to true? I can't seem to find any documentation on any of these api calls.
@kerridge23 These are from my knowledge, just public in this thread now :)))
Role: 7 will block it.
"linkKind":"6", //6: specific,7: external"role":"7", // 2:can edit, 1: can view, 7: block download
@adriaanvw My output has Expiration.
You are a bloody genius!!
Thank-You so much mate!
I owe you a beer!
Needs the additional features of :
Thanks so much!!
Ideally the same options should be available as offered by SharePoint, so not only specific people but also the option to allow "People with existing access" - otherwise there is no way to allow Azure AD Guest/External users who already have permission to the location to be able to use the link, without allowing Anonymous sharing which would be against many security policies: