{"schemaVersion":"opencli.cli.v1","slug":"m365","name":"Microsoft 365 CLI","shortName":"m365","binaryName":"m365","maker":{"slug":"microsoft","name":"Microsoft","type":"org","url":"https://microsoft.com","officialPlatformMaker":true,"featuredBuilder":false},"category":"Productivity","description":"The official CLI from Microsoft. Microsoft 365, sharepoint, and teams automation from the terminal. Supports structured output — good for scripts and agents.","tagline":"Microsoft 365, sharepoint, and teams automation from the terminal.","install":{"packageManager":"npm","command":"npm install -g @pnp/cli-microsoft365","packageName":null,"npmPackage":null,"brewFormula":null,"brewCask":null,"crateName":null,"pypiPackage":null,"goPackage":null,"dockerImage":null},"verify":{"command":"m365 status","signal":"Shows Microsoft 365 CLI login status."},"quickStart":"m365 status","exampleWorkflow":["m365 status"],"agent":{"readiness":{"label":"Great for agents","score":75,"reasons":["Structured output is available for parsing.","Supports non-interactive/scripted use.","Works well in CI or repeatable automation."],"guardrails":["Verify identity/account before running task commands.","Network access is required; avoid leaking secrets in logs.","Require confirmation before apply, delete, deploy, transfer, merge, or write actions."]},"packUrl":"https://opencli.co/cli/m365/agent.md","packMarkdown":"# OpenCLI Agent Pack: Microsoft 365 CLI\n\nUse this when an AI agent needs to work with `m365`.\n\n## What this CLI is for\nThe official CLI from Microsoft. Microsoft 365, sharepoint, and teams automation from the terminal. Supports structured output — good for scripts and agents.\n\nBest for: microsoft 365, sharepoint, and teams automation from the terminal.\n\n## Agent readiness\nGreat for agents (75/100)\n- Structured output is available for parsing.\n- Supports non-interactive/scripted use.\n- Works well in CI or repeatable automation.\n\n## Install\n```sh\nnpm install -g @pnp/cli-microsoft365\n```\n\n## Verify before real work\n```sh\nm365 status\n```\nExpected signal: Shows Microsoft 365 CLI login status.\n\n## Safe starting commands\n```sh\nm365 status\n```\n\n## Guardrails for agents\n- Verify identity/account before running task commands.\n- Network access is required; avoid leaking secrets in logs.\n- Require confirmation before apply, delete, deploy, transfer, merge, or write actions.\n\n## Suggested agent instruction\nYou may use Microsoft 365 CLI (`m365`) for microsoft 365, sharepoint, and teams automation from the terminal.. First install it if missing, then run the verify command. Start with read-only or inspection commands. Summarize what you found before changing anything. Ask for confirmation before commands that mutate remote state, spend money, deploy, delete data, merge code, or expose secrets.\n\nSource: OpenCLI\n"},"fit":{"bestFor":"microsoft 365, sharepoint, and teams automation from the terminal.","useThisIf":"You want productivity workflows you can script with structured output.","skipIf":"You're not comfortable with a tool that can write to production.","whatHappensNext":"Run `m365 status` and see what comes back."},"capabilities":{"agentFriendly":true,"supportsJsonOutput":true,"supportsNonInteractive":true,"supportsDryRun":false,"requiresAuth":true,"requiresNetwork":true,"ciFriendly":true,"localFirst":false,"destructivePotential":"high"},"taxonomy":{"useCases":["Microsoft 365","SharePoint","Teams automation"],"aliases":[],"keywords":["microsoft 365","sharepoint","teams"],"tags":[]},"links":{"website":"https://pnp.github.io/cli-microsoft365/","github":"https://github.com/pnp/cli-microsoft365","docs":"https://pnp.github.io/cli-microsoft365/cmd/login/login/","opencli":"https://opencli.co/cli/m365","markdown":"https://opencli.co/cli/m365/agent.md","json":"https://opencli.co/cli/m365.json"},"metrics":{"githubStars":1358,"latestRelease":"2026-06-08T06:03:05Z","license":"MIT","metricLabel":"npm weekly downloads","metricValue":18342,"metricSource":"npm","metricAsOf":"2026-06-08T11:01:07.299Z"}}