m365-pnp-cli_skill

This skill helps you manage Microsoft 365 tenants and workloads using the official m365-pnp-cli, enabling quick administration across SharePoint, Teams, and
  • Python

2.5k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill m365-pnp-cli

  • _meta.json269 B
  • SKILL.md4.9 KB

Overview

This skill wraps the official PnP CLI for Microsoft 365, providing a command-line interface to manage Microsoft 365 tenants, SharePoint Online, Teams, OneDrive, Outlook, Entra ID, and other workloads. It enables scripted and interactive administration tasks, from listing sites and users to exporting resources and automating routine operations. The CLI is cross-platform and designed for both ad-hoc troubleshooting and integration into automation pipelines.

How this skill works

The skill calls the @pnp/cli-microsoft365 binary to run commands against Microsoft 365 services. It authenticates using Device Code Flow by default and supports alternate auth methods (certificate, client secret, managed identity) for automated scenarios. Commands return JSON by default for easy parsing, and output can be filtered with JMESPath or switched to text for human-readable output.

When to use it

  • Administer SharePoint Online sites, lists, files, and permissions from scripts or terminal.
  • Manage Teams data: list teams, channels, members, chats, and meetings.
  • Automate OneDrive and Outlook operations such as file retrieval and mail/calendar exports.
  • Query Entra ID for users, groups, and applications as part of audits or reports.
  • Integrate tenant management into CI/CD pipelines or scheduled backup tasks.

Best practices

  • Always run m365 --help or command-specific --help before executing unfamiliar commands.
  • Use JSON output and JMESPath filters for reliable parsing in automation scripts.
  • Prefer certificate-based authentication for production automation; use device code for interactive use.
  • Ensure Node.js >= 20 is installed and the CLI is updated to the latest release for security and feature fixes.
  • Limit scope and permissions of service principals used with the CLI to follow least privilege.

Example use cases

  • Script to list all SharePoint sites and export their URL and template to JSON for inventory.
  • Automated job that uses certificate auth to fetch OneDrive files and back them up nightly.
  • On-demand admin command to list Teams channels and export membership for compliance checks.
  • Query Entra users and groups to create a reconciliation report for HR onboarding/offboarding.

FAQ

Use certificate-based authentication or a managed identity. Certificates are recommended for production automation; client secrets are supported but less secure.

What output format should I use for scripts?

JSON is the default and easiest to parse programmatically. Use --query with JMESPath to filter fields before processing.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational