> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fife.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# SharePoint & OneDrive

> Connect Microsoft SharePoint or OneDrive and sync documents into your chatbot's knowledge base.

Import files from SharePoint document libraries or OneDrive personal storage. Both use Microsoft OAuth for authentication.

## Connecting SharePoint / OneDrive

<Info>
  SharePoint / OneDrive is connected **per-user**, not per-chatbot. Connect once on the Integrations page.
</Info>

<Steps>
  <Step title="Go to Integrations page">
    Navigate to **Integrations** in the sidebar.
  </Step>

  <Step title="Click Add on SharePoint">
    You'll be redirected to Microsoft's OAuth consent screen.
  </Step>

  <Step title="Sign in and authorize">
    Sign in with your Microsoft account (work, school, or personal) and grant FIFE.BOT read access.
  </Step>

  <Step title="Redirect back">
    After authorization, you're redirected back to the Integrations page. Your connection appears with the site name.
  </Step>
</Steps>

## Adding SharePoint / OneDrive as a Knowledge Source

<Steps>
  <Step title="Open Knowledge Base tab">
    Go to your chatbot → **Knowledge Base** tab.
  </Step>

  <Step title="Click Add Source → SharePoint">
    Select your SharePoint / OneDrive connection.
  </Step>

  <Step title="Browse drives and folders">
    A file browser shows your SharePoint sites, document libraries, and OneDrive folders. Navigate and select files.
  </Step>

  <Step title="Save">
    Selected files are downloaded, parsed, chunked, and embedded.
  </Step>
</Steps>

## Auto-Sync

SharePoint / OneDrive sources are automatically re-synced on a schedule. Updated files are re-fetched and re-indexed during the next sync cycle.

## Supported File Types

* **Word documents** (.docx)
* **PDF files**
* **Text files** (.txt)
* **PowerPoint** (.pptx) — text extracted from slides

## Managing Connections

On the **Integrations** page:

* **Rename** a SharePoint / OneDrive connection
* **Disconnect** — revokes access and stops syncs

## Routing Instructions

Add source-specific context for SharePoint content.

**Example:**

> "This SharePoint library contains HR policies. Always reference the effective date when answering policy questions."

## Troubleshooting

| Issue            | Solution                                                                          |
| ---------------- | --------------------------------------------------------------------------------- |
| OAuth failed     | Ensure pop-ups are allowed. Try a different browser if issues persist.            |
| No sites visible | Check that your Microsoft account has access to the SharePoint site               |
| Permission error | Your organization's admin may need to approve the FIFE.BOT app in Azure AD        |
| Sync stopped     | Microsoft OAuth tokens expire. Disconnect and reconnect on the Integrations page. |
