create-drive-item-share-link
Generate a shareable link for a file or folder in OneDrive or SharePoint without sending an email notification. Specify access type, scope, password, and expiration to control sharing.
Instructions
Create a link to share a driveItem driveItem. The createLink action creates a new sharing link if the specified link type doesn't already exist for the calling application. If a sharing link of the specified type already exists for the app, the existing sharing link is returned. DriveItem resources inherit sharing permissions from their ancestors.
💡 TIP: Create a shareable link for a file or folder WITHOUT sending an email invitation. Body: { type: 'view' | 'edit' | 'embed', scope: 'anonymous' | 'organization' | 'users', password?: string, expirationDateTime?: ISO-8601, retainInheritedPermissions?: boolean }. Returns a permission with link.webUrl. Pair with share-drive-item when you want to grant explicit access; use this when you only need a URL to paste into a doc/email/chat without triggering OneDrive notifications.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| driveId | Yes | Path parameter: driveId | |
| driveItemId | Yes | Path parameter: driveItemId | |
| includeHeaders | No | Include response headers (including ETag) in the response metadata | |
| excludeResponse | No | Exclude the full response body and only return success or failure indication |