Share File
drive_shareShare a OneDrive file or folder by link or by inviting named people, requiring user confirmation before access is granted.
Instructions
Share a OneDrive file or folder by link (mode='link') or by inviting named people (mode='invite'). A view or edit link works for anyone who has it. Always requires confirm=true after the user approves who gets access. Returns the link or the invitation results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Share by link or invite specific people. | |
| role | No | invite: access level. | |
| confirm | Yes | Must be true to grant this access; set only after the user approves. | |
| item_id | Yes | File or folder to share (not the OneDrive root). | |
| message | No | invite: note in the invitation email. | |
| password | No | Optional password for the link or invitation. | |
| link_type | No | link: view (read-only), edit, or embed (files only). | |
| account_id | No | Account ID or email address. Omit when only one account is signed in. | |
| expires_at | No | Optional expiry (invite expiry needs a premium OneDrive). | |
| recipients | No | invite: people to share with. | |
| require_sign_in | No | invite: recipients must sign in. | |
| send_invitation | No | invite: email the recipients. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| created | Yes | ||
| summary | Yes | One-line human summary. The tool's text content is this result serialized as JSON (summary included), so a client that ignores structuredContent still sees every field. | |
| link_url | Yes | ||
| recipients | Yes | ||
| permission_ids | Yes |