OneDrive Connector

Make your OneDrive files searchable with AI. Connect your OneDrive to RAGaaS and instantly search across all your files with semantic understanding.

Common Challenges

  • Basic keyword matching misses context
  • Limited file content search
  • Separate search for each folder
  • Complex Microsoft Graph API
  • Manual file syncing

Our Solution

  • Semantic search understands meaning
  • Full-text search across all files
  • Unified search across folders
  • Simple REST API
  • Automatic content sync

How It Works

1

Set Up OneDrive Integration

Register your application with Microsoft Azure and configure OAuth credentials. We'll guide you through the setup process.

2

Select Your Files

Choose which OneDrive files to connect. Our integration respects your permissions and only accesses the files you explicitly select.

3

Start Searching

Use our API to search across your OneDrive content with AI understanding. Perfect for building internal tools, knowledge bases, or search applications.

Implementation Guide

1. Create Microsoft Azure App

First, set up your Microsoft Azure app and configure OAuth:

  1. Go to Azure Portal
  2. Under Azure Services, click App Registrations
  3. Click New Registration
  4. Configure the following settings:
    • Name: RAGaaS Integration (or your preferred name)
    • Supported account types: Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
    • Redirect URI: https://api.ragaas.dev/connectors/onedrive/callback
  5. After registration, note down:
    • Application (client) ID
  6. Under Certificates & secrets:
    • Create a new client secret
    • Note down the secret value immediately
  7. Under API permissions:
    • Click Add a permission
    • Select Microsoft Graph
    • Add these permissions:
      • Files.Read.All (read all files)
      • offline_access (maintain access)
      • openid (OpenID connect)
      • User.Read (read user profile)
    • Click Grant admin consent
  8. Under Authentication:
    • Click Add a platform
    • Choose Single-page application
    • Add redirect URI: https://api.ragaas.dev/connectors/onedrive/picker
    • Under Implicit grant and hybrid flows, enable:
      • Access tokens (used for implicit flows)
      • ID tokens (used for implicit and hybrid flows)

2. Configure RAGaaS

Add your OneDrive configuration to your RAGaaS namespace:

Configure OneDrive

curl -X PATCH https://api.ragaas.dev/v1/namespaces/ns_123 \
  -H "Authorization: Bearer ${RAGAAS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "onedriveConfig": {
      "clientId": "your-azure-client-id",
      "clientSecret": "your-azure-client-secret"
    }
  }'

3. Create OneDrive Connection

Now create a connection to your OneDrive:

  1. Create a new OneDrive connection to get an authorization URL
  2. Open the URL in a browser for the user to authorize
  3. After authorization, OneDrive file picker will open where:
    • User can browse their OneDrive and select files/folders
    • Selected files will be connected to RAGaaS for ingestion
  4. Check the connection status - it will be ACTIVE when ready

Create Connection

# Create OneDrive connection
curl -X POST https://api.ragaas.dev/v1/connections/onedrive \
  -H "Authorization: Bearer ${RAGAAS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My OneDrive",
    "namespaceId": "ns_123"
  }'

# Open authorizationUrl in browser for user to authorize
# User selects files using OneDrive file picker
# OneDrive redirects back to RAGaaS after file selection

# Check connection status
curl "https://api.ragaas.dev/v1/connections/onedrive?namespaceId=ns_123" \
  -H "Authorization: Bearer ${RAGAAS_API_KEY}"

4. Ingest OneDrive Content

After successfully creating a connection, you can ingest the selected OneDrive files:

Ingest Content

curl -X POST https://api.ragaas.dev/v1/ingest/onedrive \
  -H "Authorization: Bearer ${RAGAAS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "connectionId": "conn_123",
    "namespaceId": "ns_123"
  }'

Supported File Types

The OneDrive connector supports the following file types:

  • Documents: .pdf, .doc, .docx, .ppt, .pptx
  • Spreadsheets: .xls, .xlsx, .csv
  • Text files: .txt, .md, .rtf
  • Web files: .html, .xml

Next Steps