Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
Hi Nimesh,
Thanks for sharing the details and screenshots, the behavior you’re seeing is a known pattern when a Foundry agent is accessed through different channels like Playground, Copilot, and a standalone Teams app.
What’s happening here is that your agent is behaving correctly, but the retrieval step (RAG over Azure AI Search) is not consistently executing in the Teams custom app channel. Because you’ve configured the agent to answer strictly from internal knowledge bases, any retrieval failure results in “no data found,” even though the same prompt works elsewhere.
In Playground and Bot Service web chat, the agent runs in a context where the connection to Azure AI Search is fully preserved. In Copilot, Microsoft’s orchestration layer also ensures grounding works reliably. However, when you publish as a Teams custom app, the request flows through the Teams/Bot Framework channel, which can introduce differences in identity, permissions, and network access. If that channel cannot successfully query your Azure AI Search index, the agent receives no documents and returns an empty answer.
The most common cause is that the identity used by the Teams channel (managed identity or service principal associated with your Bot/agent) does not have sufficient permissions on the Azure AI Search service. I recommend going to your Azure AI Search resource in the Azure portal, opening Access Control (IAM), and assigning the appropriate role (for example, Cognitive Search Data Reader) to the identity used by your Bot/Teams integration. Once this access is in place, the agent should be able to retrieve documents consistently.
It’s also important to check networking. If your Azure AI Search service is secured with a private endpoint or restricted network access, the Teams channel may not be able to reach it unless the network path is explicitly allowed. In such cases, ensure that your configuration supports access from the channel (or consider testing temporarily with public access enabled to validate the root cause).
As a quick validation step, you can temporarily relax the “answer only from internal knowledge” restriction. If the agent starts responding in Teams (even with general knowledge), that confirms the issue is specifically with retrieval rather than the agent itself.
If the issue persists after permissions and network checks, reviewing the run traces in Foundry and Application Insights logs for your Bot Service will typically show whether the knowledge retrieval call is failing (for example, due to authorization or connectivity issues).
For reference, these Microsoft documents cover the relevant areas:
- Azure AI Foundry Agents overview https://learn.microsoft.com/azure/ai-foundry/agents/overview
- Retrieval-Augmented Generation with Azure AI Search https://learn.microsoft.com/azure/search/retrieval-augmented-generation-overview
- Azure Bot Service channels and authentication https://learn.microsoft.com/azure/bot-service/bot-service-channels-overview
- Microsoft Teams bot integration guidance https://learn.microsoft.com/microsoftteams/platform/bots/what-are-bots
In short, this isn’t an issue with your knowledge base itself, it’s typically a channel-specific access or connectivity gap affecting retrieval. Once the Teams channel can successfully reach and read from your Azure AI Search index, your custom Teams app should return the same grounded responses you see in Playground and Copilot.
Hope this helps!