Code Monkey home page Code Monkey logo

cli-microsoft365's Introduction

CLI for Microsoft 365
CLI for Microsoft 365

One CLI for Microsoft 365

GitHub Discord Twitter

npm @pnp/cli-microsoft365@latest npm @pnp/cli-microsoft365@next

CLI for Microsoft 365 helps you manage your Microsoft 365 tenant and SharePoint Framework projects.

Website | Features | Install | Usage | Build | Contribute

Sharing is Caring | Code of Conduct | Disclaimer

CLI for Microsoft 365

Features

  • Run on any OS
    • Linux
    • MacOS
    • Windows
  • Run on any shell
    • Azure Cloud Shell
    • bash
    • cmder
    • PowerShell
    • zsh
  • Unified login
    • Access all your Microsoft 365 workloads
  • Supported workloads
    • Azure Active Directory
    • Microsoft Teams
    • Microsoft To Do
    • OneDrive
    • Outlook
    • Planner
    • Power Automate
    • Power Apps
    • Skype for Business
    • SharePoint Online
    • Yammer
  • Supported authentication methods
    • Azure Managed Identity
    • Certificate
    • Client Secret
    • Device Code
    • Username and Password
  • Manage your SharePoint Framework projects
    • Uprade your projects
    • Check your environment compatibility

Follow our Twitter account to keep yourself updated about new features, improvements, and bug fixes.

Install

To install this CLI, you will need node >= 8.0.0 installed.

npm install -g @pnp/cli-microsoft365
Install beta version β
npm install -g @pnp/cli-microsoft365@next
Alternate package managers 🧶

yarn

yarn global add @pnp/cli-microsoft365

npx

npx @pnp/cli-microsoft365
Run CLI for Microsoft 365 in a Docker container 🐳
docker run --rm -it m365pnp/cli-microsoft365:latest

Checkout our guide to learn more about how to run CLI for Microsoft 365 using Docker

Usage

Use the login command to start the Device Code login flow to authenticate with your Microsoft 365 tenant.

m365 login

On your first login you will be asked to consent to several permissions that the PnP Management Shell multi-tenant app requires for the commands to work successfully against your tenant. If you want to create your own identity to use with the CLI, refer to the Using your own Azure AD Identity guide.

For alternative authentication methods and usage, refer to the login command documentation

List all commands using the global --help option.

m365 --help

Get command information and example usage using the global --help option.

m365 spo site get --help

Execute a command and output response as JSON.

m365 spo site get --url https://contoso.sharepoint.com

Filter responses and return custom objects using JMESPath queries using the global --query option.

m365 spo site list --query '[?Template==`GROUP#0`].{Title:Title, Url:Url}'

Execute a command and output response as text using the global --output option.

m365 spo site get --url https://contoso.sharepoint.com --output text

For more examples and usage, refer to the command and sample scripts documentation.

Build

To build and run this CLI locally, you will need node >= 16.0.0 installed.

# Clone this repository
$ git clone https://github.com/pnp/cli-microsoft365

# Go into the repository
$ cd cli-microsoft365

# Install dependencies
$ npm install

# Build the CLI
$ npm run build

# Symlink your local CLI build
$ npm link

When you execute any m365 command from the terminal, it will now use your local clone of the CLI.

Contribute

We love to accept contributions.

If you want to get involved with helping us grow the CLI, whether that is suggesting or adding a new command, extending an existing command or updating our documentation, we would love to hear from you.

Checkout our Wiki for guides on how to contribute to this project.

Need Help?

Join our community

Discord

Microsoft 365 Platform Community

CLI for Microsoft 365 is a Microsoft 365 Platform Community (PnP) project. Microsoft 365 Platform Community is a virtual team consisting of Microsoft employees and community members focused on helping the community make the best use of Microsoft products. CLI for Microsoft 365 is an open-source project not affiliated with Microsoft and not covered by Microsoft support. If you experience any issues using the CLI, please submit an issue in the issues list.

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

telemetry

cli-microsoft365's People

Contributors

waldekmastykarz avatar plamber avatar nicodecleyre avatar milanholemans avatar nanddeepn avatar martinlingstuyl avatar adam-it avatar mathijsverbeeck avatar appieschot avatar garrytrinder avatar velingeorgiev avatar jwaegebaert avatar rabwill avatar arjunumenon avatar abderahman88 avatar sprider avatar estruyf avatar smitanachan avatar aakashbhardwaj619 avatar ktskumar avatar vipulkelkar avatar phawrylak avatar michaelmaillot avatar ypcode avatar reshmee011 avatar veronicageek avatar arjenbloemsma avatar clientbala avatar yannickre avatar baywet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.