8-Week Microsoft Teams AppDev Accelerator Program
Limited seats available! - Start date: Wednesday, April 16, 2025
Join Today & Save $1,000
articles

Manage SharePoint Online Site Collection App Catalogs with the CLI for Microsoft 365

In this webinar, hear MVP's Andrew Connell and MVP Waldek Mastykarz for a discussion and demonstration heavy webinar on the CLI for Microsoft 365.

Manage SharePoint Online Site Collection App Catalogs with the CLI for Microsoft 365
by Andrew Connell

Last updated March 28, 2025
4 minutes read

Share this

Focus Mode

  • Introducing the CLI for Microsoft 365
  • Manage SharePoint Site Collection App Catalogs with the CLI for Microsoft 365
  • References
  • Feedback & questions

Microsoft gives us a few options for managing our SharePoint Online environments. We can use the SharePoint Admin center, REST APIs, the CSOM and the SharePoint Online PowerShell. To fill the gaps, the SharePoint PnP group has created PowerShell cmdlets that cover additional tasks not covered by the Microsoft provided PowerShell. While these are good options, they aren’t very friendly to those who aren’t on the Windows platform. These two PowerShell options don’t leverage the cross-platform PowerShell, rather they are only available for the Windows platform.

Introducing the CLI for Microsoft 365

Office 365 CLI Renamed

The CLI for Microsoft 365 was formeraly knwon as the Office 365 CLI.

Late last year, fellow MVP Waldek Mastykarz & I started working on an effort to solve this with the CLI for Microsoft 365. This is natively cross-platform command line interface, similar to the Azure CLI, you can install this on any platform (Windows, MacOS or Linux) and manage your Office 365 investments from the command line. When it was initially introduced, many thought it was a Microsoft provided option, when in reality its 100% community driven and run through the SharePoint PnP group. Waldek gets most of the credit here… he did all the work of standing up the project and acts as the project manager addressing community contributions, pull requests, and publishing new versions.

Webinar - February 13, 2018: Introducing and Using the CLI for Microsoft 365 With MVP Waldek Mastykarz

Office 365 & SharePoint Online provide multiple management options. From the tenant to site level, developers and administrators can leverage browser-based administrative interfaces to perform many tasks. However, some tasks can only be implemented via an API or the command line.

The CLI for Microsoft 365, a cross-platform and community-driven project from the SharePoint PnP team, expands these command line tasks beyond the Windows platform and existing PowerShell options.

In this webinar, join MVP and long-time SharePoint developer Andrew Connell (AC) from Voitanos with MVP Waldek Mastykarz from Rencore for a 30-minute discussion and demonstration heavy webinar on the CLI for Microsoft 365.

At the present time the CLI for Microsoft 365 has commands for managing your SharePoint related Microsoft Entra ID tasks and many SharePoint Online tasks. While it’s still under development, the community is working hard to and more and more features with the goal of having 100% parity with the Microsoft provided SharePoint Online PowerShell module & PnP PowerShell module.

In this post I want to highlight on one capability I recently contributed to the CLI for Microsoft 365: managing site collection app catalogs .

Manage SharePoint Site Collection App Catalogs with the CLI for Microsoft 365

Late in 2017, Microsoft introduced a new capability in SharePoint Online: Site Collection App Catalogs! This allows you to deploy a customization that is only installable and thus usable within the site collection and not in other site collections in the tenant.

The site collection app catalogs aren’t created by default in your site collections, nor can you create them in the browser-based interface. Microsoft has provided cmdlets in the SharePoint Online PowerShell module for creating & removing app catalogs from site collections.

If you’re not on Windows (because the SharePoint Online PowerShell only works on Windows), or if you prefer a CLI approach over PowerShell, you can now use the CLI for Microsoft 365 to perform these tasks with two commands I contributed to the project.

Add Site Collection App Catalogs

You’ll first need to make sure the CLI for Microsoft 365 is installed on your machine. Verify this by running m365 from the command line. If you get an error, follow the steps here to get it installed.

Once you start the CLI for Microsoft 365, again by running m365 from the command line, you need to connect to your SharePoint Online tenant:

m365 login --authType password --userName [email protected] --password pass@word1

Then, to enable the site collection app catalog, use the spo site appcatalog add command:

m365 spo site appcatalog add --siteUrl https://voitanos.sharepoint.com/sites/some-site-collection

This process is fairly immediate so if you go back to your SharePoint Online site, navigate to the Site Contents library, you should see your app catalog!

Removing Site Collection App Catalogs

The CLI for Microsoft 365 also supports removing the app catalog… but you aren’t really removing anything. The naming is a bit misleading.

When you remove the app catalog, you are really just disabling it, telling SharePoint to no longer treat the app catalog as an app catalog. Behind the scenes, SharePoint just treats the library like a normal SharePoint document library.

Again, it’s pretty simple using the spo site appcatalog remove command:

m365 spo site appcatalog remove --siteUrl https://voitanos.sharepoint.com/sites/some-site-collection

That’s it!

References

Andrew Connell, Microsoft MVP, Full-Stack Developer & Chief Course Artisan - Voitanos LLC.
author
Andrew Connell

Microsoft MVP, Full-Stack Developer & Chief Course Artisan - Voitanos LLC.

Andrew Connell is a full stack developer who focuses on Microsoft Azure & Microsoft 365. He’s a 20+ year recipient of Microsoft’s MVP award and has helped thousands of developers through the various courses he’s authored & taught. Whether it’s an introduction to the entire ecosystem, or a deep dive into a specific software, his resources, tools, and support help web developers become experts in the Microsoft 365 ecosystem, so they can become irreplaceable in their organization.

Feedback & Questions

newsletter

Join 10,000+ developers for news & insights

No clickbait · 100% free · Unsubscribe anytime.

Subscribe to Andrew's newsletter for insights & stay on top of the latest news in the Microsoft 365 Space!
blurry dot in brand primary color
found this article helpful?

You'll love these!

State of SharePoint & Office 365 Customizations 2018 Survey

State of SharePoint & Office 365 Customizations 2018 Survey

January 23, 2018

Read now

Mastering SPFx Course January 2018 Update - Two New Chapters Published

Mastering SPFx Course January 2018 Update - Two New Chapters Published

January 22, 2018

Read now

Wrapping up 2017 at Voitanos and Charging into 2018!

Wrapping up 2017 at Voitanos and Charging into 2018!

December 29, 2017

Read now

bi-weekly newsletter

Join 10,000+ Microsoft 365 full-stack web developers for news, insights & resources. 100% free.

Subscribe to Andrew's newsletter for insights & stay on top of the latest news in the Microsoft 365 ecosystem!

No clickbait · 100% free · Unsubscribe anytime.

Subscribe to Andrew's newsletter for insights & stay on top of the latest news in the Microsoft 365 Space!