OneDrive Business icon

OneDrive Business

Access OneDrive Business files and folders

Folder → Share

AI-generated

Summary

Create a sharing link for a folder

Inputs

  • driveType — Type of drive to access. 'user' accesses a user's OneDrive; 'site' accesses a SharePoint site's document library.
  • userId (required) — User principal name or ID. Required when driveType is 'user'. Shown only when driveType is 'user'.
  • siteId (required) — SharePoint site ID. Required when driveType is 'site'. Shown only when driveType is 'site'.
  • linkType — Sharing link type. 'view' creates a view-only link; 'edit' creates an edit link.
  • linkScope — Link scope. 'anonymous' makes the link available to anyone; 'organization' restricts to people in the same organization.
  • folderId (required) — Folder item ID or path from drive root. Required for the share operation.

Output shape

object

Returned by Microsoft Graph API when calling ${itemPath}/createLink with { type, scope }. Typically includes link URL, ID, and webUrl. The exact shape depends on Graph API response.

Links

Discussion