Skip to content
Last updated

Connect Freddy to Microsoft SharePoint to access files, documents, and data from your SharePoint sites and drives.

Prerequisites

  • Application (client) ID
  • Directory (tenant) ID
  • Client secret
  • Drive name (optional)
  • Folder path (optional)

Setup Guide

Step 1: Create Azure AD Application

The Microsoft Graph API uses OAuth for authentication. You need to create an application in Azure Portal to get the required credentials.

  1. Login to Azure Portal
  2. Click the upper-left menu icon and select Azure Active Directory
  3. Select App Registrations
  4. Click New registration
  5. Register the application:
    • Name: Freddy SharePoint Integration
    • Supported account types: Accounts in this organizational directory only
  6. Click Register
  7. Copy the client_id and tenant_id from the overview page

Step 2: Create Client Secret

  1. In your app registration, select Certificates & secrets
  2. Click New client secret
  3. Configure:
    • Description: Freddy SharePoint client secret
    • Expires: Choose appropriate expiration (recommended: 12 months)
  4. Click Add
  5. Copy the client secret value immediately (it won't be shown again)

Step 3: Configure API Permissions

  1. Select API permissions
  2. Click Add a permission
  3. Select Microsoft Graph
  4. Select Application permissions
  5. Add the following permission:
    • Files.Read.All - Read all files in SharePoint
  6. Click Add permissions
  7. Click Grant admin consent (requires admin privileges)

Step 4: Configure in Freddy

curl https://api.aitronos.com/v1/personal-connectors/configurations \
  -H "api-key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "sharepoint",
    "name": "My SharePoint",
    "configuration": {
      "tenantId": "your-tenant-id",
      "searchScope": "ALL",
      "folderPath": "",
      "siteUrl": ""
    },
    "credentials": {
      "clientId": "your-client-id",
      "clientSecret": "your-client-secret"
    }
  }'

Configuration Options

FieldTypeDescription
tenantIdstringYour Azure AD tenant ID
searchScopestringWhere to search: ACCESSIBLE_DRIVES, SHARED_ITEMS, or ALL (default)
folderPathstringSpecific folder path to search (empty = all folders)
siteUrlstringSharePoint site URL (empty = main site)

Search Scope Options

  • ACCESSIBLE_DRIVES - All SharePoint drives the user can access
  • SHARED_ITEMS - Shared items the user has access to
  • ALL - Search both drives and shared items (default)

Multi-Site Support

To access files in a specific SharePoint site, provide the site URL:

{
  "siteUrl": "https://yourcompany.sharepoint.com/sites/marketing"
}

To iterate all sub-sites:

{
  "siteUrl": "https://yourcompany.sharepoint.com/sites/"
}

Supported File Formats

The connector supports multiple file formats:

FormatExtensionsNotes
CSV.csvConfigurable delimiters, encoding
Parquet.parquetColumn-oriented storage
Avro.avroSchema-based serialization
JSONL.jsonlLine-delimited JSON
Documents.md, .txt, .pdf, .docxText extraction

Path Patterns

Use glob-style patterns to match files:

PatternDescription
**Match all files
**/*.csvAll CSV files
myFolder/**/*.csvCSV files under myFolder
**/prefix*.csvCSV files with specific prefix
reports/2024/**All files in 2024 reports folder

Pattern Examples

{
  "globs": "**/*.csv|**/*.xlsx"
}

This matches all CSV and Excel files in any folder.

Sync Modes

ModeSupported
Full Refresh✅ Yes
Incremental✅ Yes

Data Type Mapping

SharePoint TypeFreddy Type
stringstring
numbernumber
arrayarray
objectobject

Rate Limits

The connector respects Microsoft Graph API throttling limits. Implement exponential backoff for 429 responses.

Troubleshooting

Authentication Failures

Error: Failed to authenticate with Microsoft Graph

Solutions:

  1. Verify client_id, tenant_id, and client_secret are correct
  2. Check the client secret hasn't expired
  3. Ensure admin consent was granted for API permissions
  4. Verify the app registration is in the correct tenant

Permission Errors

Error: Access denied to SharePoint resources

Solutions:

  1. Verify Files.Read.All permission is granted
  2. Ensure admin consent was provided
  3. Check the user has access to the requested site/drive

No Files Found

Error: Empty results when syncing

Solutions:

  1. Verify the folder path is correct
  2. Check the search scope includes the target location
  3. Ensure the site URL is correct for multi-site setups
  4. Verify glob patterns match your file names

Next Steps