agent
3 TopicsUnable to get Foundry & storage account working inside private networking
I asked my agent to summarize the issue so you can find more detailed info below. The core issue is that when deploying a standard foundry setup protected by a vnet and private endpoint, as well as a storage account with private endpoint on the same vnet, then, when creating a basic agent inside foundry and enabling toolbox and adding file_search tool, the upload files due to storage account permission error. This is despite foundry account and project having storage blob contributor permission. When you try to do the same action but add the storage account and foundry to a network security perimeter with subscription scope, then the file_search works. When you try to do the same action but enable "trust microsoft services" on the storage account settings then it works. But pure private endpoint only fails. See below for more detailed info: Microsoft Foundry File Search upload fails with Blob CreateContainer 403 in Standard private deployment Environment Sweden Central, subscription XXXX, resource group azure-foundry-init. Foundry account ai-foundry-r3-vebezr6ujx33q and project foundry-project-r3 Bring-your-own storage account stfoundryr3vebezr6ujx33q, with public network access and Shared Key access disabled Approved Blob private endpoint pe-foundry-r3-storage at xx.xx.xx.xx. The storage hostname resolves to that private IP from the test VNet. Account and project Agents capability hosts both show Succeeded. The project host references the customer-owned Storage, Cosmos DB, and Azure AI Search connections. Reproduction and impact Uploading a small text file through Tools → File search → Upload files in the Foundry portal from a VM on the private VNet fails before indexing. The API upload also fails. Azure ML Asset Store returns HTTP 403 on POST swedencentral.api.azureml.ms/assetstore/v1.0/temporaryDataReference/createOrGet, with UserError/Auth/Authorization/ResourceMsiTokenDoesntHavePermissionsOnStorage. This blocks File Search ingestion. Private model inference and conversation persistence pass. Diagnostic evidence Reproduction Azure evidence Controlled upload on November 26, 2026 at 21:51:58.9056074 UTC StorageBlobLogs recorded CreateContainer, HTTP 403, AuthorizationFailure, with OAuth and requester object ID 68473b4a-7fcf-4699-8dce-58bcfeb849e5. Caller IP was xx.xx.xx, outside the workload VNet. TrafficClassification was empty, so the record does not establish which endpoint the call used. Portal upload on November 26, 2026 at 23:51:49.4378289 UTC Asset Store returned the same MSI authorization error. Azure Storage metrics recorded one OAuth CreateContainer authorization error in the 23:52:00 UTC bucket. The request-level Blob record above is from the earlier controlled upload. The Blob requester object ID matches the project’s system-assigned managed identity. That identity has a direct, unconditional Storage Blob Data Contributor assignment at the storage-account scope. Granting the same role to the Foundry account’s managed identity and retesting produced the same error. Correlation ID Value Controlled upload – Foundry APIM request 6b4092be-3515-41c8-8da8-7ff773b7078f Controlled upload – Blob correlation ID 7d81096e-401e-007c-69f0-7d0335000000 Controlled upload – Blob client request ID 4e2ff3dd-34d1-4267-b3b7-08e86cbb20c3 Portal upload – Azure ML operation ff0976985cbc9d74c4cc070e2ede20df Portal upload – Asset Store request effd891ec11432ab Portal upload – Dataset request f12c9f6885e4bf02 Retest after account identity grant – Foundry APIM request ed8cc668-4479-4fe2-af18-e278de60b1d8 Requested resolution Please trace the Asset Store CreateContainer request to determine which Blob endpoint and network path it used, what caused Storage to deny the request, and why Asset Store reported insufficient MSI permissions despite the verified role assignment. If the Microsoft-managed Asset Store path is misconfigured, please repair or reprovision its private connectivity. If a customer-side change is required, please provide the supported private-only configuration. Success is a File Search upload that completes indexing while retaining the existing private endpoints, Foundry VNet injection, and Entra authentication, with storage public network access and Shared Key access disabled.Published 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.Solved2.7KViews1like5CommentsUnable to publish Foundry agent to M365 copilot or Teams
I’m encountering an issue while publishing an agent in Microsoft Foundry to M365 Copilot or Teams. After creating the agent and Foundry resource, the process automatically created a Bot Service resource. However, I noticed that this resource has the same ID as the Application ID shown in the configuration. Is this expected behavior? If not, how should I resolve it? I followed the steps in the official documentation: https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/publish-copilot?view=foundry Despite this, I keep getting the following error: There was a problem submitting the agent. Response status code does not indicate success: 401 (Unauthorized). Status Code: 401 Any guidance on what might be causing this and how to fix it would be greatly appreciated.Solved1.4KViews0likes3Comments