Skip to main content
SharePoint The SharePoint app provides read/write access to Microsoft SharePoint Online and OneDrive through the Microsoft Graph REST API (v1.0): sites, document libraries (drives), files and folders, SharePoint lists, sharing permissions, and the Azure AD directory. It can also read Excel .xlsx workbooks and Word .docx documents natively: cell values and document text are parsed in-process, with no download, OCR or external extraction service. It can be consumed two ways: as a remote MCP server that Agent Creator agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into ten entity tools (sites, drives, items, search, permissions, lists, directory, workbook, documents, dataset), each driven by an action argument, and runs in the tenant app-instance context (it resolves the installing workspace’s own credentials). Authentication is per-user and supports several modes:
  • Per-user OAuth2 (central client) (oauthCentral, recommended): one Microsoft Entra OAuth Application is registered once by the platform maintainer; every end user signs in with their own Microsoft account. Nothing to register per tenant: each workspace just installs the app and clicks Connect.
  • Per-user OAuth2 (tenant client) (oauth): paste your own Entra application (client) ID/secret in the connector config app. Each user signs in with their own account against your client (PKCE authorization-code flow).
  • Application (client credentials) (clientCredentials): an Entra app with application Graph permissions and admin consent, acting without an interactive sign-in. Best for back-office / service automations and content indexing.
  • Direct access token (accessToken): a caller-managed Microsoft Graph access token, used as-is with no exchange.

Sites & files

Discover sites and subsites, browse document libraries and folders, read/create/move/copy files, get pre-signed download URLs, thumbnails and versions, and read Excel .xlsx workbooks and Word .docx documents natively (cell values, full text)

Lists, search & permissions

Query and write SharePoint lists and list items, run Microsoft Search across drives and sites, and inspect or manage sharing permissions for access-aware RAG

Flexible per-user auth

Per-user Microsoft Entra OAuth (central or tenant client), application client-credentials, or a direct access token

Video tutorial

This four-minute tutorial walks through the four ways to use this connector, from the simplest to the most advanced: connecting your own Microsoft account from a chat, adding the SharePoint Next capability to an agent in Agent Creator, controlling authentication and authorized agents from a Builder workspace (with a searchSites automation), and declaring the platform OAuth client as an administrator. Use the buttons in the top-right corner of the player to switch the narration language and the subtitles. The sections on the left are clickable. Screens show the English interface; narration and subtitles are available in English and French.

Who is this for?

This connector is used by four different roles. Jump to the section that matches yours; each one is self-contained.

Agent builder

You build agents in Agent Creator and want them to browse SharePoint sites, read files and query lists. → Agent builder tab.

Knowledge base owner

You want SharePoint documents indexed and searchable semantically, kept up to date. → Knowledge base (sync) tab.

Platform admin

You run the platform and set up the shared Microsoft Entra OAuth client once for everyone. → Platform admin setup accordion below.

Workspace builder

You write Builder automations (DSUL) that call SharePoint operations directly. → Workspace builder tab.

Prerequisites (Microsoft side)

  • A Microsoft 365 / SharePoint Online tenant, and an Azure / Microsoft Entra ID tenant where you can register an application (or a maintainer who already did).
  • An app registration in Microsoft Entra ID (Azure portal → App registrations), with a client secret created under Certificates & secrets.
  • Microsoft Graph delegated permissions granted on the app (for the per-user OAuth modes), covering the resources you intend to use:
    • Sites & files: Sites.Read.All (or Sites.ReadWrite.All for create/update/move), Files.Read.All (or Files.ReadWrite.All)
    • Directory (access-aware RAG): User.Read, GroupMember.Read.All (optional)
    • Sign-in / identity: openid, profile, offline_access
  • To index documents protected by a Microsoft Purview sensitivity label with the connection owner’s rights, the delegated permission user_impersonation on Azure Rights Management Services. See Rights-Protected Documents.
  • Optional (OAuth per-user modes): InformationProtectionPolicy.Read (delegated), so that the items sensitivityLabels action also returns each label’s name and whether it encrypts the file. See Sensitivity label names (optional) in the Agent builder (Agent Creator) tab below, under items: checking a file’s sensitivity label.
  • For the application (client-credentials) mode instead, grant the equivalent application permissions (e.g. Sites.Read.All, Files.Read.All) and have a Global Administrator grant admin consent.
Every scope listed in the connector’s Scopes field must be consented on the Entra application in use (admin consent when your tenant requires it). When your tenant does not let users consent themselves, a scope without admin consent makes every new connection of the workspace fail. Have it consented in Microsoft Entra first, then add it to the field.

Checking requested against granted scopes

Microsoft lists the permissions it actually granted in its answer to every connection. In the OAuth modes, once you are connected, the configuration app compares them with the Scopes field:
  • Requested but not granted: if your last connection predates a change of the list, reconnect. Otherwise Microsoft did not grant these: have a Microsoft 365 administrator consent to them on the Entra application, or remove them from the field, then reconnect.
  • Granted but not requested: the application holds these permissions through another consent; the connector does not ask for them.
  • Granted to the application: with the .default option (below), there is no list to compare, so the configuration app lists what Microsoft granted.
  • Scopes of another Microsoft resource (such as Azure Rights Management) cannot be checked from the Microsoft Graph answer and are listed apart.
The comparison reflects your own last connection: reconnect after changing the field to refresh it. When a connection fails because a consent is missing or a scope is unknown, the result window stays open instead of closing after a few seconds, and says what to do: which permission is missing (when Microsoft names it), then either have it consented in Microsoft Entra or remove it from the Scopes field.

Your own Entra app: request exactly what it was granted (.default)

With your own Microsoft Entra app (OAuth2 per-user mode with your client ID), the configuration app offers Ask for exactly the permissions granted to this Entra application (.default). Instead of the Microsoft Graph scopes, the connector then requests https://graph.microsoft.com/.default: Microsoft grants everything consented on your application, write permissions included. A permission your Microsoft administrator adds later reaches each user at their next connection, without changing anything in Prisme.ai. Nothing else stays in the list: Microsoft refuses a request that mixes .default with individual scopes. To keep a permission of another resource, such as user_impersonation on Azure Rights Management for protected documents, declare it on your Entra application and consent to it: .default then grants it too. This option is not available with the platform’s central client, and a list holding .default cannot be saved there: .default would request every permission declared on the platform’s application, write ones included.

Restricting the connector to chosen sites (Sites.Selected)

Sites.Read.All reaches every site of the tenant. To give the connector a handful of sites only, use the Sites.Selected application permission with the clientCredentials mode:
  1. On the app registration, grant the Sites.Selected application permission (with Files.Read.All or Files.ReadWrite.All if needed) and have an administrator grant admin consent. On its own, Sites.Selected opens no site.
  2. A Microsoft 365 administrator grants the application access site by site, with the read or write role (Microsoft Graph POST /sites/{site-id}/permissions, or Grant-PnPAzureADAppSitePermission).
  3. In the connector’s configuration app, open the Authentication tab and go to its Authorized sites section. Paste the URL of each granted site, choose its role (read or write), and save. The configuration app resolves each URL and lists, under each line, the sites the service account cannot open.
Once sites are declared:
  • The agent only sees the declared sites. Listing sites returns that list, and search runs inside each declared site’s default document library.
  • Every call that names a site or a document library outside the list is refused before it reaches Microsoft Graph, with a message naming the authorized sites. A site declared read refuses writes; a copy from it into a write site is allowed.
  • Microsoft Search (/search/query) and the user’s personal OneDrive are not available: Sites.Selected does not cover them.
  • Search covers the default document library of each site, does not rank results across sites, does not return list items, and returns at most the first 200 hits.
An empty list puts the connector back to the reach of its credential. The declaration also works with a tenant-wide permission, to expose fewer sites than the credential could reach. The OAuth scopes requested by default are:
Goal: two one-time tasks: (1) configure the shared central Microsoft Entra OAuth client so every workspace lets its users sign in with their own Microsoft account, and (2) expose SharePoint as a reusable capability in AI Governance so agent builders can pick it without pasting endpoint URLs.

1. Configure the connector

1

Register the OAuth Application in Microsoft Entra ID

In Microsoft Entra ID → App registrations > New registration, register a Web application. Add a Redirect URI pointing at the core workspace callback:
Microsoft Entra rejects redirect URIs that contain a colon in the path, so use the raw workspace id of the core SharePoint workspace (<workspace-id>), not the slug:sharepoint-next form used by other connectors. Copy the exact URI from the connector’s configuration app, which renders it for you.
Add the Microsoft Graph delegated permissions listed in Prerequisites, create a client secret under Certificates & secrets, and note the Application (client) ID, the secret value, and the Directory (tenant) ID (or use common / organizations for multi-tenant).
2

Enter the credentials through the configuration app

Open the central sharepoint-next workspace and launch its Configuration app: <studio>/apps/sharepoint-next (e.g. https://studio.prisme.ai/apps/sharepoint-next), also linked as Configuration app on the installed instance. Switch to the maintainer view and follow the in-app instructions to paste the Client ID, Client Secret, Tenant and (optionally) scopes; the app stores them in the core workspace’s secrets for you. Do not edit Studio’s raw Secrets by hand. These credentials stay in the sharepoint-next workspace and are never exposed to tenants or end users; token exchange is proxied through the core centralTokenExchange webhook so the client secret never leaves the core workspace.
3

Tell workspaces to use the central client

Each consuming workspace selects auth mode oauthCentral in the connector configuration app (no client id/secret to enter on their side). Their users then just click Connect.

2. Declare the capability in AI Governance

Generic connectors (broad tool surfaces meant to be shared across many agents, like SharePoint) are best exposed as a named capability in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint.
1

Open AI Governance > Capabilities

Create (or edit) the SharePoint capability.
2

Point it at the MCP endpoint

Set the capability’s MCP server URL to the connector’s MCP Endpoint, and set its Scope to:
The agent_id in the scope is what lets the connector identify and authorize the calling agent.
3

Make it available to agent builders

Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization’s existing roles; there is no per-capability role grant.
4

Smoke-test

From an agent that has the capability, in a workspace configured for oauthCentral, trigger any tool. The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically.
The connector’s configuration app also offers a one-click Add to catalog button (workspace owner / admin only) that publishes the SharePoint capability to the organization-wide Capabilities catalog for you, the easiest way to expose it to agent builders without hand-editing Governance.
Declaring the capability makes the connector available; it does not by itself authorize a specific agent. This connector follows the tenant-context model: which agents may actually call it is gated per-workspace by the authorized-agents allowlist in the configuration app (see the Workspace builder tab). Agents show a Connect button only if the catalog entry carries the connector’s connect / status / disconnect webhooks in its auth block. The configuration app’s Add to catalog button writes it for you. If you create the entry by hand, paste that block into Auth Configuration: the platform adds it later on its own only for a workspace endpoint (ending in .mcp), never for the connector’s global /webhooks/mcp endpoint.

Agent builder

Goal: let an agent you build in Agent Creator browse SharePoint sites, read and manage files, query lists, and check permissions through MCP tools.
Before an agent can call the connector, a Workspace builder must have installed and configured the SharePoint app in a workspace (see the Workspace builder tab), and, for the central OAuth mode, a Platform admin must have provisioned the shared Microsoft Entra OAuth client (see the Platform admin setup accordion above).
This connector runs in the tenant app-instance context: your agent is authorized two ways at once: it is identified by the agent_id that Agent Creator injects through the capability Scope, and that agent must appear in the connector’s authorized-agents allowlist (managed in the configuration app). The Microsoft Graph access token itself is resolved server-side from the configured auth mode.There are two ways to wire it up. Pick based on how much isolation you need.

Option A: Enable the shared capability from the catalog

The fastest path: a Platform admin has already published a SharePoint capability (see the Platform admin setup accordion above, §2), so you just pick it from the catalog. A workspace owner can publish it in one click with the config app’s Add to catalog button.
1

Open your agent in Agent Creator

Open the agent you want to extend and go to its capabilities / tools.
2

Add the SharePoint capability

Browse the capability catalog, select SharePoint, and enable it. The MCP endpoint URL and the Scope (context_id,agent_id,user_id) are already wired by the admin: nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side.
3

Connect a Microsoft account (OAuth modes)

On the first tool call, an unconnected user is prompted to sign in; Agent Creator surfaces a connect_url. Application (clientCredentials) and accessToken modes need no per-user sign-in.
Convenient, but your agent runs against a shared, platform-managed instance: its Microsoft credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments.
For production agents, install the connector in your own workspace and point the agent at that workspace’s MCP endpoint.
Prefer this mode for security. Because the MCP runs in your app-instance context, the Microsoft credentials, the per-user OAuth tokens and the authorized-agents allowlist are all scoped to your workspace, not shared platform-wide. You decide exactly which agents may call it and which Microsoft account / auth mode backs them, and a misconfiguration elsewhere can never expose your SharePoint content. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary.
1

Install and configure the connector in your workspace

Follow the Workspace builder tab: install SharePoint in your workspace, open its Configuration app, choose the auth mode and connect a Microsoft account.
2

Allowlist your agent

In that workspace’s config app, open the Agents tab and tick your agent under Authorized agents (the Install capability button does this for you).
3

Add the MCP capability to your agent

In your agent, add a capability pointing at your workspace’s MCP Endpoint URL, and set its Scope to:
The agent_id is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit “agent could not be identified” message. This Scope is separate from the Microsoft Graph OAuth scopes.
4

Connect a Microsoft account (OAuth modes)

On the first tool call, the user is prompted to sign in (or uses Connect in the config app).

Brief the agent in its system prompt

Whichever option you pick, wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter:
Legacy AI Knowledge agents (no native MCP picker): add the connector under Advanced > Tools > MCP and paste the MCP Endpoint URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its agent_id.
Restricting to read-only (least privilege). SharePoint tools cover both reads and writes (create folders, rename, move, copy, delete, share, edit list items and Excel cells; the connector never uploads file content). The default scopes depend on the OAuth client: with your own Microsoft Entra app, the connector requests read-only scopes (Sites.Read.All, Files.Read.All) unless you widen the Scopes field; with the platform’s central client, it requests Sites.ReadWrite.All and Files.ReadWrite.All. To keep the connector read-only, set the read scopes (the Read-only preset of the configuration app):
Any write attempt is then rejected by Microsoft Graph with 403 Forbidden. The scope is set at the workspace level (a workspace editor can widen it); for a hard guarantee, use an Entra app limited to read permissions.

Available Tools

Each tool takes an action argument selecting the concrete operation, plus the per-action parameters.

Output Formats

Every tool accepts an outputFormat argument that controls the MCP response shape:
  • verbose (default): a human-readable text view, optimized for LLM consumption.
  • structured: concise machine-readable JSON in structuredContent.
  • both: the structured payload, with its JSON also rendered as text.

Tool Details

sites

drives

items

When Microsoft Graph refuses a query value that the call sent (an unknown expand or select value, an unsupported sort or filter), the error returned to the agent lists the values that action accepts, so the agent can correct its call instead of guessing again. This applies to get, changes, the four listing actions above, and the lists, sites, drives and directory actions that take these parameters.

items: checking a file’s sensitivity label

The sensitivityLabels action returns the Microsoft Purview sensitivity labels applied to a file (driveId + itemId). An empty labels list means the file carries no label. Each label comes with its sensitivityLabelId and how it was applied (assignmentMethod). Its name comes too when the permission below is granted. It needs no permission beyond the ones the connector already requests (Files.Read.All or Sites.Read.All). Microsoft supports it only for file types that can carry a sensitivity label.

Sensitivity label names (optional)

In the OAuth per-user modes, when the user’s connection was granted InformationProtectionPolicy.Read, each label also comes with its name and hasProtection (true when the label encrypts the file), read from the Microsoft Purview label catalog (Microsoft Graph beta, global cloud only). Microsoft answers with the labels published to that user, so each user’s answers are cached separately, for one hour. Without that permission nothing changes: the label id only, and the catalog is never called. In the application (client-credentials) and access-token modes, label names are not available: the label id only.To turn it on, in this order:
  1. In Microsoft Entra, add the delegated Microsoft Graph permission InformationProtectionPolicy.Read to the application and consent to it (admin consent when your tenant requires it). With the platform’s central client, your tenant’s administrator consents to it for the platform application.
  2. In the connector’s configuration app, add Read sensitivity label names (InformationProtectionPolicy.Read) to the Scopes field, then click Save authentication. With your own Entra app and the .default option, skip this step.
  3. Each user reconnects their Microsoft account once.
  4. Verify: ask an agent whether a labelled file is protected. The answer now names the label and says whether it encrypts the file; in the configuration app, InformationProtectionPolicy.Read no longer appears under Requested but not granted.
The permission is in no default list and no preset: adding it to the field before it is consented can make every new connection fail.

items: reading a file’s content

Pick the reading path by file format:getContent decides from the file’s metadata before downloading anything: a text file comes back as text, and any other file comes back as the same attachment offer as attachToChat, never as raw bytes.attachToChat never downloads the file. It returns a standard MCP resource_link whose uri is the file’s SharePoint web link. Agent Creator then asks the user to approve the attachment; once approved, the file is fetched server-side from its pre-signed download link and indexed in the conversation, exactly like a file the user dropped in the chat. The agent then searches it like any conversation document. Size limits:
  • PDF, PowerPoint and other documents: up to the chat upload limit (attachment_direct_max_bytes, 100 MB by default).
  • Images: 4 MB by default (attachment_fetch_max_bytes), because an image is copied into the conversation before the model reads it.
Above the limit, the attachment is refused and the agent should share the file’s SharePoint link (webUrl, from items get) instead. A folder cannot be attached.For a complete agent built on these reading paths, with the canvas for producing files, follow the Office 365 agent tutorial.

lists

permissions

workbook

Read & write the cells of an Excel .xlsx file natively via the Microsoft Graph Excel API: no download, no OCR.
addWorksheet, createTable and executeFunction evaluate / mutate the workbook server-side. executeFunction returns { value }, the evaluated result of the Excel function.

documents

Read the content of a Word .docx file natively: the file is downloaded and its OOXML parsed in-process (no external extraction service, no OCR).

dataset

Query a large CSV file without loading it into the conversation: ingest it once, then query or aggregate the returned datasetId as often as needed.
list returns the datasets you own with their source file (driveId, itemId, webUrl), so you can call ingest again to refresh one.

Security

The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on Connector security. This section lists what is specific to SharePoint. With the read-only scopes, Microsoft refuses every folder creation, rename, move, copy, delete, sharing link, list item change and Excel cell write. Sites.Read.All and Files.Read.All still reach every site and file the user can open: no scope limits them to chosen sites. To do that, declare the authorized sites (see Restricting the connector to chosen sites). In clientCredentials mode, the application permissions apply to every site of the tenant, whoever calls the agent.

Error Handling

Common Issues

“This agent is not authorized to use this connector”: The calling agent is not in the allowlist. Open the configuration app, then the Agents tab, and tick this agent under Authorized agents (or enable Allow all agents) and Save. “The calling agent could not be identified”: The MCP capability Scope does not declare agent_id, so Agent Creator never injects the agent identity. Set the Scope to context_id,agent_id,user_id on the capability, then allow the agent in the config app. “Microsoft Graph is not connected for this user”: No per-user OAuth token. Open the configuration app (OAuth mode) and click Connect, or use the agent’s connect flow. Every new connection fails after a scope was added
  • Symptom: the connection window shows “Connection failed” with AADSTS65001 or AADSTS90094 (consent missing), or AADSTS650053 (scope unknown to the application), and names the scope when Microsoft does.
  • Cause: a scope of the Scopes field has no consent on the Entra application, and your tenant does not let users consent themselves; or the scope is misspelled or not declared on the application.
  • Who fixes it: a Microsoft 365 administrator (consent), or the workspace administrator (the Scopes field).
  • Resolution: have the scope consented on the Entra application in Microsoft Entra, or remove it from the Scopes field and click Save authentication.
  • Verify: reconnect, then make sure the scope no longer appears under Requested but not granted in the configuration app.
“Microsoft Graph token refresh failed … must reconnect”: The stored refresh token was revoked or expired (Microsoft Entra invalidated it, or it aged past its limit). The connection is dropped automatically; the user must reconnect from the config app. “Microsoft 365 connection was replaced while this token was being renewed. Retry — no reconnection needed.”: The user connected again while a request still held the previous token, and Microsoft Entra refused that previous token. The newer connection is kept, so nothing needs fixing: retry the request, it runs on the new connection. “Microsoft Graph not authenticated” / “OAuth is not configured”: Neither a tenant OAuth client nor the central platform client is available. Set the client ID/secret/tenant in the config app, or ask the platform maintainer to provision the central Entra OAuth client. client_credentials exchange failed: In application mode, check the Application (client) ID / secret, the tenant id, and that a Global Administrator granted admin consent for the application Graph permissions. “Site not found”: The site id format is hostname,siteCollectionId,siteId. Use sites search (or Graph Explorer) to find the correct id. Microsoft Entra redirect URI rejected: Entra rejects a colon in the redirect URI path. Register the redirect URI with the workspace’s raw id, not the slug: form: /workspaces/<core-workspace-id>/webhooks/oauthCallback for the platform client, /workspaces/<your-workspace-id>/webhooks/<app-instance>.oauthCallback for your own Entra app. Copy the exact value from the config app.

External Resources

Microsoft Graph API

Official reference for the SharePoint sites, drives, files, lists and permissions REST APIs.

Tool Agents

Learn how Agent Creator agents consume MCP tools in Prisme.ai.