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

# Microsoft SharePoint

> Let the Dema Agent work with SharePoint sites, lists, document libraries, files, and sharing through Microsoft's hosted SharePoint MCP server.

export const MicrosoftTroubleshootingNote = () => <Info>
    Invalid MCP URLs, <code>AADSTS</code> codes, admin approval, and 403 responses work the same way for every Microsoft integration. <a href="/guides/agent/integrations/microsoft#troubleshooting">Microsoft overview → Troubleshooting</a> covers them.
  </Info>;

export const MicrosoftPreviewNote = () => <Note>
    Microsoft integrations are in <strong>preview</strong>, and so are the Agent 365 / Work IQ MCP servers behind them. Tools can change without notice. Your workspace might need preview integrations enabled before these show up.
  </Note>;

export const McpUrlPlaceholderNote = () => <Note>
    Replace the whole <code>{'{tenant_id}'}</code> placeholder, braces included. Dema rejects a URL that still has braces in it. A tenant ID is a GUID, like <code>8f7a1b2c-3d4e-4f56-a7b8-9c0d1e2f3a4b</code>.
  </Note>;

## Overview

Once Microsoft SharePoint is connected, the Dema Agent can read the documents and lists your team keeps in SharePoint, and file its own output back into them.

The agent acts only when you ask it to, and Dema asks you to confirm sensitive changes first. It signs in as whoever authorized the connection, so it sees the same sites and files that person sees.

<MicrosoftPreviewNote />

<Tip>
  File operations work on files up to **5 MB**.
</Tip>

***

## What you can ask for

<AccordionGroup>
  <Accordion title="Find and read documents" icon="file-lines">
    | Ask the agent to                | For example                                                        |
    | ------------------------------- | ------------------------------------------------------------------ |
    | Locate a document               | *"Find the supplier agreement for Acme in the Buying site."*       |
    | Read a file into a conversation | *"Open the returns policy document and summarize the exceptions."* |
    | Browse a library                | *"List the files in the Marketing site's Documents library."*      |
  </Accordion>

  <Accordion title="Work with lists" icon="table-list">
    | Ask the agent to              | For example                                                             |
    | ----------------------------- | ----------------------------------------------------------------------- |
    | Read list data                | *"What is in the Campaign Tracker list for this quarter?"*              |
    | Cross-check against Dema data | *"Compare the planned spend in that list with what we actually spent."* |
    | Update items                  | *"Mark the Black Friday campaign as complete in the tracker."*          |
  </Accordion>

  <Accordion title="Organize and share" icon="folder-open">
    | Ask the agent to        | For example                                                       |
    | ----------------------- | ----------------------------------------------------------------- |
    | File the agent's output | *"Save this margin report to the Trading site's Reports folder."* |
    | Tidy up                 | *"Move last season's files into the Archive folder."*             |
    | Share a document        | *"Create a link to that report for the buying team."*             |
  </Accordion>
</AccordionGroup>

***

## Before you connect

Every Microsoft integration needs the same prerequisites, plus a tenant setup an admin does once per Microsoft 365 tenant. Start there, then come back:

<Card title="Microsoft overview" icon="https://mintcdn.com/demaai/-QBoxgr91D2DfDZm/images/integrations/microsoft-sharepoint.svg?fit=max&auto=format&n=-QBoxgr91D2DfDZm&q=85&s=d7ee234abe4be7825b2db06b9f489d3e" href="/guides/agent/integrations/microsoft" horizontal width="24" height="24" data-path="images/integrations/microsoft-sharepoint.svg">
  Prerequisites, one-time tenant setup, and shared troubleshooting
</Card>

***

## Connect Microsoft SharePoint

<Steps>
  <Step title="Build your MCP URL">
    SharePoint is served by `mcp_SharePointRemoteServer`. Replace `{tenant_id}` with your Entra tenant ID:

    ```text MCP URL theme={null}
    https://agent365.svc.cloud.microsoft/agents/tenants/{tenant_id}/servers/mcp_SharePointRemoteServer
    ```

    <McpUrlPlaceholderNote />
  </Step>

  <Step title="Connect in Dema">
    In Dema, go to **Agents → Settings → Integrations**, find **Microsoft SharePoint**, and click **Connect**. Paste the MCP URL you built, then click **Add**.
  </Step>

  <Step title="Sign in and approve">
    Sign in with a Microsoft **work or school** account that belongs to the same tenant as the URL, and approve the permission Dema asks for.

    <Check>
      You are returned to Dema with the integration marked as Active.
    </Check>
  </Step>

  <Step title="Check it works">
    Ask the agent something only SharePoint can answer, for example: *"List the files in the Marketing site's Documents library."* If it comes back with real file names, the connection works.
  </Step>
</Steps>

***

## Scopes Dema requests

| Scope                       | What it allows                                                                                                         |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `McpServers.SharePoint.All` | Work with SharePoint sites, lists, list items, columns, document libraries, files, folders, and sharing on your behalf |
| `offline_access`            | Keep the connection alive so you do not have to reconnect often                                                        |

Dema requests these against your tenant's own MCP server, so the grant covers that server and not your Microsoft 365 account as a whole.

***

## Troubleshooting

<MicrosoftTroubleshootingNote />

<AccordionGroup>
  <Accordion title="A file operation fails on a large file" icon="file-circle-xmark">
    File operations are capped at **5 MB**. The agent cannot read or upload anything larger. Share a link to the file instead, or work from a smaller extract.
  </Accordion>

  <Accordion title="The agent cannot find a site, library, or file" icon="eye-slash">
    The agent sees only what the authorizing account can open. Grant that account access to the site or library, or reconnect with one that already has it. Name searches need the exact site or library name, so try the site URL if the name does not match.
  </Accordion>

  <Accordion title="McpServers.SharePoint.All does not appear in Entra" icon="key">
    An Entra admin has to register or consent the Work IQ SharePoint MCP server (`mcp_SharePointRemoteServer`) in your tenant before anyone can grant the permission.
  </Accordion>
</AccordionGroup>

Still stuck? Contact [support](mailto:info@dema.ai) with the error message, including the Entra `AADSTS` code if you have one.
