cli-microsoft365

Manage Microsoft 365 tenants and services from the terminal using the m365 CLI.

4|1|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/gtheys/pi-my-rifle-ext --skill cli-microsoft365
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-microsoft365
Source: https://github.com/gtheys/pi-my-rifle-ext/tree/main/skills/cli-microsoft365
Command: npx skills add https://github.com/gtheys/pi-my-rifle-ext --skill cli-microsoft365

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Administrators need to manage Microsoft 365 tenants and services from the terminal, reducing context-switching and enabling automation at scale.

Core Features & Use Cases

  • Unified command-line access to SharePoint Online, Entra ID, Teams, Planner, To Do, Outlook, Viva Engage, and Graph.
  • Quick authentication setup, session management, and scriptable workflows for repetitive admin tasks.
  • Use cases include bulk user provisioning, tenant configuration, and automated diagnostic checks.

Quick Start

Install the CLI globally, log in to your tenant, and start exploring commands with m365 help.

Frequently Asked Questions about cli-microsoft365

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Microsoft 365 tenants from the terminal?

You can manage Microsoft 365 tenants from the terminal by installing the m365 CLI globally, authenticating to your tenant, and executing commands for SharePoint Online, Entra ID, Teams, and Graph queries.

Can I automate bulk user provisioning in Entra ID using a command-line interface?

Yes, you can automate bulk user provisioning in Entra ID using the command-line interface by running scriptable workflows that handle repetitive administrative tasks across your Microsoft 365 tenant.

What services are supported for tenant management through the m365 CLI?

Tenant management through the m365 CLI supports SharePoint Online, Entra ID, Teams, Planner, To Do, Outlook, Viva Engage, and Microsoft Graph queries, enabling unified command-line access.

Do I need Node.js LTS to run commands for SharePoint Online automation?

Yes, you need Node.js LTS to run commands for SharePoint Online automation, as the workflow requires a global installation of the @pnp/cli-microsoft365 package and appropriate authentication setup.

What is the best way to reduce context-switching when configuring Microsoft 365 tenant settings?

The best way to reduce context-switching when configuring Microsoft 365 tenant settings is to use a unified command-line interface, which enables automation at scale and scriptable workflows for repetitive admin tasks.

How does session management work for automated Microsoft 365 diagnostic checks?

Session management for automated Microsoft 365 diagnostic checks works by establishing authentication login to your tenant once, allowing subsequent scriptable CLI commands to execute diagnostic workflows without repeated logins.