Skip to main content
The SharePoint connector provides access to Microsoft SharePoint Online document libraries via the Microsoft Graph API, enabling AI agents and automations to browse folders, list files, and download content.

Browse Structure

List sites, drives, and folder hierarchies

File Access

Download files with metadata for change detection

Access Control

Per-user permission validation (PBAV) for secure access

Prerequisites

  • An Azure AD Application registered in your tenant
  • Application permissions granted:
    • Sites.Read.All - Read sites and files
    • Files.Read.All - Read file content
    • GroupMember.Read.All - For PBAV group membership checks (optional)
  • Admin consent granted for these permissions
For AI Knowledge document sync with per-user access control, see the dedicated SharePoint Connector for AI Knowledge documentation.

Installation

  1. Go to Apps in your workspace
  2. Search for Sharepoint and install it
  3. Configure the app instance with your Azure AD credentials

Configuration

FieldValue
Client IDApplication (client) ID from Azure AD
Client SecretClient secret value
Tenant IDDirectory (tenant) ID
Site URLOptional, default SharePoint site URL
Site IDOptional, default SharePoint site ID

Available Automations

Site Operations

AutomationDescription
listSitesList SharePoint sites accessible to the app

Drive Operations

AutomationDescription
listDrivesList document libraries in a site

File & Folder Operations

AutomationDescription
listChildrenList items in a folder or drive root
getItemGet item metadata by ID
getFilesList files with metadata
getFileTreeGet recursive folder structure
downloadFileDownload file content

Authentication

AutomationDescription
ensureAccessTokenGet or refresh access token
getAccessTokenGet a new access token

DSUL Examples

List Sites

- Sharepoint.listSites:
    output: sites

List Document Libraries

- Sharepoint.listDrives:
    siteId: "contoso.sharepoint.com,abc-123,def-456"
    output: drives

List Files in a Folder

- Sharepoint.listChildren:
    siteId: "contoso.sharepoint.com,abc-123,def-456"
    driveId: "b!xyz..."
    itemId: "01ABCDEF..."
    output: items

Download a File

- Sharepoint.downloadFile:
    siteId: "contoso.sharepoint.com,abc-123,def-456"
    driveId: "b!xyz..."
    itemId: "01ABCDEF..."
    output: fileContent

Get Folder Tree

- Sharepoint.getFileTree:
    siteId: "contoso.sharepoint.com,abc-123,def-456"
    driveId: "b!xyz..."
    output: tree

Error Handling

HTTP StatusErrorSolution
401UnauthorizedVerify Azure AD credentials
403ForbiddenCheck app permissions or user access
404Not FoundVerify site/drive/item IDs exist
429Rate LimitedWait and retry

Common Issues

“Site not found” - The site ID format is hostname,siteCollectionId,siteId. Use Graph Explorer to find the correct format. “Access denied” - The Azure AD app needs Sites.Read.All permission with admin consent. “Token expired” - OAuth tokens expire after 1 hour. Use ensureAccessToken to refresh.

External Resources

Microsoft Graph Files API

Official API documentation

SharePoint Sites API

Site operations reference

Graph Explorer

Test API calls interactively

AI Knowledge SharePoint Connector

Document sync and PBAV for AI Knowledge