← 返回
安全合规 中文

M365 Mailbox (Graph)

Automate Microsoft 365 mailbox tasks via Microsoft Graph: read, search, draft, send emails for Business and Consumer accounts with device code authentication.
通过 Microsoft Graph 自动执行 Microsoft 365 邮箱任务,支持读取、搜索、草拟、发送邮件,适用于企业和消费者账户并使用设备代码认证。
tradmangh
安全合规 clawhub v0.1.1 1 版本 99788 Key: 无需
★ 2
Stars
📥 1,372
下载
💾 26
安装
1
版本
#latest

概述

M365 Mailbox (Microsoft Graph)

Installation / runtime requirements

  • Requires Node.js (scripts are Node ESM).
  • This skill declares its npm dependency in package.json.
  • After installing/updating the skill, install deps:
cd skills/m365-mailbox
npm install

Security / boundaries

  • Never commit or share token caches.
  • Default secret location (per machine): ~/.openclaw/secrets/m365-mailbox/

Setup philosophy (permission-aware)

During setup, the user chooses:

1) What Graph permissions to request (minimal vs broad)

2) What OpenClaw is allowed to do autonomously vs what must ask for confirmation

Two modes:

  • Minimal-consent mode (more secure): request only the scopes required for the chosen feature set.
  • Broad-consent mode (more flexible): request a superset of scopes, but enforce an autonomy policy locally.

Quick start

0) First question: connect M365 Business or M365 Home/Consumer?

  • Home/Consumer = hotmail.com, outlook.com, live.com
  • Business = Work/School account (Exchange Online)

1) Privacy / keys

  • No third-party API key required.
  • Auth is done via your own Microsoft login (device code flow).
  • Tokens are stored locally per profile on the OpenClaw machine.

2) One-command setup (interactive)

node skills/m365-mailbox/scripts/setup.mjs --profile home --tenant consumers --email you@outlook.com --clientId <YOUR_APP_CLIENT_ID> --tz Europe/Vienna
node skills/m365-mailbox/scripts/setup.mjs --profile business --tenant organizations --email you@company.com --clientId <IT_PROVIDED_CLIENT_ID> --tz Europe/Vienna

3) Use (examples)

node skills/m365-mailbox/scripts/list-unread.mjs --profile home --top 20
node skills/m365-mailbox/scripts/search.mjs --profile home --query "invoice" --top 20
node skills/m365-mailbox/scripts/get-message.mjs --profile home --id <MSG_ID>
node skills/m365-mailbox/scripts/create-draft.mjs --profile home --to you@example.com --subject "Hi" --body "..."
node skills/m365-mailbox/scripts/send-draft.mjs --profile home --id <DRAFT_ID>

Business note (users without IT admin rights)

Many tenants block:

  • creating app registrations as a normal user
  • user consent to new apps
  • Mail.Send or Mail.ReadWrite without admin consent

In that case this skill can still work for Business accounts, but only if your IT/SysAdmin provides a clientId for an app registration configured with:

  • Delegated Microsoft Graph permissions (depending on your chosen feature set): Mail.Read, Mail.ReadWrite, Mail.Send, (optional) offline_access
  • Public client flows enabled (Device Code)
  • (Often required) Admin consent granted

If you don’t get such a clientId/consent from IT, you can still use the skill with a Consumer account.

版本历史

共 1 个版本

  • v0.1.1 当前
    2026-03-29 04:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,701
data-analysis

M365 Spam Manager

tradmangh
通过分析垃圾邮件模式、对可疑邮件进行评分,协助审查或自动清理 Outlook/Exchange 中的垃圾邮件。
★ 0 📥 958
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,211 📥 266,210