Share File Or Folder
Prerequisite Permissions: Share File Or Folder step needs the following permissions.
Permission type | Permission (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 Name | Description |
---|---|---|
1 | Step Name | Name of the step. This name has to be unique in a single workflow. |
Connection: | ||
2 | Client ID | Select 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. |
3 | Checkbox: Accept value as variable/static | Leave 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. |
4 | Refresh Token | Specify the Refresh Token provided by authorization grant flow. The data type is String. This field is mandatory. |
5 | Button: Test Connection | Verifies whether the connection is established or not. |
Input Tab: | ||
1 | File Or Folder ID / Path | Provide a valid OneDrive file or folder ID or path to share. The data type is String. This field is mandatory. |
2 | Share Type | Select 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: | ||
1 | Share With Email Address | Specify 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. |
2 | Send Invitation | Select 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. |
3 | Message | A plain text formatted message is included in the sharing invitation to send as an email body. |
Access & Link Security: | ||
1 | Allow Editing | Specify 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 |
2 | Link Valid Till Date | Specifies 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. |
3 | Password | Specify the password of the sharing link. Note: Support is provided only for Anyone share type. |
4 | Require Sign In | Specifies 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 | ||
1 | Sharable Link | Define the output variable name in the field. The default output variable name is SharableLink. On successful execution, it holds the Shareable Link. |