
Explanation:

To let an Azure AI Agent access publicly available, recent web content, you add the Bing grounding tool. In the SDK, you first define a ToolConnectionList with the Bing connection ID (here, "bingConnectionId"), then construct a BingGroundingToolDefinition(connectionList) so the agent can call Bing Search with recency filters (e.g., last 90 days) when answering questions.
When creating the agent, tool definitions are passed via the tools: parameter of CreateAgentAsync(...) as a List<ToolDefinition>. The toolResources parameter is used when you must also supply resource descriptors (for example, an Azure AI Search index configuration), which is not needed here because the Bing grounding tool already references the connection through the ToolConnectionList.
Therefore:
* Use BingGroundingToolDefinition to ground the agent on current public web data.
* Provide that tool in tools: new List<ToolDefinition> { grounding } when calling CreateAgentAsync(...).
Microsoft Azure AI References (titles only)
* Azure AI Agent Service - Bing web grounding tool (tool definitions and connections)
* Azure AI Agent Service SDK - Agent creation (CreateAgentAsync parameters: tools vs toolResources)
* Azure AI Agent Service - Tool connections and ToolConnectionList usage
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).