Skip to content
This repository has been archived by the owner on Dec 2, 2017. It is now read-only.

Latest commit

 

History

History
32 lines (25 loc) · 1.62 KB

sharing.md

File metadata and controls

32 lines (25 loc) · 1.62 KB

Sharing items in OneDrive and SharePoint

OneDrive Personal, OneDrive for Business, and SharePoint provide two different primary ways to share items with other users:

  • Sharing links make it easy to share files with anyone who has the link. The link includes the authentication required to access the file and allows either read or read-write access to the shared item.
  • Permissions on the item allow it to be shared with specific users who must be signed in to access the files.

OneDrive API supports creating both sharing links and item permissions.

Tasks for sharing items

Task HTTP method
Create a sharing link POST /drive/items/{item-id}/action.createLink
Add permissions POST /drive/items/{item-id}/action.invite
Read permissions GET /drive/items/{item-id}/permissions
Remove permissions DELETE /drive/items/{item-id}/permissions/{id}
Update permissions PATCH /drive/items/{item-id}/permissions/{id}
Send sharing invitation POST /drive/items/{item-id}/action.invite