cli-microsoft365

cli-microsoft365 is a skill for Claude Code, Codex from pnp/cli-microsoft365-mcp-server. It costs 87 tokens per session (3,672 once invoked), scanned A, original, MIT.

A command-line skill for managing Microsoft 365, Microsoft’s online work suite, from a terminal. It covers services including SharePoint, user accounts, Teams, Planner, To Do, Outlook, and Power Platform.

In plain words
What is it for?
It is for running m365 commands to manage Microsoft 365 tenants, query Microsoft Graph, and work with the listed Microsoft services.
Why use it?
It lets administrators manage these services with repeatable terminal commands instead of handling every task through web pages.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365
Any agent
npx skills add pnp/cli-microsoft365-mcp-server --skill cli-microsoft365
Clone the repo
git clone --depth 1 https://github.com/pnp/cli-microsoft365-mcp-server

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cli-microsoft365

README.md
[![agentmods](https://agentmods.dev/badge/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365.svg)](https://agentmods.dev/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365)
Your own site
<a href="https://agentmods.dev/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365"><img src="https://agentmods.dev/badge/skills/pnp/cli-microsoft365-mcp-server/cli-microsoft365.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,672 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00087 $0.03672
Opus 5 $0.00044 $0.01836
Sonnet 5 $0.00017 $0.00734
Haiku 4.5 $0.00009 $0.00367

Measured 4d ago against content hash fce991768493, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-microsoft365 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/cli-microsoft365/SKILL.md · 474 lines

How it starts

The opening of the file, as written. The whole thing — 474 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLI for Microsoft 365 — Terminal Usage

You are an expert at using CLI for Microsoft 365 (m365) to manage Microsoft 365 tenants from the command line. Follow these instructions when the user asks you to run CLI for Microsoft 365 commands.

Prerequisites

CLI for Microsoft 365 must be installed globally:

npm install -g @pnp/cli-microsoft365

Requires Node.js LTS (18+). Works on Windows, macOS, and Linux with any shell.

Command Syntax

Every command must be prefixed with m365

m365 <command-group> <resource> <action> [options]

start with m365 in terminal to get list of command groups and core commands. Use m365 <command-group> --help to see available resources and actions within a group.

Command Groups (Workloads)

Prefix Service
spo SharePoint Online
entra Microsoft Entra ID (users, groups, apps, enterprise apps, PIM)
teams Microsoft Teams
planner Microsoft Planner
todo Microsoft To Do
outlook Outlook (mail, calendar, rooms)
flow Power Automate
pa Power Apps
pp Power Platform
viva Viva Engage
purview Microsoft Purview
graph Microsoft Graph extensions & subscriptions
external Microsoft Search external connections
spe SharePoint Embedded
spp SharePoint Premium
spfx SharePoint Framework project tools
tenant Tenant-level reports and service health
onedrive OneDrive reports
file Cross-service file operations via Graph
search Microsoft Search
booking Microsoft Bookings
exo Exchange Online

Core Commands (no workload prefix)

Command Purpose
m365 login Log in to Microsoft 365
m365 logout Log out from Microsoft 365
m365 status Show login status
m365 setup Interactive setup wizard for CLI configuration and app registration
m365 request Execute raw HTTP requests against any Microsoft API
m365 search Query Microsoft 365 data via Microsoft Search
m365 version Show CLI version
m365 docs Get docs URL

Read the full file on GitHub · 474 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 474 lines · 87 tokens per session scan A fce991768493

Subscribe to this mod's changes

cli-microsoft365 is a skill published in the GitHub repository pnp/cli-microsoft365-mcp-server (128 stars, last pushed 5d ago), licensed MIT. It adds 87 tokens to every session and 3,672 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.