Create a Copilot agent for SharePoint from approved site content

Tested with Microsoft 365 Copilot Agent Builder.

Building a Copilot agent for SharePoint is useful when a team keeps policies, project handbooks, templates, or operating procedures in one approved SharePoint location. Instead of asking users to search several libraries and interpret outdated copies, you give them a focused agent that answers from the sources you choose.

The safest approach is to build the agent around a narrow job. A good SharePoint agent is not a general company search box. It should answer a repeatable set of questions, point users toward the right document, and stay inside the permissions and sensitivity rules that already protect the files.

Prepare the SharePoint content first

Start in SharePoint, not in Copilot. The quality of the agent depends on the quality, scope, and permissions of the content you attach to it.

Pick one clear source area

Choose the site, folder, or file set that represents the approved answer. For example, a HR agent might use the current benefits folder and the leave policy library, while a project agent might use the latest scope document, RAID log, and delivery checklist.

Avoid mixing draft notes, archived procedures, and old exports with current content. If users already struggle to know which document is official, the agent will inherit that confusion. Clean the source first, then attach it.

Check permissions and labels

Copilot agents respect existing SharePoint and OneDrive permissions for files that are already stored there. That means the same agent can give different answers to different users if their access differs.

Before you build, confirm that the intended audience can read the exact files or folders the agent should use. Also check sensitivity labels and sharing restrictions. If a file cannot be used or shared because of a label or permission setting, fix that in SharePoint before you troubleshoot the agent.

Build the agent in Microsoft 365 Copilot

Open Microsoft 365 Copilot and select New agent. You can describe the agent in natural language, skip to the configuration screen, or start from a template. For most SharePoint use cases, the natural-language path is faster because it drafts the name, description, instructions, knowledge, and starter prompts for you.

Draft a specific agent brief

Give Agent Builder a short, direct brief. A vague prompt such as “help with SharePoint files” usually creates a weak agent. A better brief names the audience, the task, the source boundary, and the expected answer style.

Use a prompt like this:

  1. Create an agent for project managers who need answers from the PMO delivery handbook.
  2. Use the SharePoint PMO handbook folder as the primary knowledge source.
  3. Answer with short steps, name the source document when possible, and say when the handbook does not cover the question.
  4. Do not answer from general web knowledge when the SharePoint source is missing.

If you are also building agents for Teams, Outlook, or cross-app workflows, keep this SharePoint version narrower than the broader Microsoft 365 agent workflow so users know when to choose it.

SharePoint Copilot agent knowledge workflow
Use a narrow SharePoint source, clear instructions, and permission-aware test prompts before sharing the agent.

Review the Configure tab

After Agent Builder drafts the agent, open the Configure tab. Check the name, description, instructions, knowledge sources, starter prompts, and response mode. The description should be short enough for users to understand why the agent exists. The instructions should tell the agent what to do when the answer is missing from SharePoint.

Keep starter prompts practical. Good examples include “Which approval form should I use for a vendor request?” or “Summarize the onboarding checklist for a new project manager.” Avoid generic prompts that could belong to any Copilot chat.

Add SharePoint knowledge carefully

In the Knowledge section, add the SharePoint source by browsing for cloud files and folders, or by entering a SharePoint URL. If you paste a URL, use a clean site, folder, or file link. Remove tracking parameters and avoid overly broad paths when a smaller folder is enough.

Microsoft supports SharePoint sites, folders, and files as knowledge sources. The practical question is not only “can I add this?” but “should this agent answer from everything under this source?” If a folder contains mixed audiences, confidential drafts, or many old versions, create a cleaner source folder first.

Source choiceBest useWatch out for
Specific filesSmall policy or template agentsNeeds maintenance when files are replaced
FolderDepartment or project playbooksOld drafts can pollute answers
SiteBroad team knowledgePermissions and scope need extra review

Give newly uploaded or recently changed files a few minutes before judging the agent. SharePoint and Copilot may need time before new content is reflected in answers. If the file still appears unavailable, refresh the knowledge source and test again.

Test the SharePoint agent before sharing

Use the Try it tab while you are still editing. Test with real questions from the people who will use the agent, not only with questions you already know it can answer.

Run four kinds of checks:

  • Source check: ask for an answer that should exist in the SharePoint content.
  • Boundary check: ask a related question that is not covered by the source.
  • Permission check: test with another user or a pilot group when access differs.
  • Freshness check: ask about a recently changed document after the source is ready.

For file-heavy work, compare the behavior with a file-scoped agent example so you can decide whether the knowledge should live in SharePoint, OneDrive, or a smaller set of selected files.

If the agent invents policy language or gives answers from outside the approved source, tighten the instructions. Tell it to answer only from the SharePoint knowledge source and to say when the source does not include the requested detail.

Share and maintain the agent

When testing is complete, create the agent and keep it private until you know who should use it. You can share it with specific users, groups, teams, or, if your tenant allows it, anyone in the organization.

Sharing the agent is not the same as granting full site access. SharePoint file and folder permissions still matter. If users cannot read the knowledge source, the agent will not include that content in their answers. In some cases the agent owner or a SharePoint site admin must grant file or folder permissions directly.

If you update a shared agent later, review both the instructions and the SharePoint sharing state. A change to the source folder, a replaced file, or a new sensitivity label can change what users receive.

Questions you might have

Can I point the agent at a whole SharePoint site?

Yes, but use a whole site only when the site is clean, current, and meant for the same audience. A folder or selected file set usually gives tighter answers. Broad sites are more likely to include obsolete files, mixed permissions, or content that belongs to another team.

Why do other users get weaker answers than I do?

They may not have access to the same SharePoint files. The agent respects each user’s existing privileges, so your test as the owner may look better than a normal user’s experience. Pilot the agent with a user who has typical permissions before you share it widely.

Should I use Copilot Studio instead?

Use Agent Builder when you need a fast Microsoft 365 Copilot agent for a focused internal workflow. Use Copilot Studio when the agent needs broader deployment, more channels, advanced actions, or a fuller lifecycle with admin review and publishing controls.

What happens when a SharePoint file changes?

The agent can pick up changes from the underlying SharePoint or OneDrive file, but new or changed content can take a few minutes to become ready. If the answer still looks stale, refresh the knowledge source, confirm the file is supported, and test again with a direct question about the changed section.

Before you move on

Build the agent only after the SharePoint source is narrow, current, and permission-ready. Then use Agent Builder to create the draft, attach the right knowledge, test boundary questions, and share only with the audience that should use it. That sequence gives users a practical SharePoint assistant without turning Copilot into an uncontrolled search surface.