DEV Community

Cover image for Building Custom Extensions for Microsoft 365 Copilot with Teams Toolkit
Syed Kamran
Syed Kamran

Posted on

Building Custom Extensions for Microsoft 365 Copilot with Teams Toolkit

If you're curious about how to make Microsoft 365 Copilot do more for your team, you're not alone. Copilot is already great at helping people in Word, Excel, and Outlook, but what if it could pull in data from your internal systems or handle tasks that are unique to your business?

That’s where custom extensions come in. And the good news is — you don’t need to start from scratch. Microsoft has made it pretty simple with the Teams Toolkit in Visual Studio Code.

In this guide, I’ll walk you through how to build a basic extension for Copilot, using tools you might already be familiar with. Think of it like giving Copilot a few extra skills, tailored to your team's needs.

First things first — what you need

Before you begin, make sure you have these set up:

  • Visual Studio Code
  • The Teams Toolkit extension (you can get it from the Extensions tab in VS Code)
  • Node.js (version 16 or 18)
  • A Microsoft 365 developer account with Copilot access

Once that’s done, open VS Code and install the Teams Toolkit. You’ll see a new sidebar pop up, and from there, you can start creating your custom extension.

Create your Copilot extension

Click “Create New App” in the Teams Toolkit sidebar. When it asks what kind of app you want to make, go with “Copilot Agent” and then pick “Declarative Agent”. This is the simpler path because it doesn’t require a lot of backend code.

You’ll then name your project and describe what the extension is supposed to do. For example, maybe you want Copilot to answer questions about internal support tickets or pull in real-time data from your ERP.

If your extension needs access to company systems, you’ll also need to share an OpenAPI spec so Copilot understands what it can talk to and how.

Try it out locally

After setting things up, you can run the project right in VS Code and test how Copilot responds. The toolkit helps you simulate questions, and you can see what kinds of answers Copilot gives based on your instructions.

This is the part where you can tweak things, adjust how it behaves, and make sure it gives the right answers before letting your team use it.

Make it available for your team

Once it’s working the way you want, the next step is to deploy it to your Microsoft 365 environment. This makes your Copilot extension usable for others in your company.

You might need admin permissions for this part, so make sure you're able to publish apps or reach out to someone who can help with that.

Why it’s worth your time

Building a custom Copilot extension might sound like a big task, but with the Teams Toolkit, it’s much easier than you'd expect. You’re basically teaching Copilot how to speak your company’s language and work with your data.

If your team is constantly switching between systems, digging through spreadsheets, or asking the same questions over and over, this kind of extension can save a lot of time.

If you’re exploring Dynamics 365 or want to see how Copilot can fit into your workflows, happy to chat.

Top comments (0)