SharePoint

Upload files and manage folders in SharePoint Online via CSOM and Graph API.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/lawless-m/FreeBird --skill sharepoint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: SharePoint
Source: https://github.com/lawless-m/FreeBird/tree/main/.claude/skills/SharePoint
Command: npx skills add https://github.com/lawless-m/FreeBird --skill sharepoint

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PnP.Framework, Microsoft.Graph, Microsoft.Identity.Client, Azure.Identity, Microsoft.Extensions.Logging.Abstractions, and includes references (resource) components.

What problem does it solve?

Integrating with SharePoint Online for file management, data synchronization, or automated reporting can be complex due to authentication, large file handling, and API choices. This Skill provides battle-tested patterns using both CSOM and Microsoft Graph API to automate these interactions reliably and efficiently.

Core Features & Use Cases

  • Robust File Uploads: Upload files to SharePoint with automatic chunking for large files, handling folder creation and existence checks.
  • Excel Data Automation: Programmatically update specific cells or ranges within Excel files stored in SharePoint using the Microsoft Graph API.
  • Folder & File Management: Create entire folder hierarchies, check file existence, and download files from SharePoint with ease.
  • Use Case: Automate a daily process to upload a large batch of generated reports to a specific SharePoint folder, update a central Excel tracker with the upload status, and download a configuration file from another SharePoint location for processing.

Quick Start

Use the SharePoint skill to upload the attached 'large_report.pdf' to the '/sites/MySite/Documents/Reports/2025' folder, ensuring it handles chunked uploads for large files.

Frequently Asked Questions about SharePoint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload large files to SharePoint Online programmatically?

Upload large files to SharePoint using chunked transfer patterns with PnP.Framework or Microsoft Graph API. Both handle automatic file splitting, folder creation, and uploads exceeding the 50 MB single-request limit by breaking transfers into smaller segments and reassembling server-side.

What authentication methods work for SharePoint Online automation?

SharePoint automation supports app-only authentication via Azure AD using Microsoft.Identity.Client and Azure.Identity libraries. App-only flows require configured Azure AD permissions and credentials, enabling server-to-server integration without user interaction.

Can I update Excel cells in SharePoint files programmatically?

Yes, update specific cells or ranges in Excel files stored on SharePoint using Microsoft Graph API. This enables automated data entry, formula updates, and cell-level modifications without downloading or manually editing workbooks.

How do I handle folder hierarchies and file existence checks in SharePoint?

Create nested folder structures and verify file presence using server-relative URL patterns with CSOM or Graph API. Both approaches support recursive folder creation, existence validation, and reliable path handling across SharePoint sites.

What are the limitations when automating SharePoint file transfers?

Single uploads are capped at 50 MB; larger files require chunked transfer logic. Authentication scope is limited by Azure AD permissions assigned to the app registration, and server-relative URL syntax must follow SharePoint naming conventions for operations to succeed.

Does this approach work with REST-like workflows across Microsoft 365?

Yes, both CSOM and Microsoft Graph API support REST-like interaction patterns for file uploads, folder operations, and data access. Graph API is REST-native; CSOM works through object model abstraction, enabling flexible integration with broader Microsoft 365 automation.

Related Skills