.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
.xlsx workbooks and Word .docx documents natively (cell values, full text)Lists, search & permissions
Flexible per-user auth
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 asearchSites 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
Knowledge base owner
Platform admin
Workspace builder
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(orSites.ReadWrite.Allfor create/update/move),Files.Read.All(orFiles.ReadWrite.All) - Directory (access-aware RAG):
User.Read,GroupMember.Read.All(optional) - Sign-in / identity:
openid,profile,offline_access
- Sites & files:
- To index documents protected by a Microsoft Purview sensitivity label with the connection owner’s rights, the delegated permission
user_impersonationon Azure Rights Management Services. See Rights-Protected Documents. - Optional (OAuth per-user modes):
InformationProtectionPolicy.Read(delegated), so that theitemssensitivityLabelsaction 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, underitems: 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.
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
.defaultoption (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.
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:
- On the app registration, grant the
Sites.Selectedapplication permission (withFiles.Read.AllorFiles.ReadWrite.Allif needed) and have an administrator grant admin consent. On its own,Sites.Selectedopens no site. - A Microsoft 365 administrator grants the application access site by site, with the
readorwriterole (Microsoft GraphPOST /sites/{site-id}/permissions, orGrant-PnPAzureADAppSitePermission). - 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.
- 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
readrefuses writes; a copy from it into awritesite is allowed. - Microsoft Search (
/search/query) and the user’s personal OneDrive are not available:Sites.Selecteddoes 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.
Platform admin (Governance): one-time platform setup
Platform admin (Governance): one-time platform setup
1. Configure the connector
Register the OAuth Application in Microsoft Entra ID
common / organizations for multi-tenant).Enter the credentials through the configuration app
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.Tell workspaces to use the central client
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.Open AI Governance > Capabilities
Point it at the MCP endpoint
agent_id in the scope is what lets the connector identify and authorize the calling agent.Make it available to agent builders
Smoke-test
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.- Agent builder (Agent Creator)
- Workspace builder (DSUL)
- Knowledge base (sync)
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.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.Open your agent in Agent Creator
Add the SharePoint capability
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.Connect a Microsoft account (OAuth modes)
connect_url. Application (clientCredentials) and accessToken modes need no per-user sign-in.Option B: Run it from your own workspace (recommended)
For production agents, install the connector in your own workspace and point the agent at that workspace’s MCP endpoint.Install and configure the connector in your workspace
Allowlist your agent
Add the MCP capability to your agent
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.Connect a Microsoft account (OAuth modes)
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:agent_id.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):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 anaction argument selecting the concrete operation, plus the per-action parameters.Output Formats
Every tool accepts anoutputFormat argument that controls the MCP response shape:verbose(default): a human-readable text view, optimized for LLM consumption.structured: concise machine-readable JSON instructuredContent.both: the structured payload, with its JSON also rendered as text.
Tool Details
sites
drives
items
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
ThesensitivityLabels 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 grantedInformationProtectionPolicy.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:- In Microsoft Entra, add the delegated Microsoft Graph permission
InformationProtectionPolicy.Readto 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. - 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.defaultoption, skip this step. - Each user reconnects their Microsoft account once.
- 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.Readno longer appears under Requested but not granted.
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.
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.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 declareagent_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
AADSTS65001orAADSTS90094(consent missing), orAADSTS650053(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.
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.