Office 365 CLI v1.0.0

We have just published the v1.0.0 of the Office 365 CLI with even more commands for managing Office 365 tenants on any platform.

Manage Office 365 on any platform

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

While building solutions for Office 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.

New version of Office 365 CLI - v1.0.0

Continuing the effort on extending the CLI, we bring you a new version with new commands for both SharePoint and Office 365 and this time as the v1.0.0 milestone. When we started working on the CLI, we aimed for the v1.0.0 to be stable and have wrinkles ironed out. Over the past few months we adjusted our course where necessary and so far we didn't have any big blockers. Based on the great feedback we had so far, we decided, that there was no reason to wait any longer with releasing v1.0.0.

Support for the Microsoft Graph

From the very beginning, we wanted the Office 365 CLI to offer as broad set of capabilities as possible connecting to the different services in Office 365. Many developers are familiar with SharePoint and its rich APIs, but there are more capabilities available in Office 365 that can be used to build rich business solutions. In this release, we switched to using a custom Azure AD application, which allows us to connect to all Office 365 services including the Microsoft Graph.

For the first set of commands based on the Microsoft Graph, we chose the management of Office 365 Groups. Groups are one of the fundamental building blocks in Office 365 that bring together a number of collaboration capabilities giving Office 365 users a single place to work.

Using the Office 365 CLI you can easily get information about existing Office 365 Groups, update their properties or create new ones. To create a new Office 365 Group for example, you would run:

graph o365group add --displayName Finance --description 'Latest news, posts and files about Contoso Finance' --mailNickname finance

For more information and examples of managing Office 365 Groups using the Office 365 CLI, see the documentation at You can expect to see more commands using the Microsoft Graph in the future.

Site designs

Site designs are the new way organizations can build custom site templates in Office 365. Using site designs, they can align with the preferred look and feel and structure as defined in the organizational information architecture.

In the previous version of the Office 365 CLI, we added the first set of commands to manage site designs. In this version, we added the spo sitedesign set command to update existing site designs. For example, to change the title of a site design, you would execute:

spo sitedesign set --id 9b142c22-037f-4a7f-9017-e9d8c0e34b98 --title 'Contoso site design'

For more information and examples of managing site designs using the Office 365 CLI, see the documentation at


Features come and go, but SharePoint lists are one that have been around for a long time and are very likely to stay. Used to store everything from user data to configuration information for SharePoint customizations, lists are one of the basic building blocks found in every SharePoint tenant.

In this release, Robert Schouten from Wortell continued his work, delivering more commands for managing SharePoint lists. Thanks to his effort, we can now add, update and delete lists.

For example, to create a new Announcements lists, you would execute:

spo list add --title Announcements --baseTemplate Announcements --webUrl

For more information and examples of managing SharePoint lists using the Office 365 CLI, see the documentation at


We are on the verge of big changes to how organizations implement information architecture in SharePoint and Office 365 and which building blocks they use to facilitate collaboration. Where in the past, you would frequently see hierarchical structures with a site collection and many subsites, nowadays you could consider using separate site collections, which in the future will be connected by hub sites to serve as the central location where the information from connected sites comes together. Still, today many organizations use subsites and we wanted the CLI to help you manage them, whether it's for your daily operations or preparations for migrations.

Balamurugan Kailasam contributed two commands that you can use to create and delete subsites. Paul Keijzers from Wortell chimed in contributing the command to list existing subsites.

To see the existing subsites in your site collection, you would execute:

spo web list --webUrl

For more information and examples of managing SharePoint lists using the Office 365 CLI, see the documentation at

Custom actions

Custom actions have been a versatile capability for extending SharePoint for a while now. In the past, we would use custom actions for extending the ribbon, adding options to context menus or injecting scripts and manipulating DOM. While Microsoft recommends nowadays different patterns to achieve similar results, custom actions still have their place in extending SharePoint.

When working with custom actions, you might end up in a situation, where you need to revert all your changes and restore the site to its original state. Rather than removing custom actions one by one, you can use the spo customaction clear command contributed by Velin Georgiev and remove all of them in a single operation.

spo customaction clear --url

For more information and examples of managing custom actions using the Office 365 CLI, see the documentation at


One of the fundamental building blocks in SharePoint are site collections. A while ago already, Microsoft started modernizing site collections and their architecture to open up new scenarios and help users work more efficiently no matter if they are on the desktop or on a mobile device.

In this release of the Office 365 CLI, we continued our work on site-related commands and added commands to create and update classic sites as well as update modern sites.

For example, to update modern site's classification, you would execute:

spo site set --url --classification MBI

For more information and examples of managing site collections using the Office 365 CLI, see the documentation at

Property bag

If you build a SharePoint solution and need to store configuration data in a place where it cannot be easily modified by end-users, property bag is a very convenient location to use.

Velin Georgiev did a great job contributing two commands that allow you to list all properties from the property bag or get a value of a specific property, which is very useful when building scripts.

To see what properties are set in the property bag and what their values are, execute:

spo propertybag list --webUrl

Velin is currently working on more commands related to managing property bag values, which we should see in the future versions of the Office 365 CLI.

For more information and examples of managing site collections using the Office 365 CLI, see the documentation at


When managing your tenant, you might need to perform some operations on files. Before you do, you need to find out what files are there for you to work with. For this release, Robert Schouten contributed a command that allows you to list all files in the specified folder. For example, to see all files in the Shared Documents library, execute:

spo file list --webUrl --folder 'Shared Documents'

Tenant app catalog

With the recent release of SharePoint ALM APIs and tenant properties, the location of the tenant app catalog plays crucial role in any kind of automation you would do in your tenant. Whether it's for setting tenant properties, adding new solution packages to the app catalog or deploying them in your tenant, you have to know the URL of your tenant app catalog.

For this release, Balamurugan Kailasam contributed a command that allows you to get the URL of the tenant app catalog in your Office 365 tenant. To get the URL of your tenant app catalog, execute:

spo tenant appcatalogurl get

SharePoint docs

We all love building new things. But if no one knows about them or understands how they work, there's little use for them.

From the very beginning, we knew, that proper documentation is essential if we want people to use the Office 365 CLI. For each command we added to the CLI, we included help with examples and relevant links both inside the CLI as well as on the web at No matter if you're working with the CLI or just searching for a way to solve your problem, we want you to be able to find the relevant information about using the CLI as quickly as possible.

We don't assume that everybody knows about the Office 365 CLI. It's still a relatively new initiative and while we continuously reach more and more people, we're barely scratching the surface. This is why, next to publishing our own documentation, we also try to include the relevant references to using the Office 365 CLI in other places where we know people are looking for information.

This last release, Andrew Connell from Voitanos and Velin Georgiev did awesome work submitting pull requests to the official SharePoint documentation extending it with information how to accomplish common configuration tasks using the Office 365 CLI. We hope, that these additions will make it easier for users who want to use the CLI to manage Office 365, to find the information they are looking for.

User guide

As the Office 365 CLI grew, we extended its documentation on the web with details how the relevant pieces are implemented. We needed to get this information out of our heads and have a central place to point people to in case they had any questions.

The way the Office 365 CLI works is seemingly straight-forward. You install it, start it, connect to your tenant and use the commands to manage its settings. And yet, there are many users who don't work with Node packages daily or just wonder how things work. For them we decided to publish a user guide that takes you step-by-step from acquiring the CLI to keeping it up to date, managing connections to selecting the output mode relevant to your use case. It's great to see, that the user guide is one of the most visited areas of the documentation we published. If you feel we could improve anything, please, don't hesitate to reach out, either on gitter or on GitHub.

Web casts

Office 365 101

None of the advanced features make sense, if you don't master the basics. To help people get started using the Office 365 CLI, Vesa Juvonen - Senior Program Manager in SharePoint engineering, and I recorded a webcast introducing the Office 365 CLI, the idea behind it and walking you through the first steps of installing, starting and connecting the CLI to your Office 365 tenant.

Office 365 CLI for admins

Many administrators managing Office 365 use command-line tools to do their daily work. They use them to automate repeatable tasks but also to perform different tasks from a single UI without having to navigate between the different locations in the web UI.

Ben Stegink and Scott Hoag are hosts of the MS Cloud IT Pro podcast where every week they discuss Office 365 and Azure from the IT Pro and end user perspective. They invited me to talk about the Office 365 CLI, what the idea behind it is and how it fits the existing landscape. It's been a great pleasure to join their show and talk to the IT Pro audience. You can find the recording on their website at

Automate SharePoint Framework solutions with the Office 365 CLI

With the recent release of the SharePoint ALM APIs, Microsoft opened up a number of new automation scenarios for SharePoint add-ins and SharePoint Framework solutions.

Fellow-SharePoint MVP, Andrew Connell and I talked about how developers building solutions on the SharePoint Framework can benefit of the Office 365 CLI. We went through a number of different scenarios: from simple things like enabling the Office 365 CDN in your tenant, to a fully automated deployment of the solution package fully integrated with the SharePoint Framework gulp tasks. You can find the recording on the Voitanos website.


I'm very impressed with the amount of work we've done this last release and thankful for all the contributions and opportunities we had to move the Office 365 CLI forward.

This release wouldn't be possible without the help of (in alphabetical order) Andrew Connell, Velin Georgiev, Scott Hoag, Balamurugan Kailasam, Paul Keijzers, Robert Schouten and Ben Stegink.

Once again, thank you all for the time you chose to spend on the Office 365 CLI and your help to advance it. It's a real pleasure to work with you.


comments powered by Disqus