Copilot · Community sample

Work IQ Answers

Turns a Work IQ answer into structured UI: entity chips inline and every citation grouped into a clickable source panel.

Copilot componentReactSPFx 1.24.0-beta.2
Work IQ Answers rendering a cited answer with entity chips and a grouped source panel

The idea behind the sample

Work IQ Answers sends the user's natural-language question to the Work IQ Chat API and renders the response as structured UI instead of plain text. The people, meetings, and files that Work IQ tags inline in its answer become clickable chips, and every citation it returns is grouped into a source panel that deep-links into Teams, SharePoint, or a person's profile. Follow-up questions reuse the same conversation, so multi-turn works as the API intends.

The sample is the only one in this repository that calls Work IQ rather than Microsoft Graph, and it demonstrates the SPFx AadHttpClient pattern for a non-Graph Entra-secured API: a single webApiPermissionRequests entry for the delegated WorkIQAgent.Ask permission, approved once by a tenant admin, with no middle tier and no client secret.

It ships with useMock enabled, so the full experience (inline card, fullscreen view, grouped sources, entity chips, sensitivity badge) runs with zero live dependencies. The mock responses are the exact wire shape of the real API and flow through the same parsing code, so switching to the live endpoint changes no UI code.

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 documentation

Keep exploring

Keep the ideas flowing

Back to all possibilities
Microsoft 365 and Power Platform Community Contributor badge

Sharing is caring.

Share what you know.

Contribute a sample, improve the docs or help someone get started. Sample contributors can opt in to the PnP Recognition Program and share their community contributor badge.

Have something to show? Sign up for a community call demo. Fill in the form and we'll arrange a slot based on your availability.