← 返回 Skills 市场
Skill
作者
Thomas Goelles
· GitHub ↗
· v1.0.1
709
总下载
0
收藏
3
当前安装
2
版本数
在 OpenClaw 中安装
/install m365-pnp-cli
功能描述
CLI for Microsoft 365 - Manage Microsoft 365 tenant, SharePoint Online, Teams, OneDrive, and more. Official PnP (Patterns and Practices) CLI.
使用说明 (SKILL.md)
m365-pnp-cli Skill
This skill provides access to the CLI for Microsoft 365 – the official PnP (Patterns and Practices) tool for Microsoft 365 management.
⚠️ IMPORTANT FOR AGENTS
When in doubt, ALWAYS call m365 --help first to see all possibilities!
# Always call help when unsure!
m365 --help
# For specific commands:
m365 login --help
m365 spo --help
m365 teams --help
Installation
The CLI must be installed:
npm install -g @pnp/cli-microsoft365
Or use npx (sandbox):
npx @pnp/cli-microsoft365 --help
Source & Verification
- NPM Package: https://www.npmjs.com/package/@pnp/cli-microsoft365
- GitHub Repo: https://github.com/pnp/cli-microsoft365
- Documentation: https://pnp.github.io/cli-microsoft365
- Author: Microsoft PnP (Patterns and Practices Community)
What can the CLI do?
Supported Workloads
- Microsoft Teams
- SharePoint Online
- OneDrive
- Outlook
- Microsoft To Do
- Microsoft Planner
- Power Automate
- Power Apps
- Microsoft Entra ID
- Microsoft Purview
- Bookings
- And more...
Authentication
- Device Code (default)
- Username/Password
- Client Certificate
- Client Secret
- Azure Managed Identity
- Federated Identity
Commands (Overview)
Login/Logout
m365 login # Device Code Login
m365 logout # Logout
m365 status # Check login status
SharePoint Online (spo)
m365 spo site list # List all sites
m365 spo site get --url \x3Curl> # Get site details
m365 spo list list --webUrl \x3Curl> # Lists in a site
m365 spo file list # List files
m365 spo folder add # Create folder
Teams
m365 teams channel list # List channels
m365 teams channel get # Get channel details
m365 teams user list # List team members
m365 teams chat list # List chats
m365 teams meeting list # List meetings
OneDrive
m365 onedrive drive list # OneDrive Drives
m365 onedrive file list # List files
m365 onedrive file get # Get file content
Outlook
m365 outlook mail list # List emails
m365 outlook calendar list # List calendar events
Planner
m365 planner task list # Planner Tasks
m365 planner plan get # Get plan details
Azure AD / Entra ID
m365 entra user list # List users
m365 entra group list # List groups
m365 entra app list # List apps
Usage as Assistant - IMPORTANT
⚡ First Step: ALWAYS call help!
# When in doubt - call help first!
m365 --help
# For specific commands:
m365 spo --help
m365 teams --help
m365 login --help
Basic Usage
# Login (Device Code Flow)
m365 login
# Check status
m365 status
# SharePoint: List sites
m365 spo site list
# SharePoint: Get specific site
m365 spo site get --url "https://contoso.sharepoint.com/sites/test"
# Teams: List channels
m365 teams channel list --teamId \x3Cteam-id>
# OneDrive: Files
m365 onedrive file list
# Outlook: Emails
m365 outlook mail list --folder Inbox
# Planner: Tasks
m365 planner task list
Output Options
# As JSON (default)
m365 spo site list
# As text
m365 spo site list --output text
# Filter with JMESPath
m365 spo site list --query "[?Template==\`GROUP#0\`].{Title:Title, Url:Url}"
Authentication
The CLI uses Device Code Flow by default:
m365 login
# → You'll receive a code on another device
# → Use that code to authenticate with Microsoft
For automated scripts, you can also use:
- Certificate (recommended for production)
- Client Secret (less secure)
- Username/Password (testing only)
Important
- WHEN IN DOUBT: call m365 --help!
- Login required for most commands
- JSON output is easiest to parse
- JMESPath for efficient filtering
- CLI requires Node.js >= 20
安全使用建议
This skill is an instruction-only integration for the official PnP Microsoft 365 CLI and appears coherent. Before installing or granting it access: 1) verify you want the m365 CLI installed globally (or use npx to avoid global install), 2) confirm the npm package version and GitHub repo match the official project, 3) be cautious with credentials — the CLI requires Microsoft credentials to act and using client secrets or certificates should follow least privilege and secure storage practices, 4) restrict the agent's access to only the identity/permissions needed (avoid giving broad tenant-admin credentials to an autonomous agent), and 5) test commands in a sandbox tenant if possible. If you need the agent to operate without human interaction, prefer managed identities or certificates with limited scopes rather than long-lived client secrets or username/password.
功能分析
Type: OpenClaw Skill
Name: m365-pnp-cli
Version: 1.0.1
The skill bundle is benign. It provides access to the official Microsoft 365 CLI, `m365`, as described in `SKILL.md`. All installation instructions and command examples are standard for this tool, and the `SKILL.md` explicitly guides the AI agent to use `m365 --help` when in doubt, which is a responsible instruction. There is no evidence of prompt injection with malicious intent, data exfiltration, unauthorized execution, or any other harmful behavior. The skill merely exposes the legitimate functionalities of a powerful management CLI.
能力评估
Purpose & Capability
Name/description (m365 PnP CLI) match the requested binary and npm package (@pnp/cli-microsoft365). Requiring the 'm365' binary and Node/npm to install the official package is proportionate to the declared purpose.
Instruction Scope
SKILL.md only instructs the agent to run the m365 CLI commands and to authenticate via supported Microsoft flows (device code, cert, client secret, managed identity). It does not instruct reading unrelated files or exfiltrating data to third-party endpoints.
Install Mechanism
Install uses a public npm package (@pnp/cli-microsoft365), which is the expected distribution channel for this CLI. npm installs are moderate risk by nature (they execute code during install) but are appropriate and standard for this tool. The metadata points to the official GitHub and docs.
Credentials
The skill does not request any environment variables or secrets itself. The documentation describes authentication methods (including client secrets/certificates) which are legitimate for the CLI; any credentials would be supplied by the user and are relevant to the CLI's function.
Persistence & Privilege
always:false and no requests to modify system or other skills. Autonomous invocation is allowed (platform default) but the skill does not request elevated persistent privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install m365-pnp-cli - 安装完成后,直接呼叫该 Skill 的名称或使用
/m365-pnp-cli触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Updated to English - international version
v1.0.0
Initial release - CLI for Microsoft 365 with SharePoint, Teams, OneDrive support
元数据
常见问题
Skill 是什么?
CLI for Microsoft 365 - Manage Microsoft 365 tenant, SharePoint Online, Teams, OneDrive, and more. Official PnP (Patterns and Practices) CLI. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 709 次。
如何安装 Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install m365-pnp-cli」即可一键安装,无需额外配置。
Skill 是免费的吗?
是的,Skill 完全免费(开源免费),可自由下载、安装和使用。
Skill 支持哪些平台?
Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Skill?
由 Thomas Goelles(@thomyg)开发并维护,当前版本 v1.0.1。
推荐 Skills