Workiq
microsoft/work-iq
WorkIQ tools for Microsoft 365 workplace data and actions. An agent skill from microsoft/work-iq.
Adds Work IQ (M365 Copilot Search) to a Power Apps code app via the Work IQ Copilot MCP connector (shareda365copilotchatmcp), then wires up a production-ready McpSession wrapper for AI-powered…
$ npx skills add microsoft/power-platform-skills --skill add-workiq -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft/power-platform-skills add-workiq --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/code-apps/skills/add-workiq .claude/skills/add-workiq && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "add-workiq" agent skill from https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/add-workiq into .claude/skills/add-workiq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-workiq", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/add-workiqType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft/power-platform-skills --skill add-workiq -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft/power-platform-skills add-workiq --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/code-apps/skills/add-workiq .agents/skills/add-workiq && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-workiq" agent skill from https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/add-workiq into .agents/skills/add-workiq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-workiq", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/power-platform-skills --skill add-workiq -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft/power-platform-skills add-workiq --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/code-apps/skills/add-workiq .cursor/skills/add-workiq && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-workiq" agent skill from https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/add-workiq into .cursor/skills/add-workiq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-workiq", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft/power-platform-skills.git --path plugins/code-apps/skills/add-workiq--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft/power-platform-skills --skill add-workiq -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft/power-platform-skills add-workiq --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/code-apps/skills/add-workiq .gemini/skills/add-workiq && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-workiq" agent skill from https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/add-workiq into .gemini/skills/add-workiq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-workiq", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft/power-platform-skills add-workiqInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft/power-platform-skills --skill add-workiq -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/code-apps/skills/add-workiq .github/skills/add-workiq && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-workiq" agent skill from https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/add-workiq into .github/skills/add-workiq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-workiq", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/power-platform-skills --skill add-workiq -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft/power-platform-skills add-workiq --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/code-apps/skills/add-workiq .opencode/skills/add-workiq && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-workiq" agent skill from https://github.com/microsoft/power-platform-skills/tree/main/plugins/code-apps/skills/add-workiq into .opencode/skills/add-workiq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-workiq", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-workiqAdds Work IQ (M365 Copilot Search) to a Power Apps code app via the Work IQ Copilot MCP connector (shareda365copilotchatmcp), then wires up a production-ready McpSession wrapper for AI-powered…
Add Workiq is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Adds Work IQ (M365 Copilot Search) to a Power Apps code app via the Work IQ Copilot MCP connector (shareda365copilotchatmcp), then wires up a production-ready McpSession wrapper for AI-powered, knowledge-grounded search and chat. Use when integrating Microsoft 365 Copilot search/chat. The CopilotChat tool searches internal Microsoft 365 content (documents, emails, chats, sites, files) across your organization — prefer workload-specific tools (SharePoint, OneDrive, Teams, Mail) when the workload is explicit; do…
Its SKILL.md is about 5.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Documents & Office, covering Cloud office suites and App automation through connectors. It works with Microsoft 365, Microsoft SharePoint, Microsoft OneDrive and Model Context Protocol. The repository describes itself as: A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and… The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 5ef4e4f. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadEditWriteGrepGlobBashLSPTaskCreateTaskUpdateTaskList…and 3 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
make.powerapps.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Add Workiq loads about 5.6k tokens when it runs. Until then it costs about 151 tokens; SKILL.md has 1,490 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Edit, Write, Grep, Glob, Bash, LSP, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestionAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from microsoft/power-platform-skills at commit 5ef4e4f, republished under its MIT licence (© microsoft). 1,490 words, ~5,582 tokens.
.claude/skills/add-workiq/SKILL.md (or your agent's skills folder).📋 Shared Instructions: shared-instructions.md - Cross-cutting concerns.
Work IQ is accessed through the dedicated Work IQ Copilot MCP connector (shared_a365copilotchatmcp; shown as "Work IQ Copilot MCP (Preview)" in the maker portal). It exposes an MCP (Model Context Protocol) endpoint whose CopilotChat tool performs AI-powered, knowledge-grounded search and conversation over Microsoft 365 content.
This is the purpose-built Work IQ connector and generates a
WorkIQCopilotMCPServicewith a singlemcp_m365copilotoperation. Every command and code reference in this skill is specific toshared_a365copilotchatmcp(connection commands, and the generatedWorkIQCopilotMCPService/WorkIQCopilotMCPModelfiles). Do not run this skill for a different connector. If you instead need the broadershared_a365mcpservers"Microsoft 365 MCP Servers" bundle (Mail/Teams/SharePoint MCP servers), add it via/add-connector— its generated service isMicrosoftMCPServersService, so you must adjust the Step 2 commands and the wrapper imports accordingly.
⚠️ Work IQ uses MCP. A JSON-RPC
initializehandshake runs before the firsttools/call. This connector's server (Microsoft.MCPPlatform.WebApi) is stateless-tolerant — do NOT send anMcp-Session-Idoninitialize(the server treats it as a session lookup and returns-32001 Session not found). Drive the connector through theMcpSessionwrapper below, which runs the handshake, sends no session id by default, sequences JSON-RPC ids, auto-retries onSession not found, and parses the nested response for you.
Check for memory-bank.md per shared-instructions.md.
The Power Apps code-app CLI (@microsoft/power-apps-cli, invoked as pa or power-apps — resolve via cli-binary.md) creates the connection and generates the typed service itself. Make sure the CLI is installed (npm install) and you are signed in (pa auth status, or power-apps auth-status on power-apps-only projects; it shares the same auth as the rest of the code-app skills).
Check for an existing connection first:
pa connection listLook for a Work IQ Copilot MCP (Preview) connection (api id shared_a365copilotchatmcp) in the output. If one is listed, note its Connection ID and skip to "Add the Data Source" below.
Otherwise create one with the native create-connection verb:
pa connection create --connector shared_a365copilotchatmcppower.config.json — you do not need to pass an environment id.STOP HERE — interactive sign-in required:
If create-connection fails:
pa auth status (or power-apps auth-status on power-apps-only projects), sign in if needed, and retry.As a fallback, the user can create the connection manually in the maker portal: https://make.powerapps.com/environments/<environment-id>/connections → + New connection → search for "Work IQ Copilot MCP" → Create, then re-run list-connections.
Once the connection exists, add it to the code app (this is what generates the typed service + model):
pa app add data-source --connector shared_a365copilotchatmcp -c <connection-id>This is a non-tabular connector — only --connector (api id) and -c (connection id) are needed.
After adding the connector, confirm the generated service is present. This is a small, single-operation service, so you can read it directly or grep it:
Grep pattern="async \w+" path="src/generated/services/WorkIQCopilotMCPService.ts"The WorkIQCopilotMCPService exposes exactly one operation — mcp_m365copilot ("Work IQ Copilot (Preview)"), plus a Getmcp_m365copilot GET variant used only for connection verification. Work IQ / CopilotChat is driven through mcp_m365copilot.
Its generated signature is:
public static async mcp_m365copilot(
Mcp_Session_Id?: string,
queryRequest?: QueryRequest
): Promise<IOperationResult<void>>Mcp-Session-Id parameter). Leave it undefined — this server assigns/needs no client session id, and sending one on initialize returns -32001 (see below).QueryRequest ({ jsonrpc?, id?, method?, params?, result?, error? }) — exported from src/generated/models/WorkIQCopilotMCPModel.ts.IOperationResult<void>; the actual JSON-RPC / SSE body arrives in result.data at runtime.Facts you can rely on (do not try to discover them at runtime):
CopilotChat (case-sensitive). Do not substitute query, search, or find.message — not query, prompt, or question.Mcp-Session-Id on the initialize handshake. This connector's server treats an incoming id as an existing-session lookup and returns -32001 Session not found. The server is stateless-tolerant: initialize and tools/call both succeed with no session id, so the McpSession wrapper below tracks none by default.Session-id handling (verified during testing). This connector's MCP server is stateless-tolerant.
initializewith noMcp-Session-Idreturns200with server capabilities, and a subsequenttools/callwith no id returns the Copilot reply — no session id needs to be tracked or echoed. Do not generate a client id and send it oninitialize: the server treats it as a lookup and returns404 / -32001 Session not found(this was a real bug in an earlier version of this wrapper). Note that the code-apps data layer'sIOperationResult<TResponse>exposes only{ success, data, error, skipToken, count, fileName }— it does not surface response headers — so if a future MCP server returns a session id only in theMcp-Session-Idresponse header, it would be unreadable here. The wrapper still defensively adopts a server id if one ever appears insideresult.data.
⚠️ CRITICAL: MCP session handling and response parsing are intricate. Copy the production-ready McpSession class below exactly. It runs the initialize handshake (sending no session id), sequences JSON-RPC ids, auto-retries on "Session not found", persists the conversation id, and parses the deeply nested response.
Create src/connectors/mcpClient.ts:
// src/connectors/mcpClient.ts
import type { IOperationResult } from '@microsoft/power-apps/data'
import { WorkIQCopilotMCPService } from '../generated/services/WorkIQCopilotMCPService'
import type { QueryRequest } from '../generated/models/WorkIQCopilotMCPModel'
export interface JsonRpcRequest {
jsonrpc: '2.0'
id?: string
method: string
params?: Record<string, unknown>
}
export interface JsonRpcResponse {
jsonrpc?: string
id?: string
result?: Record<string, unknown>
error?: { code?: number; message?: string; data?: unknown }
}
type CopilotConversationMessage = {
text?: string
attributions?: Array<{
attributionType?: string
providerDisplayName?: string
seeMoreWebUrl?: string
}>
}
type CopilotConversation = {
messages?: CopilotConversationMessage[]
}
function parseRpc(result: IOperationResult<unknown>): JsonRpcResponse {
if (!result.success && result.error) {
return { error: { message: result.error.message } }
}
const data: unknown = result.data
if (data == null) return {}
if (typeof data === 'object') return data as JsonRpcResponse
if (typeof data === 'string') {
// Handle SSE framing: "event: message\ndata: {JSON}"
const dataLines = data
.split(/\r?\n/)
.filter((line) => line.startsWith('data:'))
.map((line) => line.slice(5).trim())
// Per the SSE spec, multiple `data:` lines are joined with newlines — a single
// JSON object can be split across lines, so joining with '' would corrupt it.
const payload = dataLines.length ? dataLines.join('\n') : data
try {
return JSON.parse(payload) as JsonRpcResponse
} catch {
return { result: { raw: data } }
}
}
return { result: { raw: data } }
}
export class McpSession {
private nextId = 1
// MCP Streamable HTTP: the client must NOT send a session id on `initialize` —
// the server assigns one. Sending a client-generated id makes this connector's
// server return `404 / -32001 Session not found`. This server is stateless-
// tolerant, so we send no id at all; `extractSessionId` still adopts a server
// id if one ever surfaces in the response body.
private sessionId: string | undefined = undefined
private conversationId: string | undefined
private initialized = false
private extractSessionId(raw: IOperationResult<unknown>): string | undefined {
const container = raw as unknown as Record<string, unknown>
const dataObj =
raw.data && typeof raw.data === 'object'
? (raw.data as Record<string, unknown>)
: undefined
const resultObj =
dataObj?.result && typeof dataObj.result === 'object'
? (dataObj.result as Record<string, unknown>)
: undefined
const candidates: Array<unknown> = [
dataObj?.['Mcp-Session-Id'],
dataObj?.mcpSessionId,
dataObj?.sessionId,
resultObj?.['Mcp-Session-Id'],
resultObj?.mcpSessionId,
resultObj?.sessionId,
container['Mcp-Session-Id'],
container.mcpSessionId,
container.sessionId,
]
const found = candidates.find((value) => typeof value === 'string' && value.length > 0)
return typeof found === 'string' ? found : undefined
}
private isSessionNotFound(res: JsonRpcResponse): boolean {
const message = (res.error?.message ?? '').toLowerCase()
return message.includes('session not found') || res.error?.code === -32001
}
private resetSession(): void {
// Drop any session id and re-handshake from scratch (no id on `initialize`).
this.sessionId = undefined
this.initialized = false
}
private async send(
method: string,
params?: Record<string, unknown>,
allowRetry = true
): Promise<JsonRpcResponse> {
const req: JsonRpcRequest = { jsonrpc: '2.0', id: String(this.nextId++), method, params }
// Send no session id on `initialize` (server treats any id as existing-session lookup).
const sessionId = method === 'initialize' ? undefined : this.sessionId
const raw = (await WorkIQCopilotMCPService.mcp_m365copilot(
sessionId,
req as unknown as QueryRequest
)) as unknown as IOperationResult<unknown>
const negotiatedSessionId = this.extractSessionId(raw)
if (negotiatedSessionId) {
this.sessionId = negotiatedSessionId
}
const parsed = parseRpc(raw)
if (allowRetry && method !== 'initialize' && this.isSessionNotFound(parsed)) {
this.resetSession()
await this.initialize()
return this.send(method, params, false)
}
return parsed
}
async initialize(): Promise<JsonRpcResponse> {
const res = await this.send('initialize', {
protocolVersion: '2025-06-18',
capabilities: {},
clientInfo: { name: 'Power Apps Code App', version: '1.0.0' },
})
// Fail fast: surface a failed handshake instead of continuing to `tools/call`.
if (res.error) {
throw new Error(`MCP initialize failed: ${res.error.message ?? JSON.stringify(res.error)}`)
}
this.initialized = true
return res
}
/** Discover the available MCP tools (optional; the tool name is fixed as `CopilotChat`). */
async listTools(): Promise<JsonRpcResponse> {
if (!this.initialized) await this.initialize()
return this.send('tools/list', {})
}
async callCopilotChat(message: string): Promise<{ text: string; conversationId?: string }> {
if (!this.initialized) await this.initialize()
const raw = await this.send('tools/call', {
name: 'CopilotChat',
arguments: {
message,
...(this.conversationId ? { conversationId: this.conversationId } : {}),
},
})
// Surface MCP/connector errors as thrown exceptions so callers can `try/catch`
// instead of string-matching the returned text.
if (raw.error) {
throw new Error(raw.error.message ?? JSON.stringify(raw.error))
}
const parsed = extractCopilotText(raw)
if (parsed.conversationId) {
this.conversationId = parsed.conversationId
}
return { text: parsed.text, conversationId: parsed.conversationId }
}
}
function extractContentText(res: JsonRpcResponse): string | undefined {
const content = res.result?.content as Array<{ type?: string; text?: string }> | undefined
if (!Array.isArray(content)) {
return undefined
}
const textBlocks = content
.filter((c) => c.type === 'text' && typeof c.text === 'string')
.map((c) => c.text!.trim())
.filter((value) => value.length > 0)
if (textBlocks.length === 0) {
return undefined
}
// Prefer the JSON payload block. Some responses append metadata text blocks
// such as "CorrelationId: ..." that should not be concatenated.
const jsonBlock = textBlocks.find(
(block) => block.startsWith('{') && /"conversationId"|"rawResponse"|"reply"/.test(block)
)
if (jsonBlock) {
return jsonBlock
}
const nonMetadata = textBlocks.find((block) => !/^CorrelationId\s*:/i.test(block))
return nonMetadata ?? textBlocks[0]
}
export function extractCopilotText(res: JsonRpcResponse): {
text: string
conversationId?: string
} {
const rawText = extractContentText(res)
if (!rawText) {
return { text: res.result ? JSON.stringify(res.result, null, 2) : '(no content returned)' }
}
try {
const inner = JSON.parse(rawText) as {
conversationId?: string
reply?: string
message?: string
rawResponse?: string
}
if (typeof inner.rawResponse === 'string') {
try {
const convo = JSON.parse(inner.rawResponse) as CopilotConversation
const messages = Array.isArray(convo.messages) ? convo.messages : []
// messages[0] echoes the user query; the AI reply is the one carrying
// attributions (citations). Fall back to index 1, then the last message.
const attributed = messages.find(
(m) => Array.isArray(m.attributions) && m.attributions.length > 0
)
const selected = attributed ?? messages[1] ?? messages[messages.length - 1]
const replyText = selected?.text?.trim()
if (replyText) {
return { text: replyText, conversationId: inner.conversationId }
}
} catch {
// Fall through to simple reply extraction.
}
}
const fallbackText = inner.reply?.trim() || inner.message?.trim() || rawText
return { text: fallbackText, conversationId: inner.conversationId }
} catch {
return { text: rawText }
}
}Session-id note (verified during testing).
McpSessionstarts with no session id and sends none on theinitializehandshake. Testing againstshared_a365copilotchatmcp(serverMicrosoft.MCPPlatform.WebApi) confirmed it is stateless-tolerant:initializewith no id returns200+ capabilities, andtools/callwith no id returns the Copilot reply. Sending a client-generated id oninitializeinstead makes the server return404 / -32001 Session not found— that was the original bug.IOperationResultexposes only{ success, data, error, skipToken, count, fileName }(no response headers), so a header-only session id would be unreadable here;extractSessionIdstill adopts a server id if one ever appears insideresult.data, and the handshake auto-retries onSession not foundfor resilience.If you ever bind a different MCP connector that is genuinely stateful and returns its session id only in the
Mcp-Session-Idresponse header, this SDK cannot read it — capture one rawmcp_m365copilotresult in the debugger to confirm where the id surfaces, and if it appears insideresult.data, add that path toextractSessionId.
Initialize once per app (e.g., in a React useEffect on boot or a module singleton) and reuse for all Work IQ calls:
import { McpSession } from './connectors/mcpClient'
// Initialize once per app session and reuse across calls.
const workIqSession = new McpSession()
export async function queryWorkIQ(userPrompt: string): Promise<string> {
try {
const { text } = await workIqSession.callCopilotChat(userPrompt)
return text
} catch (error) {
const msg = error instanceof Error ? error.message : 'Work IQ query failed'
console.error('Work IQ Error:', msg)
throw error
}
}Key patterns:
new McpSession() per request)callCopilotChat()conversationId is automatically persisted across calls for multi-turn chatsWork IQ responds well to context-rich, structured prompts. Adapt this pattern for your scenario:
const prompt = `
You are [role/expert description].
**Context:**
- [Relevant data or background information]
- [Additional context as needed]
**Task:** [Clear, specific instruction]
**Format:**
- Use markdown with clear section headings (## Summary, ## Action Items, etc.)
- Specify limits (word count, number of items, etc.)
`.trim()
const { text } = await workIqSession.callCopilotChat(prompt)Adaptable scenarios: meeting summaries with action items, prioritized daily action items from email, project risk analysis from documents, team performance insights, or any knowledge-grounded analysis over M365 data.
callCopilotChat() already unwraps the nested JSON-RPC / SSE response and returns clean text. Parse that text according to the format you requested.
For structured markdown output (when you asked for ## sections):
function extractSection(text: string, sectionName: string): string[] {
const regex = new RegExp(`##\\s*${sectionName}\\s*([\\s\\S]*?)(?=##|$)`)
const match = text.match(regex)
if (!match) return []
return match[1]
.split('\n')
.filter((line) => line.trim().startsWith('-'))
.map((line) => line.replace(/^-\s*/, '').trim())
.filter(Boolean)
}
const { text } = await workIqSession.callCopilotChat(prompt)
const summary = extractSection(text, 'Summary')
const actionItems = extractSection(text, 'Action Items')For unstructured output — use text directly (display as-is or format for your UI).
Work IQ uses MCP (Model Context Protocol). Driving it correctly requires:
initialize triggers -32001 Session not found); it defensively adopts a server id only if one ever surfaces in the response body (see the session-id note above)-32001 / "Session not found")McpSession handles all of this. Bypassing it (ad-hoc per-call ids or direct calls without the handshake) leads to "Session not found" errors and failed integrations.
npm run buildFix TypeScript errors before proceeding. Do NOT deploy yet.
Update memory-bank.md with: connector added (shared_a365copilotchatmcp), McpSession wrapper created at src/connectors/mcpClient.ts, Work IQ usage wired up, build status.
IMPORTANT — Do NOT save sensitive information:
Only save high-level progress like "Work IQ Copilot MCP connector configured" or "Work IQ CopilotChat integration implemented via McpSession".
© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/code-apps/skills/add-workiq of microsoft/power-platform-skills.
Open the folder on GitHubat commit 5ef4e4f
Add Workiq next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Add Workiq this skillmicrosoft/power-platform-skills | 967 | — | ~5.6k | Automated safety check: Notes | MIT | |
| Workiqmicrosoft/work-iq | 1k | — | ~15k | Automated safety check: Pass | Custom licence | |
| Msgraph Filesautomateyournetwork/netclaw | 674 | — | ~1k | Automated safety check: Pass | Apache-2.0 | |
| Msgraph Visioautomateyournetwork/netclaw | 674 | — | ~1k | Automated safety check: Pass | Apache-2.0 | |
| Msgraphcodemie-ai/codemie-code | 294 | — | ~4.1k | Automated safety check: Pass | Apache-2.0 | |
| aai-cli Microsoft 365aai-labs/agent-barn | 109 | — | ~1.2k | Automated safety check: Pass | Apache-2.0 |
microsoft/work-iq
WorkIQ tools for Microsoft 365 workplace data and actions. An agent skill from microsoft/work-iq.
automateyournetwork/netclaw
Read OneDrive and SharePoint files via the Microsoft 365 MCP server — list folder contents, fetch item metadata, inspect versions and sharing permissions.
automateyournetwork/netclaw
Upload and retrieve Visio (.vsdx) and other diagram files in OneDrive/SharePoint via the Microsoft 365 MCP server.
codemie-ai/codemie-code
Work with Microsoft 365 services via the Graph API — emails, calendar events, SharePoint sites (read and write), Teams chats and channel messages, OneDrive files, OneNote notebooks, Planner task…
aai-labs/agent-barn
Guides work with Outlook, OneDrive, SharePoint, Teams, Excel, To Do and Planner through aai-cli's Microsoft Graph commands, starting from which service owns the data.
microsoft/work-iq
WorkIQ tools for Microsoft 365 workplace data and actions. An agent skill from microsoft/work-iq.
microsoft/power-platform-skills
Inspects and configures the web application firewall (WAF) in front of a Power Pages production site.
microsoft/power-platform-skills
Inspects and configures the security headers a Power Pages site sends to browsers — Content Security Policy, frame and clickjacking protection, cross-origin sharing, cookie behavior, and related…
microsoft/power-platform-skills
Scans a Power Pages site project for security issues in source code and dependencies.
microsoft/power-platform-skills
Runs a security scan on a deployed Power Pages site, fetches the latest scan report, and produces a plain-language summary.
microsoft/power-platform-skills
Creates Dataverse tables, columns, and relationships for a Power Pages site based on a data model proposal.
microsoft/power-platform-skills
Creates, edits, and manages Power Pages Server Logic files — server-side JavaScript that runs securely on the Power Pages runtime.
Categories
Adds Work IQ (M365 Copilot Search) to a Power Apps code app via the Work IQ Copilot MCP connector (shareda365copilotchatmcp), then wires up a production-ready McpSession wrapper for AI-powered…. Add Workiq is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Adds Work IQ (M365 Copilot Search) to a Power Apps code app via the Work IQ Copilot MCP connector (shareda365copilotchatmcp), then wires up a production-ready McpSession wrapper for AI-powered, knowledge-grounded search and chat.
Add Workiq fits situations like: integrating Microsoft 365 Copilot search/chat; general knowledge; external information.
Run `npx skills add microsoft/power-platform-skills --skill add-workiq -a claude-code`. Or copy the skill folder (plugins/code-apps/skills/add-workiq in microsoft/power-platform-skills) into .claude/skills/add-workiq in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft/power-platform-skills --skill add-workiq -a codex`. Or copy the skill folder (plugins/code-apps/skills/add-workiq in microsoft/power-platform-skills) into .agents/skills/add-workiq in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/power-platform-skills --skill add-workiq -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-workiq, .gemini/skills/add-workiq, .github/skills/add-workiq and .opencode/skills/add-workiq in your project.
Going by SKILL.md and its folder, Add Workiq needs the command-line tools its instructions call (npm). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Edit, Write, Grep, Glob, Bash, LSP, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion, Skill.
SKILL.md names 1 domain. In commands or code: make.powerapps.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Add Workiq is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.6k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Add Workiq: Workiq (microsoft/work-iq, 1k stars), Msgraph Files (automateyournetwork/netclaw, 674 stars), Msgraph Visio (automateyournetwork/netclaw, 674 stars) and Msgraph (codemie-ai/codemie-code, 294 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft (a GitHub organization, an official publisher) maintains it in microsoft/power-platform-skills, which has 967 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on October 6, 2026.
Source: microsoft/power-platform-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.