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

# SharePoint

> Sync client documentation from SharePoint document libraries and map folders to companies for company-scoped search

Neo Agent syncs documentation from your SharePoint document libraries so agents can search and read it during ticket resolution. You choose which libraries to sync, and then map top-level folders to the companies they belong to — so a search for one client only surfaces that client's documents.

<Info>
  **No API key, no app to install.** SharePoint rides the Microsoft 365 admin app you already use for Neo's other Microsoft features. Connecting is a matter of granting read access on your own tenant and picking which libraries to sync.
</Info>

## How Neo reads SharePoint

Neo reads SharePoint through the **Neo Azure Automations** application on your own Microsoft 365 tenant, using two read-only permissions:

| Permission       | What it allows                                          |
| ---------------- | ------------------------------------------------------- |
| `Sites.Read.All` | List your SharePoint sites and their document libraries |
| `Files.Read.All` | Read the files inside the libraries you select          |

Both are **read-only** — Neo never writes to, moves, or deletes anything in SharePoint.

<Warning>
  **Tenants consented before these scopes need a one-time re-consent.** Microsoft app permissions are not retroactive: if your tenant granted Neo access before the SharePoint scopes were added, it holds none of them yet. Neo detects this and shows a **Grant admin consent** button — a Microsoft 365 admin clicks it once, and SharePoint access is enabled. This is expected and only happens the first time.
</Warning>

## Connect SharePoint

<Steps>
  <Step title="Open the SharePoint tile">
    In the Neo Dashboard, open [**Integrations**](https://dashboard.neoagent.io/integrations) and click the **SharePoint** tile in the Documentation section.
  </Step>

  <Step title="Verify access">
    Click **Verify access**. Neo checks whether its Microsoft 365 app can read SharePoint on your tenant.

    * **Access is already granted** → you go straight to the library picker.
    * **Access isn't granted yet** → Neo shows an amber **Admin consent needed** notice with a **Grant admin consent** button. A Microsoft 365 admin opens it, approves the read permissions, then returns and clicks **I've granted consent — recheck**.
  </Step>

  <Step title="Choose your document libraries">
    Neo lists your SharePoint sites. Expand a site to see its document libraries, and tick the ones you want Neo to sync. You can select libraries across multiple sites.

    <Tip>
      Sync the libraries that hold **client-facing documentation** — runbooks, procedures, network diagrams. You'll map their folders to companies in the next step.
    </Tip>
  </Step>

  <Step title="Connect">
    Click **Connect *N* libraries**. Neo saves your selection and starts the first sync. Larger libraries take a little longer on the first run; subsequent syncs only pull in what changed.

    <Check>
      The tile flips to a green **Connected** card listing the libraries you chose, with **Review folder mappings**, **Change libraries**, and **Disconnect**.
    </Check>
  </Step>
</Steps>

## Map folders to companies

SharePoint has no built-in notion of which company a folder belongs to, so Neo asks you once. After the first sync, Neo scans the top folders in your libraries (2–3 levels deep), matches each to a company by name, and presents the matches for you to confirm — so you approve a list instead of mapping every folder by hand.

<Steps>
  <Step title="Open the review queue">
    On the connected SharePoint card, click **Review folder mappings** (or open it from a company's linked-systems column on the [Companies](https://dashboard.neoagent.io/companies) page).
  </Step>

  <Step title="Review Neo's matches">
    Each row shows a folder, the company Neo matched it to, and how confident the match is:

    | Match                       | Meaning                                                                              |
    | --------------------------- | ------------------------------------------------------------------------------------ |
    | **Exact name**              | The folder name matches a company name exactly — pre-checked for you                 |
    | **Close name** / **Domain** | A near match — shown but left unticked for you to confirm                            |
    | **AI guess**                | A best-effort suggestion for folders that didn't match by name — always review these |

    Tick the rows that are right, retarget any folder to a different company with the picker, and click the **✕** to dismiss a folder that isn't client documentation (dismissed folders won't be suggested again).
  </Step>

  <Step title="Confirm">
    Click **Map *N* folders**. Neo saves the mappings and scopes each folder's documents — and everything beneath it — to that company. **Nothing is applied until you confirm**, and only the rows you kept are mapped.
  </Step>
</Steps>

<Info>
  **Unmapped folders are fine.** A folder you don't map (or dismiss) still syncs — its documents are just **global**, available to every company's searches rather than scoped to one. A subfolder always inherits the nearest mapped folder above it, so you only map at the level that matters.
</Info>

<Note>
  If a mapping saves but Neo can't immediately re-scope the already-synced documents (a transient hiccup), the review queue tells you which folders are affected and offers **Retry re-scoping**. The mappings themselves are always saved.
</Note>

## What gets synced

|                      |                                                                                           |
| -------------------- | ----------------------------------------------------------------------------------------- |
| **File types**       | `.pdf`, `.docx`, `.doc`, `.xlsx`, `.xls`, `.csv`, `.txt`, `.md`, `.html`, `.xml`          |
| **Size limit**       | Files up to 50 MB. Larger files are skipped.                                              |
| **Other file types** | Skipped (for example images and video) — only the types above are indexed                 |
| **Change detection** | Only new and changed files are re-downloaded on each sync; unchanged files are left as-is |

Once synced, your SharePoint documents are searchable alongside IT Glue, Hudu, Confluence, and any other documentation sources you've connected — scoped to the company you mapped their folder to.

## Change which libraries sync

On the connected card, click **Change libraries** to re-open the picker with your current selection pre-ticked. Adjust the set and click **Connect** again. Libraries you remove stop syncing; new ones are picked up on the next sync.

## Disconnect

Open the SharePoint tile and click **Disconnect**. Neo stops syncing SharePoint and its synced documents stop updating. Your SharePoint content and the admin-consent grant on your tenant are not affected — reconnecting later picks up where you left off.

## Security

* Neo's SharePoint access is **read-only** (`Sites.Read.All`, `Files.Read.All`) — it never modifies your SharePoint content.
* Access runs through the Microsoft 365 admin app on **your own tenant**; there are no separate credentials to manage.
* Folder→company mappings are only ever the ones you explicitly confirm — Neo never auto-applies a mapping.
* All traffic is over HTTPS, and synced content is isolated per tenant.
