Skip to main content

Share File Or Folder

Description

Share File Or Folder step shares the file or folder from the Document Library present in a specified site in SharePoint Online.

API Reference:

Prerequisites

You require the following permissions for app on Azure:

Permission typePermission (from least to most privileged)
Delegated (work or school account)Files.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All
Delegated (personal Microsoft account)Files.ReadWrite, Files.ReadWrite.All
ApplicationFiles.ReadWrite.All, Sites.ReadWrite.All

Configuration

No.Field NameDescription
1Step NameSpecify the name of the step. This name must be unique within a single workflow. This is a mandatory step.
Connection:
2Client IDSpecify the Client ID of the SharePoint App. For information on creating a client ID, see Appendix: SharePoint: App Registration & Refresh Token Generation.
The field data type is String. This is a mandatory field.
3Accept value as variable/staticSelect the checkbox if you want to enter the Refresh Token name in the Refresh Token field.
If you do not select the checkbox, you can select the refresh token in the Refresh Token field.
4Refresh TokenSpecify or select the Refresh Token generated using the ClientID, which is created after registering the App in Azure AD. This is a mandatory field.
5Test ConnectionVerifies whether the connection is established or not.Note: This connection will not work for the previous step variables. The button will only work with static values and environment variables.

Input Tab

No.Field NameDescription
Input Fields:
1Base Site URLSpecify the SharePoint site-relative URL. {Tenant Name}.sharepoint.com:/ {Sharepoint Site Path}.
Example: firstUser.sharepoint.com:/sites/TestingSite.
This is a mandatory field.
Note: For the root site (Communication Site), no need to provide the {sharepoint site path}.
2Document Library NameProvide the name of the SharePoint Document Library in which the search will be performed. This is a mandatory field.
3File Or Folder PathProvide a valid SharePoint file or folder path to share. This is a mandatory field.
4Share TypeSpecify the share type. Share type specifies the scope of the shareable link to be created.
Allowed values:
- Anyone: Anyone with the link has access, without needing to sign in. This may include people outside of your organization.
- PeopleInDomain: Anyone signed into your organization (tenant) can use the link to get access.
- SpecificPeople: Share only with people you choose inside or outside the organization.
This is a mandatory field.
Limitation: If the share type is SpecificPeople, the shareable link is not populated in the response when the link is opened. However, a notification email is sent to the email addresses provided in the field Share With Email Address.
Sharing & Notification Tab:
1Share With Email AddressSpecify the property name on the basis of which you want to sort the result.
Example: name.
The above request sorts the SharePoint items by name.
Note: The fields Sort On and Sorting Type work as a single parameter internally in the API call, so the user must provide Sort On if Sort Type is provided.
2Send InvitationSpecify the option.
If Yes, a sharing link is sent to the recipient. Otherwise, permission is granted directly without sending a notification.
Allowed Values: Yes, No.
Default Value: Yes.
Note: The field is supported only for the SpecificPeople share type.
3Require Sign InSpecify if the recipient of the invitation is required to sign in to view the shared item.
Default Value: No.
Note: The field is supported only for the SpecificPeople share type.
4MessageSpecify a plain text-formatted message to be included in the sharing invitation as the email body.
Access & Link Security
1Allow EditingSpecify Yes if edit access should be given to the sharable link, otherwise specify No for read-only access.
Allowed Values: Yes, No.
Default Value: No.
2Expiration DateSpecify the date in the format YYYY/MM/dd after which the link expires. If not specified, the link will never expire.
Note: The field is not supported for SpecificPeople.
3Link PasswordSpecify the password for the sharing link.
Note: This field is supported only for the Anyone share type.

Output Tab

No.Field NameDescription
Output Field:
1Sharable LinkSpecify a field to define the output variable name. The default output variable name is SharableLink.
On successful execution, it holds the Shareable Link.