SharePoint

Security

Microsoft SharePoint and OneDrive integration with managed OAuth. Manage sites, lists, libraries, files, folders, permissions, content types, and SharePoint operations via Microsoft Graph API.

Install

openclaw skills install sharepoint-sites

SharePoint

Connect to SharePoint and OneDrive to manage sites, lists, document libraries, files, folders, permissions, content types, and SharePoint operations via Microsoft Graph API.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Microsoft SharePoint API access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect SharePoint
InstallPairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect SharePoint

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│ Microsoft Graph  │
│   (User Chat)   │     │   (OAuth)    │     │  (SharePoint,    │
│                 │     │              │     │   OneDrive)       │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                    │                      │
         │  1. Install Plugin │                      │
         │  2. Pair Device    │                      │
         │  3. Connect SharePoint │                  │
         │                    │  4. OAuth Proxy     │
         │                    │  5. Request Forward  │
         │                    │                     │
         ▼                    ▼                     ▼
   ┌──────────┐        ┌──────────┐         ┌──────────┐
   │   SKILL  │        │ Dashboard│         │ SharePoint│
   │   File   │        │   Auth   │         │   Online  │
   └──────────┘        └──────────┘         └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for SharePoint again."

Quick Start

# List all sites accessible to the user
clawlink_call_tool --tool "share_point_list_sites"

# List all lists in a SharePoint site
clawlink_call_tool --tool "share_point_list_all_lists" --params '{"site_id": "YOUR_SITE_ID"}'

# Get current user info
clawlink_call_tool --tool "share_point_get_current_user"

Authentication

All SharePoint tool calls are authenticated automatically by ClawLink using the user's connected Microsoft account via OAuth.

No OAuth setup is required in chat. ClawLink manages the OAuth flow and token refresh automatically.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=sharepoint and connect SharePoint via OAuth.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for sharepoint in the list.

Verify Connection

clawlink_list_tools --integration sharepoint

Response: Returns the live tool catalog for SharePoint.

Reconnect

If SharePoint tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=sharepoint
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration sharepoint

Security & Permissions

  • Access is scoped to sites, lists, and files accessible to the connected Microsoft account.
  • All write operations require explicit user confirmation. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
  • Destructive actions (delete list, delete item, recycle file) are marked as high-impact and must be confirmed.
  • Permission operations (break inheritance, add role assignments) permanently alter access control — confirm before proceeding.
  • Role definition IDs are scoped per site/web — always resolve current values via share_point_get_role_definitions rather than hard-coding.

Tool Reference

Site Discovery

ToolDescriptionMode
share_point_list_sitesRetrieve all SharePoint sites accessible to the userRead
share_point_get_site_collection_infoFetch site collection metadata (URL, ID, root web URI) — not item-level detailsRead
share_point_get_web_infoRetrieve current SharePoint web metadata (title, URL, language, template)Read
share_point_get_current_userRetrieve the current user for the site (confirms authentication)Read

List Operations

ToolDescriptionMode
share_point_list_all_listsRetrieve all lists and document libraries in the current SharePoint webRead
share_point_get_list_by_titleFetch list metadata by titleRead
share_point_get_list_by_guidFetch list metadata by its unique identifier (prefer GUID over title)Read
share_point_get_list_itemsRetrieve items from a SharePoint list with optional OData parametersRead
share_point_get_list_items_by_guidRetrieve items from a SharePoint list using its GUIDRead
share_point_list_list_columnsList all column definitions in a SharePoint list (names, types, properties)Read
share_point_render_list_data_as_streamRetrieve list items with rich metadata and formatting via CAML queriesRead
share_point_get_changesRetrieve changes from the SharePoint list change log (for webhook processing)Read

List Item Management

ToolDescriptionMode
share_point_get_list_item_by_idFetch a specific list item by IDRead
share_point_get_list_item_versionAccess historical versions of a list itemRead
share_point_sharepoint_create_list_itemCreate a new item in a SharePoint list (returns item_id and timestamps)Write
share_point_create_list_item_by_idCreate a new item in a list using the list's GUIDWrite
share_point_create_list_item_in_folderCreate a list item in a specific folder within a SharePoint listWrite
share_point_update_list_itemUpdate fields on an existing list item with ETag concurrency controlWrite
share_point_delete_list_itemPermanently delete a list item by its IDWrite
share_point_recycle_list_itemMove a list item to the Recycle Bin (soft-delete, restorable)Write
share_point_restore_recycle_bin_itemRestore a deleted item by its GUIDWrite

List Management

ToolDescriptionMode
share_point_sharepoint_create_listCreate a new list in SharePoint (custom columns require separate calls)Write
share_point_update_listUpdate list metadata (title, description, versioning settings)Write
share_point_delete_listPermanently delete a SharePoint list by its GUIDWrite
share_point_delete_list_by_titlePermanently delete a SharePoint list by titleWrite

Document Libraries & Files

ToolDescriptionMode
share_point_list_drive_childrenList children (files and folders) in a drive root or folderRead
share_point_list_files_in_folderEnumerate all files in a folder by server-relative URL (non-recursive)Read
share_point_list_drives_rest_apiRetrieve document libraries and drives from a SharePoint siteRead
share_point_get_site_drive_item_by_pathGet metadata for a file or folder by its server-relative pathRead
share_point_download_file_by_server_relative_urlFetch raw bytes of a SharePoint file by its server-relative pathRead
share_point_list_drive_recent_itemsList recently modified items in a SharePoint driveRead

File Operations

ToolDescriptionMode
share_point_sharepoint_check_out_fileCheck out a file in a document library to lock it for editingWrite
share_point_check_in_fileCheck in a file to finalize changes and release the lockWrite
share_point_undo_checkout_fileUndo a file checkout, discarding any changes made while checked outWrite
share_point_upload_fileUpload a file to a SharePoint document library or folderWrite
share_point_upload_from_urlFetch a file from a URL and upload it to SharePoint (with conflict behavior)Write
share_point_update_drive_itemUpdate properties of a drive item (rename file/folder)Write
share_point_recycle_fileMove a file to the Recycle BinWrite
share_point_restore_drive_item_versionRevert a file to an earlier versionWrite
share_point_delete_drive_item_version_contentDelete binary content of a specific version of a drive itemWrite

Folder Operations

ToolDescriptionMode
share_point_list_subfolders_in_folderList immediate child folders within a SharePoint folderRead
share_point_get_all_foldersRetrieve all folders across the SharePoint siteRead
share_point_sharepoint_create_folderCreate a new folder in SharePoint (returns server_relative_url)Write
share_point_delete_folderDelete a folder from a document library (moves to Recycle Bin)Write
share_point_rename_folderRename a folder by updating its list item metadataWrite

Permissions & Roles

ToolDescriptionMode
share_point_get_role_definitionsList role definitions at the web level (IDs are scoped per site — resolve dynamically)Read
share_point_break_role_inheritance_on_listBreak permission inheritance on a SharePoint list (must precede add_role_assignment_to_list)Write
share_point_break_role_inheritance_on_itemBreak permission inheritance on a list itemWrite
share_point_add_role_assignment_to_listGrant permissions to a user or group on a SharePoint listWrite
share_point_add_role_assignment_to_itemGrant permissions to a user or group on a list itemWrite
share_point_ensure_userEnsure a user exists in a SharePoint site by login name (returns Id for permissions)Write
share_point_get_user_effective_permissions_on_webGet a user's effective permissions on the current siteRead

Content Types

ToolDescriptionMode
share_point_get_content_typesRetrieve all content types from the current SharePoint siteRead
share_point_get_content_typeRetrieve a specific content type by its IDRead
share_point_get_content_types_for_listRetrieve all content types for a specific SharePoint list by GUIDRead
share_point_get_list_content_type_by_idRetrieve a specific content type from a list by IDRead
share_point_add_field_link_to_content_typeAssociate an existing list field with a content typeWrite
share_point_create_content_typeCreate a new content type in SharePointWrite
share_point_update_content_typeUpdate a content type's properties (name, description, group, hidden status)Write

List Fields (Columns)

ToolDescriptionMode
share_point_create_list_fieldCreate a new field (column) in a SharePoint listWrite

Attachments

ToolDescriptionMode
share_point_list_item_attachmentsList all attachments for a SharePoint list itemRead
share_point_get_item_attachment_contentDownload the binary contents of a specific attachmentRead
share_point_add_attachment_to_list_itemUpload a binary file as an attachment to a list itemWrite

Sharing & Links

ToolDescriptionMode
share_point_create_drive_item_sharing_linkCreate a sharing link for a drive item with specific permissions (view/edit/embed) and scopeWrite

Users & Groups

ToolDescriptionMode
share_point_list_site_usersList users in the site collectionRead
share_point_list_site_groupsList SharePoint site groups for a site collectionRead
share_point_get_group_usersRetrieve all users who are members of a specified SharePoint groupRead
share_point_get_group_users_by_idRetrieve all users in a specific SharePoint site group by group IDRead
share_point_sharepoint_find_userSearch for a user by email address in the SharePoint siteRead
share_point_sharepoint_remove_userRemove a user from SharePoint (idempotent — returns success even if not a member)Write

Following & Social

ToolDescriptionMode
share_point_get_my_followedGet entities the current user is followingRead
share_point_get_my_followersGet the list of users who are following the authenticated userRead
share_point_is_followedCheck if the current user is following a specified actorRead
share_point_followFollow a SharePoint user, document, site, or tagWrite

Search

ToolDescriptionMode
share_point_search_querySearch SharePoint content using Keyword Query Language (KQL)Read
share_point_search_suggestGet search query suggestions for autocompleteRead

Site Pages

ToolDescriptionMode
share_point_get_site_page_contentRetrieve modern SharePoint Site Pages content (CanvasContent1, LayoutWebpartsContent)Read

Webhooks

ToolDescriptionMode
share_point_get_webhook_subscriptionRetrieve a specific webhook subscription by IDRead
share_point_get_webhook_subscriptionsRetrieve all webhook subscriptions on a SharePoint listRead

Recycle Bin

ToolDescriptionMode
share_point_list_recycle_bin_itemsList items in the SharePoint Recycle BinRead
share_point_delete_recycle_bin_item_permanentPermanently delete a Recycle Bin item by its GUIDWrite

Site Management

ToolDescriptionMode
share_point_create_webCreate a new SharePoint subsite under the current siteWrite
share_point_update_siteUpdate properties of the current SharePoint site (web)Write

Context & Analytics

ToolDescriptionMode
share_point_get_context_infoRetrieve SharePoint context information including form digest valueRead
share_point_get_drive_item_analyticsGet access statistics (view counts, unique viewers) for files or foldersRead
share_point_log_eventLog custom usage analytics events for tracking user activitiesWrite

Code Examples

List all sites

clawlink_call_tool --tool "share_point_list_sites"

Get a list by title and its items

clawlink_call_tool --tool "share_point_get_list_by_title" \
  --params '{"title": "Project Tasks"}'

clawlink_call_tool --tool "share_point_get_list_items" \
  --params '{"list_name": "Project Tasks"}'

Create a new list item

clawlink_call_tool --tool "share_point_sharepoint_create_list_item" \
  --params '{
    "list_name": "Project Tasks",
    "item": {
      "Title": "Complete Q4 Report",
      "Priority": "High",
      "DueDate": "2024-12-31"
    }
  }'

Upload a file

clawlink_call_tool --tool "share_point_upload_file" \
  --params '{
    "file_name": "report.xlsx",
    "folder_url": "/Shared Documents/Reports",
    "file_content": "BASE64_ENCODED_CONTENT"
  }'

Create a sharing link

clawlink_call_tool --tool "share_point_create_drive_item_sharing_link" \
  --params '{
    "item_id": "YOUR_FILE_ID",
    "link_type": "view",
    "scope": "organization"
  }'

Break inheritance and add permissions

clawlink_call_tool --tool "share_point_break_role_inheritance_on_list" \
  --params '{"list_id": "YOUR_LIST_ID", "copy_role_assignments": true}'

clawlink_call_tool --tool "share_point_ensure_user" \
  --params '{"login_name": "i:0#.f|membership|user@domain.com"}'

clawlink_call_tool --tool "share_point_add_role_assignment_to_list" \
  --params '{"list_id": "YOUR_LIST_ID", "principal_id": "USER_ID_FROM_ENSURE_USER", "role_definition_id": 1}'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm SharePoint is connected.
  2. Call clawlink_list_tools --integration sharepoint to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration sharepoint.
  5. If no SharePoint tools appear, direct the user to https://claw-link.dev/dashboard?add=sharepoint.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  list → get → search → describe → call                      │
│                                                             │
│  Example: List sites → List lists → Get items → Show results │
└─────────────────────────────────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  describe → preview → confirm → call                        │
│                                                             │
│  Example: Describe tool → Preview changes → User approves    │
│           → Execute create                                   │
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer read, list, search, and get operations before writes when that reduces ambiguity.
  4. For writes or anything marked as requiring confirmation, call clawlink_preview_tool first.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • Server-relative URLs for folders use the format /Shared Documents/FolderName or /Lists/ListName.
  • List GUIDs are preferred over titles for reliable lookups — names may collide across similarly named lists.
  • Role definition IDs are scoped per site/web — never hard-code them; always resolve via share_point_get_role_definitions.
  • Permission operations require breaking inheritance first (break_role_inheritance_on_list) before adding unique role assignments.
  • ensure_user is a write operation with provisioning side effects — it registers the user in the site collection but does not grant permissions.
  • SharePoint search results are security-trimmed — inaccessible content never appears even if it exists.
  • upload_from_url with conflict_behavior: 'rename' bypasses file locks on existing files.
  • Custom columns cannot be added at list creation time — use create_list_field after creating the list.
  • Site pages (get_site_page_content) read structured content from modern pages — .aspx files may need different handling.

Error Handling

Status / ErrorMeaning
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration sharepoint.
Missing connectionSharePoint is not connected. Direct the user to https://claw-link.dev/dashboard?add=sharepoint.
ItemNotFoundThe file, list, or site does not exist. Check the ID or path.
accessDeniedThe connected account lacks permissions to access this site, list, or item.
invalidArgumentInvalid parameter or missing required field. Review the tool schema with clawlink_describe_tool.
resourceModifiedThe item has been modified (ETag mismatch). Re-fetch and retry with updated ETag.
Write rejectedUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:
    openclaw plugins list
    
  2. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  3. If a fresh chat does not help, run:
    openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
    openclaw gateway restart
    
  4. After restart, tell the user to send /new again and retry.

Troubleshooting: Invalid Tool Call

  1. Ensure the integration slug is exactly sharepoint.
  2. Use clawlink_describe_tool to verify parameter names and types before calling.
  3. For write operations, always call clawlink_preview_tool first.
  4. Verify site_id/list_id exist before using them — use list_sites and list_all_lists to discover IDs.

Resources

Related Skills


Powered by ClawLink — an integration hub for OpenClaw

ClawLink Logo