July 25th, 2024

Bring your custom engine copilot from Azure OpenAI Studio to Microsoft Teams: now in public preview

Azure OpenAI announced many new capabilities for connecting to your data with Azure OpenAI at Microsoft Build 2024. Today, we are excited to announce that Azure OpenAI now offers a Deploy to a Teams app option in public preview, providing a new way to help developers connect their enterprise data with their custom engine copilots on Microsoft Teams. If you’ve been crafting your chat experience using Azure OpenAI Studio, you can now seamlessly bring your chat apps to Microsoft Teams.

If you’re eager to extend your chat experience from Azure OpenAI Studio to Teams, this option is perfect for you! This feature helps developers create a project source code with an integration of their configuration and data from Azure OpenAI Studio. You can connect your enterprise data from Azure AI Search, Azure Blob Storage, URL/web address, Azure Cosmos DB, Elasticsearch and ground your Azure OpenAI models on your data. This source code is powered by Teams AI library, which helps developers build conversational bots designed to harness the powerful capabilities of Large Language Models (LLMs) for seamless user interaction.

Ready to bring your chat app with your data from Azure OpenAI Studio to Teams? Let’s get started with just a few simple steps!

Start from Azure OpenAI Studio, chat on Teams

Here are the quick steps to craft your chat experience in Azure OpenAI Studio and seamlessly integrate it into Teams.

Pre-requisites

Configure your data in the chat playground

Before proceeding with the “Deploy to a Teams app” option, ensure that you have designed your chat experience on Azure OpenAI Studio.

  1. In Azure OpenAI Studio, navigate to Chat and Add your data, then Add a data source.
  2. Select Upload files (preview), and set up “Azure Blob storage” and “Azure AI Search” resources. Enter the index name of your choice, then select Next.

A screenshot of a computer Description automatically generated

  1. Drag and drop the files you prefer to use as your data in the chat app. Select Upload files, then Next.
  2. Keep the “Data management” configuration as default, select Next.
  3. Select the Azure resource authentication type of your choice in the “Data connection” step, select Next. Then, Save and close.

Once your data ingestion process is complete, test your setup in the playground by asking questions relevant to your data.

Bring your chat experience to Teams

  1. When ready, select Deploy to in the Chat playground and select A new Teams app (preview) option.

A screenshot of a computer Description automatically generated

2. Enter a name for your Teams app. Then, select Download.

A screenshot of a computer Description automatically generated

This will download a source code of your Teams app with integrated data.

Test your app on Teams

1. Unzip your downloaded project and open it in Visual Studio Code.

2. Explore the project source code, then select Teams Toolkit from the left side menu.

A screenshot of a computer Description automatically generated

3. If you select API Key in data connection, navigate to src\prompts\chat\config.json in your project folder and place the API inside the authentication.

4. Sign in with your Microsoft 365 account in Teams Toolkit, select local environment, then choose Debug (Edge) or Debug (Chrome).

A screenshot of a computer Description automatically generated

5. Once your Teams app is provisioned and deployed, Microsoft Teams will open in your browser with your app. Select Add to add your app to a Teams personal chat.

6. Enjoy chatting with your data on Teams by asking questions related to your data! 🎉

A screenshot of a computer Description automatically generated

Next Steps

If you are interested in diving deeper into the source code powered by Teams AI library and Teams Toolkit, check out the tutorial on building your custom copilot for Teams with your data from scratch: Tutorial – Build Custom Copilot – Teams | Microsoft Learn

We value your feedback! Please reach out to us if you have any questions or suggestions, we’d love to hear about your experience.

Happy coding! 🚀

Author

Ayca Bas
Senior Cloud Advocate
Joey Glocke
Principal PM Manager

2 comments

Discussion is closed. Login to edit/delete existing comments.

  • Anish Gurjar

    Hi Guys,

    I'm running into errors when deploying this. Works perfectly fine on my local environment. When I provision, deploy and publish, I always get the error: Bot encountered an error - check source code.

    I doubled checked that both my personal azure account and the app service identity has Cognitive Services OpenAI User Role as mentioned in the video and the Readme file.

    There is also no documentation on how I can log the...

    Read more
    • John MillerMicrosoft employee

      Hi Anish,

      The first thing you can try is viewing the Application Logs of the App Service that is hosting this. You can view that in the Azure Portal and watch application (console.log) messages stream in as you reproduce the error.

      If you continue to have issues, reach out via ttkfeedback at microsoft.com and I will connect with you to help further.