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.
<script src="https://asciinema.org/a/346365.js" id="asciicast-346365" async></script>The CLI for Microsoft 365 is distributed as an NPM package. To use it, install it globally using:
npm i -g @pnp/cli-microsoft365or using yarn:
yarn global add @pnp/cli-microsoft365Start managing the settings of your Microsoft 365 tenant by logging in to it, using the login command, for example:
m365 loginTo list all available commands, type in the CLI for Microsoft 365 prompt help:
m365 helpSee the User Guide to learn more about the CLI for Microsoft 365 and its capabilities.
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