Preview unavailableThe idea behind the sample
Content Lens is a sample publishing assistant, built as a Copilot UX component with the SharePoint Framework for people who publish SharePoint pages. A Compare tab puts two pages side by side: Copilot names where they differ in terms, dates or promises, and measured checks cover accessibility, images and links. A Page tab reads one page, published or a saved draft, with the user's own access, and asks the Microsoft 365 Copilot Chat API to check it for harmful wording and against writing guidelines that the publisher types in the component or adds from a list of common ones. The component sends the page text in numbered passages, accepts only findings that cite those passages, and shows the findings on the actual SharePoint page in the same component.
Checks that need no AI run separately: accessibility basics, layout suggestions, and dates that have passed since the page was saved. A Comments tab reviews the wording of comments beneath pages and news.
The package requests the seven delegated Microsoft Graph permissions that the Copilot Chat API requires; an administrator approves them. The Chat API is a preview API on the beta endpoint and needs the Microsoft 365 Copilot add-on license. Nothing in SharePoint is changed. A script that runs with every build checks the tool catalog, the schemas, the permission requests and the embedded agent.
Make it your own
Start with the author's setup instructions, explore the implementation, and adapt the pattern to your environment. Sample code stays in its original repository, together with its requirements, license and contribution history.
Read the source documentationA closer look
Preview unavailable
Preview unavailableKeep exploring
- Overview of Copilot UX components — Copilot components built with the SharePoint Framework.
- SharePoint Framework 1.24 release notes — What the 1.24 release adds and changes.
- Avoid getting throttled or blocked in SharePoint Online — The pacing and 429 handling the sample follows when it reads pages and comments.
- Fluent UI React v9 — The component library of the interface.
