> ## Documentation Index
> Fetch the complete documentation index at: https://support.i.moneyforward.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SharePoint integration

> Connect SharePoint as a knowledge source so the AI agent can search and reference SharePoint files and pages when answering inquiries

Connect SharePoint as a knowledge source. The AI agent can then search and reference SharePoint files and pages when answering employee inquiries.

SharePoint integration connects to SharePoint Online sites.
You connect by granting Microsoft admin consent, which gives the Admina app access to SharePoint.

<Note>
  AI Helpdesk requests read-only access only and never modifies your SharePoint content.
</Note>

## Prerequisites

<Info>
  * **Admin** role in AI Helpdesk is required
  * You need an account that can grant admin consent to apps in your Microsoft 365 organization
  * Prepare the URLs of the SharePoint sites to import (for example, `https://yourcompany.sharepoint.com/sites/IT`)
  * Knowledge sources must be initialized. If the **Knowledge sources** section shows the **Initialize Knowledge sources** button, click it and wait until initialization finishes
</Info>

<Warning>
  AI Helpdesk does not apply access permissions from SharePoint. Files and pages imported from the sites you specify can be used to answer questions from every employee in your organization who uses AI Helpdesk.

  Take care when connecting sites or libraries that contain sensitive information. Before you start the first sync, limit what to import. Use **Site URLs (one per line)** and **SharePoint URL paths to include (optional)**. For details, see [Set what to import](#crawl-scope).
</Warning>

<h2 id="connect">
  Connect SharePoint
</h2>

<Steps>
  <Step title="Start connecting a source">
    Select **Settings** from the left navigation, then open the **Integration** tab.
    Click **Connect a source** in the **Knowledge sources** section and select **SharePoint**.
  </Step>

  <Step title="Choose the connection method">
    Select **Authorize with SharePoint**.
  </Step>

  <Step title="Grant admin consent in Microsoft">
    Click the **Authorize with SharePoint** button. You are redirected to the Microsoft admin consent page.
    Sign in with an account that can grant admin consent, and allow access.
  </Step>

  <Step title="Set what to import">
    After you grant consent, you return to AI Helpdesk and the **Configure SharePoint** screen appears.
    Enter the URLs of the sites to import in **Site URLs (one per line)**, then click **Save Settings** ([Set what to import](#crawl-scope)).
  </Step>

  <Step title="Start the first sync">
    Click **Start first sync**.
    To run the sync later, click **Skip for now**.
  </Step>

  <Step title="Confirm the connection">
    A SharePoint row appears in the **Knowledge sources** section.
    When the sync finishes, the row's badge shows **Synced**.
  </Step>
</Steps>

<Info>
  The SharePoint connection is not complete until you save **Site URLs (one per line)**. You cannot click **Skip for now** on the **Configure SharePoint** screen.

  If you close the screen without saving, the source cannot sync. The SharePoint row shows a message that setup is not complete. Click **Edit Config** in the row's menu (**…**) and save the site URLs.
</Info>

<h2 id="crawl-scope">
  Set what to import
</h2>

Set the following on the **Configure SharePoint** screen when you connect.
To change the settings later, click **Edit Config** in the menu (**…**) of the SharePoint row.

1. In **Site URLs (one per line)**, enter the URLs of the sites to import, one URL per line
2. Under **Object Types to Crawl**, select the content types to import (**File**, **Page**). Both are selected by default
3. To import only part of a site, enter URLs in **SharePoint URL paths to include (optional)**, one per line. You can enter URLs of a library, folder, file, or page. For example, `https://yourcompany.sharepoint.com/sites/IT/Shared Documents/Public/`
4. Click **Save Settings**

<Info>
  * If you select neither **File** nor **Page**, both are imported
  * If **SharePoint URL paths to include (optional)** is empty, all content from the specified sites is imported
  * You cannot specify URL paths to exclude
  * Files larger than 25 MB are not imported
</Info>

## Using SharePoint with the AI Agent

Once connected, the AI agent includes SharePoint in knowledge searches automatically.

The AI agent does not access SharePoint each time it answers a question. Instead, it searches the content that each sync imports and indexes. Files and pages you add or update in SharePoint appear in search results after the next sync.

By default, the sync schedule is set to **Manual (default)**. With Manual, SharePoint syncs only when you click **Sync Now**. You can find it in the menu (**…**) of the SharePoint row in the **Knowledge sources** section. To sync automatically, open **Sync schedule** in the same menu and change it to **Every hour**, **Every 6 hours**, **Daily**, or **Weekly**. You need the AI Helpdesk **Admin** role to run a sync or change the sync schedule.

To explicitly reference SharePoint in a Playbook step, use the `{{document_search}}` tool.

```markdown theme={null}
### Step 2: Search internal documents

Use {{document_search}} to find relevant procedures.
Include documents in the SharePoint IT site in the search.
```

## Check the sync history

To open the sync history, click the badge that shows the sync status of the SharePoint row (such as **Synced**). You can also click **Sync history** in the row's menu (**…**).
For what each count in the sync history means, see "[Read the sync history](/en/ai-helpdesk/integrations/confluence#sync-history)" in Confluence integration.

## Disconnect SharePoint

<Steps>
  <Step title="Open Knowledge sources">
    Go to **Settings** > **Integration** tab and open the **Knowledge sources** section.
  </Step>

  <Step title="Disconnect">
    Click **Disconnect** in the menu (**…**) of the SharePoint row you want to disconnect.
    In the confirmation dialog, click **Disconnect**.

    For 5 seconds after you click the button in the dialog, you can click **Undo** in the notification to cancel the disconnection.

    <Warning>
      After disconnecting, the AI agent will no longer search SharePoint.
    </Warning>
  </Step>
</Steps>

Disconnecting does not revoke the admin consent you granted in Microsoft. If you no longer need it, revoke it on the Microsoft side.

## Troubleshooting

**The row's badge shows "Connection broken" or "Sync failed"**

Check the error in the sync history. The problem may be related to authentication, for example because the admin consent was revoked. In that case, click **Edit credential** in the row's menu (**…**). Then click **Re-authenticate** in the confirmation dialog, and grant admin consent in Microsoft again.

**"Failed to connect SharePoint. Please try again." appears**

Follow the steps in [Connect SharePoint](#connect) again from the beginning.

**Certain files or pages do not appear in search results**

AI Helpdesk imports content only from the sites in **Site URLs (one per line)**. If **SharePoint URL paths to include (optional)** is set, only content under those paths is imported. Check the settings from **Edit Config** in the row's menu (**…**).

## Related pages

* [AI Helpdesk integrations overview](/en/ai-helpdesk/integrations/index)
* [Confluence integration](/en/ai-helpdesk/integrations/confluence)
* [Add knowledge](/en/ai-helpdesk/knowledge/adding)
* [Register playbooks](/en/ai-helpdesk/playbooks/creating)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.