← Back to Blog

Copilot Studio + SharePoint: Build 3 AI Assistants

Build three AI assistants with Copilot Studio that answer questions directly from SharePoint document libraries. No coding required.

Copilot Studio + SharePoint: Build 3 AI Assistants



Why Copilot Studio for SharePoint?



Microsoft Copilot Studio is a low-code platform for building AI agents (chatbots) that connect to your organization’s data. When combined with SharePoint, these agents can:

  • Answer questions from documents stored in SharePoint libraries

  • Search across multiple sites to find policies, procedures, and knowledge base articles

  • Automate workflows by triggering Power Automate flows from a chat conversation

  • Serve employees directly inside SharePoint pages, Teams, or Microsoft 365 Copilot Chat


Unlike generic chatbots, Copilot Studio agents are grounded in your data — they pull answers from your actual SharePoint content, not from the public internet.

What changed in 2026?

FeatureAvailability

|---------|-------------|
Copilot Studio agent deployment to SharePointGA (May 2025)

Grounding on SharePoint lists in Copilot ChatMarch 2026

AI-assisted content creation in SharePointPreview (March 2026)

Custom actions with Power AutomateGA

Multi-site knowledge groundingGA


This guide walks you through building 3 progressively complex agents:

  • FAQ Bot — Answers employee questions from a SharePoint document library

  • Document Search Assistant — Searches across multiple SharePoint sites

  • Workflow Bot — Performs actions (submitting requests, creating items) via Power Automate


Prerequisites



  • Microsoft 365 license with Copilot Studio access (E3/E5 or standalone license)

  • SharePoint Online with at least one site containing documents

  • Power Automate access (for the workflow bot)

  • Admin or site owner permissions on the SharePoint sites you want to connect


Agent 1: FAQ Bot



The simplest agent — it answers employee questions using documents from a single SharePoint site.

Step 1: Create a New Agent




  • Click Create in the left navigation

  • Select New agent

  • Give it a name: "HR Policy Assistant"

  • Add a description: "Answers questions about company HR policies, benefits, and procedures"

  • Click Create


Step 2: Add SharePoint as a Knowledge Source



  • In your agent, go to the Knowledge tab

  • Click + Add knowledge

  • Select SharePoint

  • Paste the URL of your SharePoint site (e.g., https://contoso.sharepoint.com/sites/HR)

  • You can add specific document libraries or folders for more focused results

  • Click Add


The agent will now index the documents in that SharePoint location. It uses Azure AI Search under the hood to understand document content and return relevant answers.

Step 3: Configure the System Prompt



The system prompt controls how the agent behaves. Click Settings and edit the prompt:

You are an HR Policy Assistant for Contoso.
Answer questions using ONLY the documents provided
in your knowledge sources.
If you cannot find the answer, say: "I could not
find this in our HR policies. Please contact
hr@contoso.com for assistance."
Always cite the document name where you found
the answer.
Keep answers concise - 2-3 paragraphs maximum.

Step 4: Test the Agent



  • Click Test your agent in the top right

  • Ask a question like: "What is our parental leave policy?"

  • The agent should respond with information from your SharePoint documents

  • Verify it cites the correct source document


Step 5: Deploy to SharePoint



  • Go to Channels in the left navigation

  • Click SharePoint

  • Select the SharePoint site where you want the agent to appear

  • Choose the page or create a new one

  • The agent will appear as a chat widget on that page


Result: Employees can now ask HR questions directly from a SharePoint page and get answers grounded in your actual policy documents.

Agent 2: Document Search Assistant



This agent searches across multiple SharePoint sites — useful for organizations with department-specific sites (HR, IT, Legal, Finance).

Add Multiple Knowledge Sources



In the Knowledge tab, add multiple SharePoint sources:

Knowledge SourceSharePoint URLPurpose

|-----------------|----------------|---------|
HR Policies/sites/HRBenefits, leave, onboarding

IT Knowledge Base/sites/ITSupportTroubleshooting, access requests

Legal Compliance/sites/LegalContracts, compliance docs

Finance Procedures/sites/FinanceExpense reports, budgets


Configure Search Behavior



Update the system prompt to handle multi-site searches:

You are a company knowledge assistant for Contoso.
You have access to documents from HR, IT, Legal,
and Finance departments.
When answering questions:
1. Search across all available knowledge sources
2. Always state which department the information
comes from
3. If multiple departments have relevant info,
include all perspectives
4. Cite the specific document and department

Add Topic-Based Routing



For better accuracy, create topics that route questions to the right knowledge source:

  • Go to the Topics tab

  • Click + Add a topic

  • Create topics like:

- "IT Support" — triggered by phrases like "password reset", "VPN", "laptop"
- "HR Questions" — triggered by "leave", "benefits", "salary"
- "Legal Review" — triggered by "contract", "NDA", "compliance"

Each topic can have its own response instructions that prioritize the most relevant knowledge source.

Enable Authentication



For sensitive documents, enable user authentication:

  • Go to Settings then Security

  • Select Authenticate with Microsoft

  • Enable "Require users to sign in"

  • The agent will now respect SharePoint permissions — users only see documents they have access to


Important: Always enable authentication when the agent has access to confidential documents. This ensures SharePoint permission boundaries are respected.


Agent 3: Workflow Bot with Custom Actions



This is the most powerful agent — it not only answers questions but performs actions by triggering Power Automate flows.

Use Case: IT Service Desk Bot



The bot can:
  • Answer IT questions from the knowledge base

  • Submit support tickets to a SharePoint list

  • Check the status of existing tickets

  • Reset user permissions (via Power Automate)


Step 1: Create the Power Automate Flow



First, create a flow that the agent can call. This example creates a support ticket in a SharePoint list:


  • Create a new Instant cloud flow

  • Choose the trigger: Run a flow from Copilot

  • Add inputs:

- Title (text) — The ticket subject
- Description (text) — Detailed description
- Priority (text) — Low, Medium, High
- UserEmail (text) — The requester email

  • Add a SharePoint action: Create item

- Site: https://contoso.sharepoint.com/sites/ITSupport
- List: Support Tickets
- Map the inputs to the list columns

  • Add a response: Respond to Copilot

- Return the ticket ID and confirmation message

  • Save and test the flow


For more Power Automate patterns, see my SharePoint document workflows guide.

Step 2: Add the Action to Your Agent



  • In Copilot Studio, go to your agent

  • Click Actions in the left navigation

  • Click + Add an action

  • Select Power Automate flow

  • Find and select your "Create Support Ticket" flow

  • Map the flow inputs to agent variables


Step 3: Create a Topic for Ticket Submission



Create a topic that guides users through submitting a ticket:

  • Go to the Topics tab

  • Create a new topic: "Submit IT Ticket"

  • Add trigger phrases: "I need help", "submit a ticket", "IT support request"

  • Build the conversation flow:

- Ask: "What is the issue?" (save to variable Title)
- Ask: "Please describe the problem in detail" (save to variable Description)
- Ask: "What priority? Low, Medium, or High?" (save to variable Priority)
- Call the Power Automate action with the collected variables
- Display the confirmation: "Your ticket #[TicketID] has been submitted"

Step 4: Add a Status Check Action



Create a second flow that retrieves ticket status:

  • Create a Power Automate flow with trigger Run a flow from Copilot

  • Input: TicketID (text)

  • Action: SharePoint Get items with a filter (ID eq TicketID)

  • Response: Return the ticket status, assigned agent, and last update


Add this as another action in your agent with the topic "Check Ticket Status".

Deployment Options



Deploy to SharePoint Pages



  • Go to Channels then SharePoint

  • Select the target site

  • The agent appears as a chat interface on the page

  • Users interact with it directly in SharePoint


Deploy to Microsoft Teams



  • Go to Channels then Microsoft Teams

  • Click Turn on Teams

  • The agent becomes available as a Teams app

  • Users can chat with it in Teams just like messaging a colleague


Deploy to Microsoft 365 Copilot Chat



  • Go to Channels then Microsoft 365 Copilot

  • Publish the agent to the M365 App Store

  • Users can invoke it from Copilot Chat with @AgentName


Audience Targeting



Control who can access your agent:

ScopeHow to Set

|-------|-----------|
Everyone in the organizationDefault setting

Specific security groupsSettings then Security then User access

Specific SharePoint sites onlyDeploy to selected sites only


Best Practices



PracticeWhy

|----------|-----|
Use specific knowledge sources over entire sitesNarrower scope = more accurate answers

Always enable authentication for confidential docsRespects SharePoint permission boundaries

Create topic-based routing for multi-department agentsImproves answer relevance

Set fallback responses for unknown questionsPrevents hallucination

Test with real user questions before deployingCatches edge cases early

Monitor analytics in Copilot Studio dashboardIdentify gaps in knowledge coverage


Common Issues



IssueCauseFix

|-------|-------|-----|
Agent returns "I do not know" for documented topicsDocument not indexedRe-add the knowledge source and wait for indexing

Agent gives wrong answersToo broad knowledge scopeNarrow the knowledge source to specific libraries

Users cannot access the agentAuthentication not configuredEnable Microsoft authentication in Settings

Power Automate action failsFlow not shared with agent serviceShare the flow with the Copilot Studio service account

Agent does not appear on SharePoint pageDeployment not completedCheck the Channels tab and complete the SharePoint deployment

Slow responsesLarge document librariesUse specific folders instead of entire sites


Frequently Asked Questions



Q: Does Copilot Studio require a separate license?

Copilot Studio is included with Microsoft 365 E3/E5 licenses for basic scenarios. For advanced features (custom actions, extended message capacity), you may need a standalone Copilot Studio license. Check the Microsoft 365 licensing page for current details.

Q: Can the agent access on-premises SharePoint?

No. Copilot Studio agents only connect to SharePoint Online in Microsoft 365. For on-premises data, you would need to sync it to SharePoint Online first or use a custom connector.

Q: How does the agent handle document permissions?

When authentication is enabled, the agent respects SharePoint permissions. A user can only get answers from documents they have access to. This ensures your security model stays intact.

Q: Can I use custom instructions to limit the agent scope?

Yes. Use the system prompt to restrict what the agent discusses. For example: "Only answer questions about IT support topics. For HR questions, direct users to the HR portal." This prevents scope creep even if the knowledge sources contain broader content.

Q: How many SharePoint sites can I connect?

There is no hard limit on knowledge sources, but Microsoft recommends keeping the total under 10 for optimal indexing performance. For very large organizations, consider creating separate agents per department.

What to Build Next



You have seen how to build 3 types of agents — from a simple FAQ bot to a workflow-powered service desk. The same patterns work for any scenario:

  • Onboarding assistant that guides new hires through company policies

  • Project manager bot that searches project documentation and updates task lists

  • Compliance checker that answers regulatory questions from your legal library


For more Microsoft 365 development, check out my guides on building SPFx web parts, Microsoft Graph API examples, and Power Automate workflows. To extend your agents to Viva Connections dashboards, see my Adaptive Card Extensions guide.

Before deploying to production, review the Enterprise Governance Checklist for SharePoint and AI to ensure your AI assistants meet compliance requirements and follow best practices for data classification and access control.

Free Developer Tool

M365 Architecture Canvas

Design SharePoint, Teams, and Power Platform architectures visually. Export a structured Markdown document ready for proposals or GitHub.

Try It Free →