SharingLink resource type
In this article
The SharingLink resource groups link-related data items into a single structure.
If a Permission resource has a non-null sharingLink facet, the permission represents a sharing link (as opposed to permissions granted to a person or group).
Here is a JSON representation of the resource.
{
"application": { "@odata.type": "microsoft.graph.identity" },
"type": "view | edit | embed",
"scope": "anonymous | organization",
"webHtml": "string",
"webUrl": "url"
}
Property | Type | Description |
---|---|---|
application | identity | The app the link is associated with. |
type | String | The type of the link created. |
scope | String | The scope of the link represented by this permission. Value anonymous indicates the link is usable by anyone, organization indicates the link is only usable for users signed into the same tenant. |
webHtml | String | For embed links, this property contains the HTML code for an <iframe> element that will embed the item in a webpage. |
webUrl | String | A URL that opens the item in the browser on the OneDrive website. |
This table defines the possible values for the type property:
Value | Role | Description |
---|---|---|
view |
read |
A view-only sharing link, allowing read-only access. |
edit |
write |
An edit sharing link, allowing read-write access. |
embed |
read |
A view-only sharing link that can be used to embed content into a host webpage. Embed links are not available for OneDrive for Business or SharePoint. |
Value | Description |
---|---|
anonymous |
Anyone with the link has access, without needing to sign in. This may include people outside of your organization. |
organization |
Anyone signed into your organization (tenant) can use the link to get access. Only available in OneDrive for Business and SharePoint. |