Create Organization Sharing Link

Create an organization or anonymous sharing link for a drive item in OneDrive.

Options

Field Definition Type Required
Source

Choose a source:

  • My Drive: authenticated user's OneDrive.
  • Drive ID: a specified drive by the drive's unique ID.
  • Group ID: a specified group's document library for a group by the group's unique ID.
  • User ID: a specified user by the user's unique ID.
Dropdown TRUE
Scope Choose a type of scope for the sharing link:
  • Organization: Anyone signed into your organization (tenant) can use the link to get access. Only available in OneDrive for Business.

  • Anonymous: 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.

DropDown TRUE

Input

Field Definition Type Required
Drive      
Drive ID

Unique ID for the drive requested.

Appears when Drive ID is selected from the Source option.

String TRUE
Group      
Group ID

Unique ID for the group which owns the document library.

Appears when Group ID is selected from the Source option.

String TRUE
User      
User ID

Unique ID for the user object who owns the drive item.

Appears when User ID is selected from the Source option.

String TRUE
Drive Item      
File or Folder ID Unique ID of the file or folder. String TRUE
Permissions      
Roles Type of permission for the role:

Read: ability to read the metadata and contents of the item.

Write: ability to read and modify the metadata and contents of the item.

Dropdown TRUE
Password Password of the sharing link that is set by the creator.

Appears when Anonymous is selected from the Scope option.

String FALSE
Expiration Date Indicates the expiration time of the permission.
For example, yyyy-MM-ddTHH:mm:ssZ.

Appears when Anonymous is selected from the Scope option.

Date and Time FALSE

Output

Field Definition Type
Sharing Link Sharing link that can be used to access this shared item. String
Permissions    
Permission ID Unique identifier of the permission among all permissions on the item. String
Roles The type of user permission. List of Strings
Link Provides the link details of the current permission, if it is a link type permissions. String
Expiration Date Indicates the expiration time of the permission.
For example, yyyy-MM-ddTHH:mm:ssZ.
Date and Time
Has Password? True if password is set for this permission; otherwise False. Boolean
Raw Data Raw JSON payload returned from the Microsoft Graph API for this particular action. Object

Additional information

By default, you cannot create an anonymous type sharing link for a file or folder in a group. You can only create an anonymous sharing link of file or folder in an organization.

Related topics

OneDrive connector

About the elements of Okta Workflows

Guidance for OneDrive connector

Microsoft Graph API documentation