Authenticated Copilot Studio agents on any SharePoint site
How to publish a Copilot Studio agent to many SharePoint sites through the Microsoft 365 Agents SDK - one web part for the whole tenant, single sign-on with Microsoft Entra ID and Copilot Studio sharing as the access control - built and tested end to end in a live Microsoft demo tenant, and compared with the SharePoint channel + Agent link pattern.
Tutorial, use cases and test scenarios
Build it in 13 steps with checkpoints and screenshots, follow the PKCE + MSAL authentication flow, see what the solution enables, and review every test scenario with expected and actual results.
Open the page →Web pageCustomer pattern: SharePoint channel + Agent link
The customer's setup reproduced in the same tenant: what works, the Site A dependency, concerns and recommendations - compared head-to-head with the Agents SDK web part.
Open the page →DownloadTest plan (Excel)
All 27 scenarios with preconditions, steps and expected results. Record your own results; the summary sheet counts passes, failures and the P1 pass rate. (24 KB)
Download →DownloadPresentation (PowerPoint)
16 slides: the use case, the answer at a glance, both patterns, test results and recommendations. (475 KB)
Download →Source code and guide
https://github.com/patmeh1/copilot-studio-agents-sdk-sharepoint
- Guide - variables, findings, troubleshooting
- Tutorial and use cases and test scenarios as markdown
- SPFx web part, setup scripts and the Edge + Playwright test harness
About the test environment
Results come from automated runs in a Microsoft demo tenant with four test users (Microsoft 365 E5, no Copilot licenses, MFA), three SharePoint sites and two agents - one on the standard harness and one on the GitHub Copilot harness. Tenant identifiers are demo values; no credentials are included.