Skip to content

.NET: Add Foundry SharePoint Tool Sample#4227

Merged
crickman merged 1 commit intomicrosoft:mainfrom
rogerbarreto:feature/3674-sharepoint
Feb 25, 2026
Merged

.NET: Add Foundry SharePoint Tool Sample#4227
crickman merged 1 commit intomicrosoft:mainfrom
rogerbarreto:feature/3674-sharepoint

Conversation

@rogerbarreto
Copy link
Member

@rogerbarreto rogerbarreto commented Feb 24, 2026

Motivation and Context

Closes #3674

Adds a new FoundryAgents sample demonstrating how to use the SharePoint grounding tool with AI Agents. This enables agents to search and retrieve information from SharePoint sites via Azure Foundry.

Description

Adds FoundryAgents_Step22_SharePoint sample with:

  • Two agent creation approaches (consistent with other tool samples):
    • Option 1 (MEAI): Using AgentTool.CreateSharepointTool() + AsAITool() wrapper
    • Option 2 (Native SDK): Using PromptAgentDefinition with native AgentTool.CreateSharepointTool()
  • SharePoint grounding tool configuration via SharePointGroundingToolOptions and project connections
  • Display of grounding annotations from SharePoint search results
  • Agent lifecycle management (creation and cleanup)

Files added/modified:

  • Program.cs — Sample implementation with both MEAI and Native SDK approaches
  • FoundryAgents_Step22_SharePoint.csproj — Project file targeting net10.0
  • README.md — Sample documentation with prerequisites and usage instructions
  • FoundryAgents/README.md — Updated samples table with Step 22 entry

Validated end-to-end against agents-e2e-tests-westus2 project with gpt-4o deployment.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings February 24, 2026 21:25
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Feb 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new SharePoint grounding sample (Step 22) to the FoundryAgents getting started samples. The sample demonstrates how to use the SharePoint grounding tool to search and retrieve information from SharePoint sites within AI agents.

Changes:

  • Added a new sample directory FoundryAgents_Step22_SharePoint with Program.cs, README.md, and project file
  • Updated the main FoundryAgents README.md to include the new SharePoint sample in the table of contents
  • Demonstrates two agent creation approaches: using MEAI abstraction and native SDK

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
dotnet/samples/GettingStarted/FoundryAgents/README.md Added reference to the new SharePoint grounding sample in the samples index
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step22_SharePoint/README.md Documentation for the SharePoint grounding sample including prerequisites, setup, and expected behavior
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step22_SharePoint/Program.cs Implementation showing SharePoint grounding tool usage with two agent creation patterns
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step22_SharePoint/FoundryAgents_Step22_SharePoint.csproj Project configuration with required dependencies and compiler settings

@rogerbarreto rogerbarreto force-pushed the feature/3674-sharepoint branch from 6ba4dc4 to 9bdb3b0 Compare February 24, 2026 21:42
@rogerbarreto rogerbarreto changed the title .NET: Add SharePoint sample #3674 .NET: Add Foundry SharePoint Tool Sample #3674 Feb 24, 2026
@rogerbarreto rogerbarreto changed the title .NET: Add Foundry SharePoint Tool Sample #3674 .NET: Add Foundry SharePoint Tool Sample Feb 25, 2026
@rogerbarreto rogerbarreto moved this to In Review in Agent Framework Feb 25, 2026
@rogerbarreto rogerbarreto self-assigned this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Python: Integrate directly with Foundry Tools from agents using any chat clients

5 participants