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 filesFiles.Read.All- Read file contentGroupMember.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.
- Usage as App
- Usage as MCP
Installation
- Go to Apps in your workspace
- Search for Sharepoint and install it
- Configure the app instance with your Azure AD credentials
Configuration
| Field | Value |
|---|---|
| Client ID | Application (client) ID from Azure AD |
| Client Secret | Client secret value |
| Tenant ID | Directory (tenant) ID |
| Site URL | Optional, default SharePoint site URL |
| Site ID | Optional, default SharePoint site ID |
Available Automations
Site Operations
| Automation | Description |
|---|---|
listSites | List SharePoint sites accessible to the app |
Drive Operations
| Automation | Description |
|---|---|
listDrives | List document libraries in a site |
File & Folder Operations
| Automation | Description |
|---|---|
listChildren | List items in a folder or drive root |
getItem | Get item metadata by ID |
getFiles | List files with metadata |
getFileTree | Get recursive folder structure |
downloadFile | Download file content |
Authentication
| Automation | Description |
|---|---|
ensureAccessToken | Get or refresh access token |
getAccessToken | Get a new access token |
DSUL Examples
List Sites
List Document Libraries
List Files in a Folder
Download a File
Get Folder Tree
Error Handling
| HTTP Status | Error | Solution |
|---|---|---|
| 401 | Unauthorized | Verify Azure AD credentials |
| 403 | Forbidden | Check app permissions or user access |
| 404 | Not Found | Verify site/drive/item IDs exist |
| 429 | Rate Limited | Wait and retry |
Common Issues
“Site not found” - The site ID format ishostname,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