Skip to main content

Share File Or Folder

Prerequisite Permissions: Share File Or Folder step needs the following permissions.

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

Description

OneDrive: Share File Or Folder step is used to share the OneDrive file or folder.
Note:
• Support is provided for the Personal Drive, however, the displayed error message is not correct.

Limitations:
In the Share Type field, if the value is “SpecificPeople”, the shareable link is not getting populated in response when the shareable link is already opened. But the notification email is sent to the email addresses provided in the field Share With Email Address.

References:
https://docs.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http
https://docs.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-1.0&tabs=http

Configurations

No.Field NameDescription
1Step NameName of the step. This name has to be unique in a single workflow.
Connection:
2Client IDSelect the client ID for which you want to list the drive item contents.
Refer to the App Registration & Refresh Token Generation documentation for more information.
Note: This field is mandatory for personal accounts.
3Checkbox: Accept value as variable/staticLeave checkbox unchecked to accept Refresh Token* value from a field - in the previous steps of the stream using a drop down list.
Else enable checkbox for Refresh Token* field to appear as Text box.
4Refresh TokenSpecify the Refresh Token provided by authorization grant flow.
The data type is String. This field is mandatory.
5Button: Test ConnectionVerifies whether the connection is established or not.
Input Tab:
1File Or Folder ID / PathProvide a valid OneDrive file or folder ID or path to share.
The data type is String. This field is mandatory.
2Share TypeSelect the share Type. Share type specifies the scope of the sharable link to be created.
Allowed values: Anyone, PeopleInDomain, and SpecificPeople
• Anyone - Anyone with the link has access, without needing to sign in. This may include people outside of your organization. Anonymous link support may be disabled by an administrator.
• PeopleInDomain - Anyone signed into your organization (tenant) can use the link to get access. Only available in OneDrive for Business and SharePoint.
• SpecificPeople - Share only with people you choose inside or outside the organization.
The data type is String. This field is mandatory.
Sharing & Notification:
1Share With Email AddressSpecify the email address(es) of the users with whom you want to share the OneDrive file or folder.
Note:
• Multiple email addresses can be given using comma-separated (,) or semi-colon separated (;) emails.
• The field is mandatory when the Share Type is SpecificPeople.
2Send InvitationSelect Yes or No depending on whether you want to send an invitation.
If you select Yes, the recipient receives a sharing link. Else, the permission is granted directly, without sending a notification.
Allowed Values: Yes, No
Default Value: Yes
Note: Support is provided only for SpecificPeople share type.
3MessageA plain text formatted message is included in the sharing invitation to send as an email body.
Access & Link Security:
1Allow EditingSpecify Yes if edit access should be given to the Sharable link else specify No for read-only access.
Allowed Values: Yes, No
Default Value: No
2Link Valid Till DateSpecifies the date in format MM/dd/yyyy after which the link expires. If not specified, the link will never expire.
Note: Support is provided only for Anyone share type.
3PasswordSpecify the password of the sharing link.
Note: Support is provided only for Anyone share type.
4Require Sign InSpecifies whether the recipient of the invitation is required to sign in to view the shared item.
Default Value: No
Note: Support is provided only for SpecificPeople share type.
Output Tab
1Sharable LinkDefine the output variable name in the field.
The default output variable name is SharableLink.
On successful execution, it holds the Shareable Link.