← All articlesMicrosoft 365

Extend Microsoft 365 Copilot with Declarative Agents and Graph Connectors

Ishfaq Nazir · Microsoft & Azure Cloud Security Architect 10/14/2026 12 min read

What is a declarative agent?

A declarative agent is a customized version of Microsoft 365 Copilot. It uses the same model, security and user permissions, but you "declare" its instructions, knowledge and actions. Users find it inside Copilot Chat, Teams, Word and other Microsoft 365 apps.

Because it runs on Microsoft 365 Copilot, you get enterprise data protection, Purview controls and audit out of the box.

Example scenarios

  • Brand & Marketing Guidelines agent — answers "Which logo do I use on dark backgrounds?" from the brand site.
  • Sales Proposal agent — finds past proposals and case studies in SharePoint and drafts new ones.
  • Engineering Standards agent — answers architecture questions from the wiki and a Graph connector to Azure DevOps.
  • Project Status agent — calls a project API to report the status of any project in Teams.

Three ways to build

  1. Agent Builder in Microsoft 365 Copilot — no code, any user (if allowed by admin).
  2. Copilot Studio — low code, adds actions, connectors and topics.
  3. Microsoft 365 Agents Toolkit in Visual Studio Code — pro code, full control with manifests and API plugins.

Option 1 — Agent Builder (10 minutes)

  1. Open Microsoft 365 Copilot Chat and select Create agent.
  2. Describe the agent: "Help employees follow Contoso brand guidelines."
  3. On the Configure tab, add the SharePoint brand site as knowledge.
  4. Add conversation starters such as "Which fonts can I use?"
  5. Test in the side pane and share with a security group.

This is perfect for pilots and departmental helpers.

Option 2 — Pro-code with Microsoft 365 Agents Toolkit

  1. Install Visual Studio Code and the Microsoft 365 Agents Toolkit extension.
  2. Create a new app: Declarative Agent, with or without an action.
  3. Edit declarativeAgent.json:
{
  "version": "v1.4",
  "name": "Engineering Standards",
  "description": "Answers questions about Contoso engineering standards and architecture decisions.",
  "instructions": "$[file('instruction.txt')]",
  "conversation_starters": [
    { "text": "What is our standard for API versioning?" },
    { "text": "Which Azure regions are approved for production?" }
  ],
  "capabilities": [
    { "name": "OneDriveAndSharePoint",
      "items_by_url": [{ "url": "https://contoso.sharepoint.com/sites/engineering" }] },
    { "name": "GraphConnectors",
      "connections": [{ "connection_id": "azuredevopswiki" }] }
  ],
  "actions": [{ "id": "projectApi", "file": "ai-plugin.json" }]
}
  1. Write instruction.txt with the agent's role, tone, and rules (for example: "Cite the source page. If a standard is not documented, say so.").
  2. Select Provision to sideload into your tenant and test in Copilot.

Add an action with an API plugin

An API plugin lets the agent call your REST API. You supply an OpenAPI description and an ai-plugin.json that tells Copilot when to use each operation. Protect the API with Microsoft Entra ID (OAuth) so calls run with the user's identity.

Bring in business data with Graph connectors

Graph connectors index external content into Microsoft 365 so Copilot can reason over it with the same permissions:

  1. In the Microsoft 365 admin center, open Search & intelligence, Data sources.
  2. Choose a prebuilt connector (ServiceNow Knowledge, Confluence, Azure DevOps, Salesforce, file shares and more) or build a custom one with the Graph API.
  3. Map access control lists so users only see what they are allowed to see.
  4. Reference the connection in your agent's GraphConnectors capability.

Deploy and govern

  1. Upload the agent package through the Microsoft 365 admin center (Integrated apps / Agents).
  2. Assign it to specific users or groups first.
  3. Control who can create agents with Agent Builder in admin settings.
  4. Use Microsoft Purview to audit Copilot interactions and apply DLP for sensitive data.
  5. Review agent inventory regularly and retire unused agents.

Prerequisites and licensing

  • Microsoft 365 Copilot licences give full access to agents grounded in tenant data.
  • Users without a licence can use some agents through Copilot Chat with pay-as-you-go billing.
  • Graph connector content counts toward your tenant's index quota.

Rollout tips for new AI adopters

  • Start with one department agent with a clear owner.
  • Clean up oversharing before connecting knowledge.
  • Collect feedback with conversation starters that match real tasks.
  • Expand to API actions only after the knowledge-only version is trusted.

Learn more

  • Microsoft Learn: Declarative agents overview — https://learn.microsoft.com/microsoft-365-copilot/extensibility/overview-declarative-agent
  • Microsoft Learn: Graph connectors overview — https://learn.microsoft.com/graph/connecting-external-content-connectors-overview
#Microsoft 365 Copilot#AI Agents#Declarative Agents#Graph Connectors

Related articles