teams
3 TopicsFoundry Agent deployed to Copilot/Teams Can't Display Images Generated via Code Interpreter
Hello everyone, I’ve been developing an agent in the new Microsoft Foundry and enabled the Code Interpreter tool for it. In Agent Playground, I can successfully start a new chat and have the agent generate a chart/image using Code Interpreter. This works as expected in both the old and new Foundry experiences. However, after publishing the agent to Copilot/Teams for my organization, the same prompt that works in Agent Playground does not function properly. The agent appears to execute the code, but the image is not accessible in Teams. When reviewing the agent traces (via the Traces tab in Foundry), I can see that the agent generates a link to the image in the Code Interpreter sandbox environment, for example: `[Download the bar chart](sandbox:/mnt/data/bar_chart.png)` This works correctly within Foundry, but the sandbox path is not accessible from Teams, so the link fails there. Is there an officially supported way to surface Code Interpreter–generated files/images when the agent is deployed to Copilot/Teams, or is the recommended approach perhaps to implement a custom tool that uploads generated files to an external storage location (e.g., SharePoint, Blob Storage, or another file hosting service) and returns a publicly accessible link instead? I've been having trouble finding anything about this online. Any guidance would be greatly appreciated. Thank you!18Views0likes0CommentsPublished agent from Foundry doesn't work at all in Teams and M365
I've switched to the new version of Azure AI Foundry (New) and created a project there. Within this project, I created an Agent and connected two custom MCP servers to it. The agent works correctly inside Foundry Playground and responds to all test queries as expected. My goal was to make this agent available for my organization in Microsoft Teams / Microsoft 365 Copilot, so I followed all the steps described in the official Microsoft documentation: https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/publish-copilot?view=foundry Issue description The first problems started at Step 8 (Publishing the agent). Organization scope publishing I published the agent using Organization scope. The agent appeared in Microsoft Admin Center in the list of agents. However, when an administrator from my organization attempted to approve it, the approval always failed with a generic error: “Sorry, something went wrong” No diagnostic information, error codes, or logs were provided. We tried recreating and republishing the agent multiple times, but the result was always the same. Shared scope publishing As a workaround, I published the agent using Shared scope. In this case, the agent finally appeared in Microsoft Teams and Microsoft 365 Copilot. I can now see the agent here: Microsoft Teams → Copilot Microsoft Teams → Applications → Manage applications However, this revealed the main issue. Main problem The published agent cannot complete any query in Teams, despite the fact that: The agent works perfectly in Foundry Playground The agent responds correctly to the same prompts before publishing In Teams, every query results in messages such as: “Sorry, something went wrong. Try to complete a query later.” Simplification test To exclude MCP or instruction-related issues, I performed the following: Disabled all MCP tools Removed all complex instructions Left only a minimal system prompt: “When the user types 123, return 456” I then republished the agent. The agent appeared in Teams again, but the behavior did not change — it does not respond at all. Permissions warning in Teams When I go to: Teams → Applications → Manage Applications → My agent → View details I see a red warning label: “Permissions needed. Ask your IT admin to add InfoConnect Agent to this team/chat/meeting.” This message is confusing because: The administrator has already added all required permissions All relevant permissions were granted in Microsoft Entra ID Admin consent was provided Because of this warning, I also cannot properly share the agent with my colleagues. Additional observation I have a similar agent configured in Copilot Studio: It shows the same permissions warning However, that agent still responds correctly in Teams It can also successfully call some MCP tools This suggests that the issue is specific to Azure AI Foundry agents, not to Teams or tenant-wide permissions in general. Steps already taken to resolve the issue Configured all required RBAC roles in Azure Portal according to: https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/rbac-foundry?view=foundry-classic During publishing, an agent-bot application was automatically created. I added my account to this bot with the Azure AI User role I also assigned Azure AI User to: The project’s Managed Identity The project resource itself Verified all permissions related to AI agents publishing in: Microsoft Admin Center Microsoft Teams Admin Center Simplified and republished the agent multiple times Deleted the automatically created agent-bot and allowed Foundry to recreate it Created a new Foundry project, configured several simple agents, and published them — the same issue occurs Tried publishing with different models: gpt-4.1, o4-mini Manually configured permissions in: Microsoft Entra ID → App registrations / Enterprise applications → API permissions Added both Delegated and Application permissions and granted Admin consent Added myself and my colleagues as Azure AI User in: Foundry → Project → Project users Followed all steps mentioned in this related discussion: https://techcommunity.microsoft.com/discussions/azure-ai-foundry-discussions/unable-to-publish-foundry-agent-to-m365-copilot-or-teams/4481420 Questions How can I make a Foundry agent work correctly in Microsoft Teams? Why does the agent fail to process requests in Teams while working correctly in Foundry? What does the “Permissions needed” warning actually mean for Foundry agents? How can I properly share the agent with other users in my organization? Any guidance, diagnostics, or clarification on the correct publishing and permission model for Foundry agents in Teams would be greatly appreciated.SolvedMicrosoft Teams COVID-19 Response Bot
Microsoft Teams COVID-19 Response Bot Using an Information BOT to enable companies to build out a knowledge base and FAQ to interact and communicate to their employees. Target Audience: COVID-19 Company Response Teams Every group who is reacting to an unforeseen situation like: Communications, Help Desk, Human Resources, and Operations teams. Technical Requirements: Azure subscription; QnA Maker account; No experience with coding required. The Problem: Many companies have been struggling to provide communications and resources in an automated way. Microsoft Teams COVID-19 Response Bot adds value! In a pandemic situation, many companies that have not completed or started their digital transformation tend to struggle with high volume of inquiries being directed to their front line response teams. Azure Web Bot services can help reduce the overhead of the front-line response teams by inserting an automated layer and interactive for employees to engage your resources. We will show you below how to create a COVID-19 response bot and connect it to Microsoft Teams, a website (Intranet / Internet), and as an email responder in 12 easy steps that does not require any previous coding experience. Microsoft Teams: Employees want an interactive experience to communicate in a chat and ask questions about company resources and frequently asked questions. Intranet / Internet Communication: Employees are expecting crisis communication and interaction on the home page of the intranet to feel connected. Providing a real-time chat bot to allow employees to get company-specific information immediately. Bot used as an Email Responder: Companies can create a mailbox for crisis communication that provides valuable and relevant automated responses. Deploy Microsoft Teams COVID-19 Response Bot: Open Edge and navigate to https://qnamaker.ai on the top right corner click “Sign in” and sign in using your Microsoft Account. Once you have signed into your account, click on “Create a knowledge base” from the top menu. Once you clicked on Create a knowledge base, you will be required to create a QnA service in Microsoft Azure, click on the blue button that says “Create a QnA service". This will redirect you to your Azure portal and directly into Cognitive Services (QnA Maker). Fill the form and click on “Create” at the bottom: Once your deployment has been successfully implemented, go back to QnA Maker portal and click on “Refresh” and select the correct Azure QnA service from the drop downs. It is time to select a name for your Knowledge Base. Now it is time for us to populate the content for our bot, we will choose the URL for the FAQ the CDC has available (https://www.cdc.gov/coronavirus/2019-ncov/faq.html) and we will enable multi-turn, which will allow to present multiple potential matches for a single question, and for personality we will choose professional. Once you have the form filled, click on “Create your KB” this will take few minutes to parse all the questions on your FAQ URL or files (if you uploaded any). Once you are redirected to your knowledge base, click on “PUBLISH” to continue creating the bot A New page will be displayed, you will need to click on “Publish” at the bottom to be able to use this knowledge base to your bot in Azure. Once this task is completed, it will redirect you to the last page we need in QnAMaker.ai, which has a button to “Create bot”, this will redirect you to your Azure Portal again to create a bot. On the Web App Bot section of Azure, verify all the information has been filled and click “Create”, once the task is completed, your bot is live and ready to be used by deploying it on the channel of your preference (Teams, Email, Facebook, GroupMe, Kik, LINE, Skype, Slack, Telegram, Twilio, Cortana, Web Chat, and Direct Line). Deploying your bot on Microsoft Teams Go to your bot and click on "Channels". Click on the Microsoft Teams icon in the center of the page. Click Save and your bot will be ready to be used on Teams. Deploying your bot on a web site Go to your bot and click on "Channels". By default Web Chat is always enabled, click on "Edit" on the far right side. Copy the HTML code into the page you are going to implement the bot by clicking “Copy” in the “Embed code” section, and your bot will be available in the URL you pasted the code. Deploying your bot on an email: Go to your bot and click on "Channels". Click on "Email". Enter your Office 365 email credentials for the mailbox the bot is going to use and hit "Save", and your bot will be able to respond email messages that arrive to that specific mailbox. Bot Solutions Going Forward: HR Benefits, Help Desk, Office 365 Journey Advisor, Adoption Projects, Company branding materials, On-boarding mentor, and more. Contributors: Michelle Gilbert michellegilbert Daniel Lopez DanLopez5.6KViews3likes2Comments