LoopAI-103

Test and iterate your integrated agent

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

Go deeper

Unlocks when you've watched the lesson.

0 of 1 watched · about 2 min
Read this lesson

From the bench to the wall

A clock can keep perfect time on the workbench and still run slow once it hangs on the wall. The Foundry playground is your workbench: great while you build, but it isn't the full published experience. After publishing, test in Teams itself. Check that answers display properly, sign-in works, replies come back fast enough, and the agent's own identity has the permissions its tools need. Then invite colleagues to try it, because they word questions differently and spot confusing answers you'd miss. And try the desktop, web, and mobile Teams apps, since some problems only show up on one of them.

Four common faults

Four faults turn up again and again. First, the agent doesn't answer in Teams at all. Check that the Azure Bot Service resource exists and read its logs, then confirm the agent was published, or the package uploaded, properly. Second, tools work in Foundry but fail in Teams. That's almost always permissions: find the agent's identity in Foundry and give it roles on the resources its tools use. Third, people can't find the agent. Maybe the scope is wrong, an admin hasn't approved it yet, or your tenant blocks custom apps. For Just you, share the link; for your organization, check the admin center. The store can also take about an hour to refresh. Fourth, it's slow. Simplify long instructions, tune tools that search huge data sets, and test from another network to rule out the connection.

Known limits and stuck chats

Published agents have a few limits to know about. They don't stream their replies or show citations. In Microsoft 365 Copilot, file uploads and image generation don't work, though they do in Teams. If a chat gets stuck after a tool error, start a new conversation. In Teams, send slash foundry underscore new underscore preview to reset it. And if an MCP tool is waiting for approval, approve it in the chat, or start a fresh conversation if the card has gone.

Keep watching, keep improving

Once it's running, keep an eye on it. The Foundry portal shows request volume, response times, error rates, and how often each tool is called. If you've connected Application Insights, you can trace single conversations, spot error patterns, measure end to end delays, and set alerts. Give users an easy way to report problems too, like a Teams channel or an email address. Read it regularly and fix the biggest issues first. To ship a fix, update the agent in Foundry and test it, and the version selector sends the new version to Teams through the same endpoint. Keep a testing checklist for your agent, and run it before every release.

Facts from Microsoft's documentation: Publish agents to Microsoft 365 and Teams by using the REST API (troubleshooting); Publish agents to Microsoft Copilot and Microsoft Teams (CC BY 4.0), rewritten in Loop's own words and examples. Narration, animation, and quiz by Loop. Microsoft, Azure, and Microsoft Foundry are trademarks of Microsoft. Loop is independent and not affiliated with or endorsed by Microsoft.