← Back to Skills Marketplace
thomyg

Skill

by Thomas Goelles · GitHub ↗ · v1.0.1
cross-platform ✓ Security Clean
709
Downloads
0
Stars
3
Active Installs
2
Versions
Install in OpenClaw
/install m365-pnp-cli
Description
CLI for Microsoft 365 - Manage Microsoft 365 tenant, SharePoint Online, Teams, OneDrive, and more. Official PnP (Patterns and Practices) CLI.
README (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

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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install m365-pnp-cli
  3. After installation, invoke the skill by name or use /m365-pnp-cli
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Updated to English - international version
v1.0.0
Initial release - CLI for Microsoft 365 with SharePoint, Teams, OneDrive support
Metadata
Slug m365-pnp-cli
Version 1.0.1
License
All-time Installs 3
Active Installs 3
Total Versions 2
Frequently Asked Questions

What is Skill?

CLI for Microsoft 365 - Manage Microsoft 365 tenant, SharePoint Online, Teams, OneDrive, and more. Official PnP (Patterns and Practices) CLI. It is an AI Agent Skill for Claude Code / OpenClaw, with 709 downloads so far.

How do I install Skill?

Run "/install m365-pnp-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Skill free?

Yes, Skill is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Skill support?

Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Skill?

It is built and maintained by Thomas Goelles (@thomyg); the current version is v1.0.1.

💬 Comments