We are a team of tech enthusiast and this section is where we love to share our experience and our knowledge. We try our best to help you understand technical topics by giving you live instances of how-to’s, guides, tips, FAQ’s and troubleshoots.
If you like it or have questions, do share your feedback in the comments section below.
Create a sharing link for a file or folder in SharePoint for specific people. (External emails)
We will see these below things that are related to sharing SharePoint files/folders/items:
· Share SharePoint files or folders
· Share SharePoint files or folders using flow
· SharePoint API to get a shareable link to a specified external user
Share SharePoint files or folders via SharePoint GUI:
The files you store on a SharePoint site are usually available to everyone with permissions to the site, but you may want to share specific files or folders with people who don’t otherwise have access to the site. When you share files and folders, you can decide whether to let people edit or just view them. You can see who a SharePoint file is shared with, and stop sharing SharePoint files or folders, or change permissions, at any time.
If you want to send an email invitation to people, pick the file or folder you want to share by selecting its circle icon from SharePoint site.
Select share option, it will show following pop-up:
By clicking on small arrow next to the ‘People in your organization with the link can edit’ you can select an option for who you want to give access to with the link. It will show following options, please refer below screenshot.
Also, you can restrict access by selecting option ‘can edit’ or ‘can view’ as shown in below screenshot
Once you click on ‘Send’ option it will send email invitation like below
To open that shared folder or file, it will ask for verification code which will send to your same email account. It will look like as below screenshot.
Share SharePoint files or folders using flow:
If we want to automate sharing SharePoint files or folders, then here is the way.
SharePoint connector in Power Automate provides ‘Grant access to an item or a folder’ action to granting access to external users.
The ‘Grant access to an item or a folder’ action requires the following inputs:
· SharePoint site URL
· List or library name or identifier
· The item or the file identifier for which to grant access
· The recipients whom you want to grant access
· The permission role you want to grant
In the flow action, you can also include a message and choose to notify the recipients once they get access to the item or the file.
Note: if we set notify to recipients’ parameter to ‘No’ and recipients is external user, he will not get invitation link and not able to access SharePoint file or item without invitation.
When the recipients receive email, it will look like below screenshot:
To open folder or file, it is prompting for email verification and then for verification code to get access to that item as follows:
Using this approach, we can avoid anonymous link but need to perform extra verification steps.
Now, how can we skip that email verification part and experience only verification code step like through SharePoint out of box feature.
SharePoint API to share files or folders:
Most of the times organizations want to avoid anonymous share link because of the security reasons. Using this approach, we can avoid anonymous share link and create the share links for specific people using the email address.
· You need to have List id which is the page where the file is located.
· a1 is the list guid
· a2 parameter in the image path is the id of the file: ItemId
“linkKind”:”6”, //6: specific,7: external “role”:”7”, // 2: can edit, 1: can view, 7: block download
“email@example.com”: this is email of external user.
When the recipients receive email, it will ask only for verification code (not for email verification followed by verification code), just like we receive email via SharePoint GUI.
By using grant access to file/folder or SharePoint REST API, we can automate the process of sharing link with specific external users using Power Automate flow. If you need help setting this up, contact us today.