LoopAI-103

Exercise - Publish a Foundry agent to Teams

Unit 7 of 8 · Module 11: Integrate your agent with Microsoft 365

Before you start

Short explainers for ideas this lesson builds on. Watch these first if they're new to you.

0 of 1 watched · about 2 min
Read this lesson

The plan

In this lab, you'll give Wrenfield's staff a policy expert right inside Teams. You'll need an Azure subscription and a Microsoft 365 account with Teams, and publishing to Microsoft 365 Copilot also needs a Copilot license. It takes about forty minutes. There are two parts: first you build and ground the agent in the Foundry portal, then you publish it and test it in Teams.

Part 1: build and ground the agent

In the Foundry portal, create a project and an agent called enterprise knowledge agent. Give it instructions: it's Wrenfield's knowledge assistant, it answers from the uploaded policies and cites them, and when it doesn't know, it says so and suggests who to ask. Download two files, the IT security policy and the remote work policy, and attach them under Tools, Upload files. Then test it in the playground. Ask about the laptop password rules, the core hours for remote staff, and laptop encryption. Each answer should come from the right policy.

Part 2: publish and test in Teams

Now select Publish, then Teams and Microsoft Copilot. Fill in the name, Enterprise Knowledge Agent, a short and a full description, your name, and the placeholder links. Choose Direct publish with Just you, and publish. If you get a four hundred error, use Download and customize, and upload the zip in Teams instead. In Teams, find the agent under Your agents, say hello, and ask about the password rules and the MFA methods. If you have a Copilot license, find it in Microsoft 365 Copilot too. When you're done, delete the agent and uninstall the app from Teams.

The optional Work IQ lab

There's also an optional Work IQ lab for accounts with Microsoft 365 Copilot. Its Python app connects to the Work IQ MCP server, turns each Work IQ tool into a function tool for an agent, and runs a loop that answers the agent's tool calls. Practice both here first: the Portal exercise walks you through publishing, and the Coding exercise builds the Work IQ app against simulated workplace data.

Facts from Microsoft's documentation: Publish agents to Microsoft Copilot and Microsoft Teams; Microsoft Work IQ CLI (CC BY 4.0), rewritten in Loop's own words and examples. Narration, animation, and quiz by Loop. The coding lab is based on Microsoft's lab files for the agent exercises (MicrosoftLearning/mslearn-ai-agents, MIT License; notice). Microsoft, Azure, and Microsoft Foundry are trademarks of Microsoft. Loop is independent and not affiliated with or endorsed by Microsoft.