WorkIQ — Microsoft 365 Data Query
Use this skill to answer questions about Microsoft 365 data: emails, meetings, calendar, documents, Teams messages, and people/org insights. WorkIQ queries data the authenticated user already has permission to access — no extra permissions are granted.
When to use
Invoke this skill whenever the user asks about:
- - Emails — "What did Sarah say about the budget?", "Find emails about project X"
- Calendar / meetings — "What's on my calendar tomorrow?", "Who attended the standup last Friday?"
- Documents / files — "Find my recent PowerPoints", "Summarize the Q4 spec document"
- Teams messages — "Summarize today's messages in the Engineering channel"
- People / org — "Who is working on Project Alpha?", "Who is my manager?"
- Meeting notes — "What issues were raised in yesterday's Contoso meeting?"
How to query
Use the exec tool to run WorkIQ. Prefer the global CLI if available, otherwise fall back to npx.
If workiq is on PATH:
CODEBLOCK0
If only npx is available (Node.js required):
CODEBLOCK1
With a specific Entra tenant ID:
CODEBLOCK2
Query guidelines
- - Write questions in natural language — WorkIQ understands context
- Be specific: include names, dates, project names, or channel names when known
- WorkIQ CLI is stateless per call — for follow-ups, include full context in each question
- WorkIQ only returns data the signed-in user has permission to see
- Do not pipe or combine WorkIQ output with other shell commands — run it standalone
Example queries
| User intent | Command |
|---|
| Recent emails on a topic | INLINECODE3 |
| Tomorrow's calendar |
workiq ask -q "What meetings do I have tomorrow?" |
| Find a document |
workiq ask -q "Find my recent documents about Q4 planning" |
| Teams channel summary |
workiq ask -q "Summarize today's messages in the Engineering channel" |
| People lookup |
workiq ask -q "Who is working on Project Alpha?" |
| Meeting notes |
workiq ask -q "What issues were raised in yesterday's Contoso meeting?" |
| Spec document |
workiq ask -q "Summarize the key requirements in the user portal spec document" |
| Emails from a person |
workiq ask -q "Summarize emails from Sarah about the budget" |
First-time setup
If WorkIQ has never been used, the EULA must be accepted first. Tell the user to run:
CODEBLOCK3
If WorkIQ is not installed at all:
CODEBLOCK4
Error handling
| Error | Action |
|---|
| Auth / sign-in prompt | Tell the user to run workiq ask manually in their terminal to complete the interactive sign-in flow |
| EULA not accepted |
Prompt the user to run
workiq accept-eula |
| No results / empty response | Rephrase the question with more context, a different time range, or more specific names |
| Permission denied | User may lack an M365 Copilot license or admin consent for the WorkIQ app in their Entra tenant |
|
workiq not found | Prompt the user to install:
npm install -g @microsoft/workiq |
WorkIQ — Microsoft 365 数据查询
使用此技能回答关于 Microsoft 365 数据的问题:电子邮件、会议、日历、文档、Teams 消息以及人员/组织洞察。WorkIQ 查询的是已认证用户已有权限访问的数据——不会授予额外权限。
使用时机
当用户询问以下内容时调用此技能:
- - 电子邮件 — Sarah 对预算说了什么?,查找关于项目 X 的邮件
- 日历/会议 — 我明天日历上有什么安排?,上周五谁参加了站会?
- 文档/文件 — 查找我最近的 PowerPoint,总结 Q4 规格文档
- Teams 消息 — 总结工程频道今天的消息
- 人员/组织 — 谁在负责 Alpha 项目?,我的经理是谁?
- 会议记录 — 昨天的 Contoso 会议提出了哪些问题?
查询方法
使用 exec 工具运行 WorkIQ。优先使用全局 CLI(如果可用),否则回退到 npx。
如果 workiq 在 PATH 中:
bash
workiq ask -q <自然语言问题>
如果只有 npx 可用(需要 Node.js):
bash
npx -y @microsoft/workiq ask -q <自然语言问题>
使用特定的 Entra 租户 ID:
bash
workiq ask -t <租户ID> -q <自然语言问题>
查询指南
- - 用自然语言编写问题——WorkIQ 能理解上下文
- 要具体:包括已知的名称、日期、项目名称或频道名称
- WorkIQ CLI 每次调用无状态——对于后续问题,在每个问题中包含完整上下文
- WorkIQ 仅返回已登录用户有权查看的数据
- 不要将 WorkIQ 输出与其他 shell 命令通过管道连接或组合——请独立运行
示例查询
| 用户意图 | 命令 |
|---|
| 关于某个主题的近期邮件 | workiq ask -q 上周 John 对提案说了什么? |
| 明天的日历 |
workiq ask -q 我明天有哪些会议? |
| 查找文档 | workiq ask -q 查找我关于 Q4 规划的近期文档 |
| Teams 频道摘要 | workiq ask -q 总结工程频道今天的消息 |
| 人员查询 | workiq ask -q 谁在负责 Alpha 项目? |
| 会议记录 | workiq ask -q 昨天的 Contoso 会议提出了哪些问题? |
| 规格文档 | workiq ask -q 总结用户门户规格文档中的关键要求 |
| 来自某人的邮件 | workiq ask -q 总结 Sarah 关于预算的邮件 |
首次设置
如果从未使用过 WorkIQ,必须首先接受 EULA。告知用户运行:
bash
workiq accept-eula
如果 WorkIQ 完全未安装:
bash
npm install -g @microsoft/workiq
workiq accept-eula
错误处理
| 错误 | 操作 |
|---|
| 认证/登录提示 | 告知用户在其终端中手动运行 workiq ask 以完成交互式登录流程 |
| EULA 未接受 |
提示用户运行 workiq accept-eula |
| 无结果/空响应 | 用更多上下文、不同的时间范围或更具体的名称重新表述问题 |
| 权限被拒绝 | 用户可能缺少 M365 Copilot 许可证,或者其 Entra 租户中未对 WorkIQ 应用授予管理员同意 |
| 未找到 workiq | 提示用户安装:npm install -g @microsoft/workiq |