Share a OneDrive file as a link
share_onedrive_fileCreate a OneDrive sharing link for a file or folder with view, edit, or embed access and anonymous, organization, or invited-user scope.
Instructions
Create a SHARING LINK to a OneDrive file or folder (fileId from list_onedrive_files): type view (read-only, default), edit, or embed (an link, personal OneDrive only); scope anonymous (anyone with the link, default), organization (work or school OneDrive only) or users (only people you invite); optional expiresAt (date or ISO) and password (on a personal OneDrive both need a Microsoft 365 subscription; the refusal says so). An ANONYMOUS EDIT link lets anyone holding it change or delete the file, so it needs confirm:true after you show the user that; every other link is created straight away. If Hermoso already made the same kind of link, OneDrive returns that one and the reply says it was reused. Read back from the item's permission list. 0 credits. Needs OneDrive connected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | view (default), edit, or embed (personal OneDrive only) | |
| scope | No | anonymous (default, anyone with the link), organization (work or school), or users (invited people only) | |
| fileId | Yes | OneDrive file or folder id from list_onedrive_files | |
| confirm | No | required for an anonymous edit link | |
| password | No | personal OneDrive with Microsoft 365 | |
| expiresAt | No | e.g. 2026-11-30 or 2026-11-30T17:00:00Z |