docs/content/Guides/Integrations/sharepoint-connector.mdx
import { Callout } from 'nextra/components' import { Steps } from 'nextra/components'
Connect your SharePoint or OneDrive account to upload and process files directly as an external knowledge base. Supports Office files, PDFs, text files, CSVs, images, and more. Authentication is handled via Microsoft Entra ID (Azure AD) with automatic token refresh.
http://localhost:7091/api/connectors/callback?provider=share_pointhttps://yourdomain.com/api/connectors/callback?provider=share_pointIn your App Registration, go to API permissions > Add a permission > Microsoft Graph > Delegated permissions and add: Files.Read, Files.Read.All, Sites.Read.All. Grant admin consent if possible.
Go to Certificates & secrets > New client secret. Copy the secret value immediately (it won't be shown again).
Add to your .env file:
MICROSOFT_CLIENT_ID=your-azure-ad-client-id
MICROSOFT_CLIENT_SECRET=your-azure-ad-client-secret
MICROSOFT_TENANT_ID=your-azure-ad-tenant-id
| Variable | Description | Required | Default |
|---|---|---|---|
MICROSOFT_CLIENT_ID | Application (client) ID from App Registration overview | Yes | — |
MICROSOFT_CLIENT_SECRET | Client secret value | Yes | — |
MICROSOFT_TENANT_ID | Directory (tenant) ID | No | common |
MICROSOFT_AUTHORITY | Login endpoint override | No | Auto-constructed |
Restart your application, then go to the upload section in DocsGPT and select SharePoint / OneDrive as the source. You'll be redirected to Microsoft to sign in, then can browse and select files to process.
</Steps>MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET are set, then restart.?provider=share_point.