add-workiq

Integrates Microsoft 365 Copilot search into Power Apps code apps via the Work IQ MCP connector.

808|167|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/microsoft/power-platform-skills --skill add-workiq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-workiq
Source: https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/add-workiq
Command: npx skills add https://github.com/microsoft/power-platform-skills --skill add-workiq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @microsoft/power-apps-cli, @microsoft/power-apps.

What problem does it solve?

Connecting a Power Apps code app to Microsoft 365 Copilot search requires handling the MCP (Model Context Protocol) handshake, JSON-RPC sequencing, session-id quirks, and deeply nested response parsing — all of which are error-prone when done manually.

Core Features & Use Cases

  • Connector Setup: Creates the Work IQ Copilot MCP connection (shared_a365copilotchatmcp) via the Power Apps CLI and adds it as a data source, generating the typed WorkIQCopilotMCPService.
  • Production-Ready McpSession Wrapper: Provides a complete TypeScript wrapper that runs the initialize handshake without a session id, sequences JSON-RPC ids, auto-retries on "Session not found" (-32001), and persists conversation ids for multi-turn chat.
  • Response Parsing: Unwraps nested JSON-RPC/SSE responses into clean text, extracting the Copilot reply with attributions.
  • Use Case: Build an app feature that summarizes a user's emails, meetings, or documents by sending context-rich prompts to the CopilotChat tool and rendering structured markdown sections like action items.

Quick Start

Ask the agent to add Work IQ Copilot search to this Power Apps code app and wire up the McpSession wrapper.

Frequently Asked Questions about add-workiq

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Microsoft 365 Copilot search to a Power Apps code app?

Create a Work IQ Copilot MCP connection with `pa connection create --connector shared_a365copilotchatmcp`, then add it as a data source with `pa app add data-source`. The CLI generates a typed WorkIQCopilotMCPService that you drive through the provided McpSession wrapper.

What is the CopilotChat tool in the Work IQ MCP connector?

CopilotChat is the single MCP tool exposed by the Work IQ Copilot MCP connector, accepting a `message` argument. It performs AI-powered, knowledge-grounded search over Microsoft 365 content like documents, emails, chats, and sites.

Why do I get a -32001 Session not found error with the Work IQ connector?

The error occurs when a client-generated Mcp-Session-Id is sent on the `initialize` handshake; this server treats it as an existing-session lookup. Send no session id on initialize, and the McpSession wrapper auto-retries by re-handshaking if the error still occurs.

When should I use Work IQ CopilotChat instead of SharePoint or Teams connectors?

Use CopilotChat for broad, cross-workload search over M365 content when no specific workload is explicit. Prefer workload-specific tools (SharePoint, OneDrive, Teams, Mail) when the target workload is known, and never use CopilotChat for public web or general knowledge queries.

Does the McpSession wrapper support multi-turn conversations?

Yes, the wrapper persists the conversationId returned by CopilotChat and includes it in subsequent tools/call requests automatically. Initialize one McpSession per app and reuse it across calls rather than creating one per request.