Skip to content

CLI for Microsoft 365

Using the CLI for Microsoft 365, you can manage your Microsoft 365 tenant and SharePoint Framework projects on any platform. No matter if you are on Windows, macOS or Linux, using Bash, Cmder or PowerShell, using the CLI for Microsoft 365 you can configure Microsoft 365, manage SharePoint Framework projects and build automation scripts.

Installation

The CLI for Microsoft 365 is distributed as an NPM package. To use it, install it globally using:

npm i -g @pnp/cli-microsoft365

or using yarn:

yarn global add @pnp/cli-microsoft365

Getting started

Start managing the settings of your Microsoft 365 tenant by logging in to it, using the login command, for example:

m365 login

To list all available commands, type in the CLI for Microsoft 365 prompt help:

m365 help

See the User Guide to learn more about the CLI for Microsoft 365 and its capabilities.

Microsoft 365 Patterns and Practices

CLI for Microsoft 365 is an open-source project driven by the Microsoft 365 Patterns and Practices initiative. The project is built and managed publicly on GitHub at https://github.com/pnp/cli-microsoft365 and accepts community contributions. We would encourage you to try it and tell us what you think. We would also love your help! We have a number of feature requests that are a good starting point to contribute to the project.

“Sharing is caring”

Microsoft 365 Patterns and Practices team