June 30th, 2020

Office 365 CLI available in Azure Cloud Shell

We’re proud to announce, that as of today, Office 365 CLI is available by default in Azure Cloud Shell.

Office 365 CLI in Azure Cloud Shell

Manage Microsoft 365 and SharePoint Framework projects on any platform

Office 365 CLI is a cross-platform CLI that allows you to manage various configuration settings of Microsoft 365 and SharePoint Framework projects no matter which operating system or shell you use.

While building solutions for Microsoft 365 expands beyond the Windows operating system, managing many of the platform settings is possible only through PowerShell on Windows. As more and more users work on non-Windows machines, it’s inconvenient for them to have to use a Windows virtual machine to configure their tenants. With the Office 365 CLI, you can configure your tenant no matter which operating system you use. Additionally, using Office 365 CLI, you can manage your SharePoint Framework projects.

Azure Cloud Shell

Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources. It provides the flexibility of choosing the shell experience that best suits the way you work, either Bash or PowerShell.

Office 365 CLI in Azure Cloud Shell

Recently, Office 365 CLI was added to the set of tools available in Azure Cloud Shell. If you have access to the Azure Portal you can now start Office 365 CLI directly from the browser without having to install it or its dependencies yourself.

To start using Office 365 CLI in Azure Cloud Shell, sign in to Microsoft 365, either using your managed identity, by executing:

o365 login --authType identity

or using the standard Office 365 CLI Azure AD app, by executing:

o365 login

Confirm that you’re signed in, by executing:

o365 status

After you signed in, you can start managing your tenant. For more information about supported commands and sample scripts, see the Office 365 CLI documentation at aka.ms/o365cli.

We hope that you find having Office 365 CLI available at your fingertips in Azure Cloud Shell helpful and we’d love to hear from you if you have any feedback or ideas for improvement.

We’d like to thank the Azure Cloud Shell team for great collaboration and making this possible.

Author

We coordinate the Microsoft 365 Patterns and Practices (PnP) open-source and community activities.