Create Recipients Sharing Link
Create and send a sharing link to recipients for a drive item in OneDrive.
Choose a source:
Unique ID for the drive requested.
Unique ID for the group which owns the document library.
Unique ID for the user object who owns the drive item.
|File or Folder ID||Unique ID of the file or folder.||String||TRUE|
|Recipients||Collection of recipients who will receive access and the sharing invitation.||List of Strings||FALSE|
Type of permission for the role:
|Message||Plain text formatted message that is included in the sharing invitation. Maximum length 2000 characters.||String||FALSE|
|Permission ID||Unique identifier of the permission among all permissions on the item.||String|
|Roles||The type of user permission.||List of Strings|
|Granted To||For user type permissions, the details of the users and applications for this permission.||Object|
|Granted To Identities||For link type permissions, the details of the users to whom permission was granted.||List of Objects|
|Inherited From||Provides a reference to the ancestor of the current permission, if it is inherited from an ancestor.||Object|
|Invitation||Details of any associated sharing invitation for this permission.||Object|
|Link||Provides the link details of the current permission, if it is a link type permissions.||Object|
|Shared ID||Unique token that can be used to access this shared item via the shares API.||String|
|Expiration Date||Indicates the expiration time of the permission.
For example, yyyy-MM-ddTHH:mm:ssZ.
|Date and Time|
|Raw Data||Raw JSON payload returned from the Microsoft Graph API for this particular action.||Object|
Create an anonymous or organization sharing link.
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.
Organization: anyone signed into your organization (tenant) can use the link to get access.
When the sharing link doesn't use anonymous settings, it can be sent to others outside the organization. Credentials may be needed to view the shared file or folder if the user is not part of the organization.
By default, you cannot create an anonymous type sharing link for a file or folder in a group. You can only create an anonymous type sharing link of file or folder in an organization.