CLI for Microsoft 365 v5.9

CLI for Microsoft 365 v5.9

We’ve just published a new minor version of the CLI for Microsoft 365 with new commands for working with and managing Microsoft 365 and SharePoint Framework projects on any platform.

Manage Microsoft 365 and SharePoint Framework projects on any platform

CLI for Microsoft 365 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 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 use a Windows virtual machine to configure their tenants. With the CLI for Microsoft 365, you can configure your tenant no matter which operating system you use. Additionally, using CLI for Microsoft 365, you can manage your SharePoint Framework projects.

New version of CLI for Microsoft 365 – v5.9

Following our monthly release cadence, we’ve released a new version of the CLI for Microsoft 365 with some new capabilities. The month of October was no exception. We had a ton of improvements and new commands. Here are a few of the most noteworthy additions.

For the complete list of what’s new and changed, see the release notes.

Get information about the Power Platform cards

Just started playing around with the preview of Power Apps cards and you want to do some more automation? No worries, CLI for Microsoft 365 has got you covered. We stay up to date with the latest tools and added new commands to fetch your Power Apps cards information.

Get a Power Platform card in a specific environment based on name.

m365 pp card get --environment "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --name "CLI 365 Card"

List the Power Platform cards in a specific environment as admin.

m365 pp card list --environment "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --asAdmin

For more information, see the pp card get and the pp card list command documentation.

Improved permissions management in SharePoint Online

In our previous release we already introduced several new commands to manage permissions in SharePoint Online. We weren’t done yet, we still had some missing commands. The new release allows you to easily manage file role assignments, file role inheritance, folder role assignments, folder role inheritance, and last but not least listitem role assignments.

Remove a role assignment by upn from a file by url.

m365 spo file roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --fileUrl "/sites/contoso-sales/documents/Test1.docx" --upn "user1@contoso.onmicrosoft.com"

Reset inheritance of file by id.

m365 spo file roleinheritance reset --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileId "b2307a39-e878-458b-bc90-03bc578531d6"

Remove a role assignment from a folder based on the group name.

m365 spo folder roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl  "/Shared Documents/FolderPermission" --groupName "saleGroup"

For more information, see the spo file roleassignment remove, spo file roleinheritance reset, spo folder roleassignment remove and many more permission commands which you can find in the release note.

Lots of improvements to the documentation

This release also includes several improvements and new features to the CLI for Microsoft 365 documentation site. A whole of bunch of typos have been exterminated from existence, several headers have been corrected to be more aligned with all the other headers and much more. Like mentioned before, there are also a few new features added.

Are all the samples a bit overwhelming and is a bit confusing to find the correct one for you? The samples have been updated with tags which make it much easier to find. A modification has been made on the introduction page to showcase all the available tags.

CLI for Microsoft 365 samples introduction

We also made an improvement which is the start of something great. We will be updating all our command documentation to include the response output. A few commands have been updated already with their response, but there is still a lot of work left to include this for all other commands. This is where we need your help. We created a whole lot of issues to include the response output for several commands. If you feel like writing some documentation be sure to take a look at this response output epic issue.

CLI for Microsoft 365 output response

Of course we can not cover everything in this blog post, many more improvements have been made. Check out the release notes to get more insight.

Sending attachments with outlook

Another notable change is the update to the outlook mail send command. You are now able to add attachments to your emails.

Send an email with multiple attachments.

m365 outlook mail send --to chris@contoso.com --subject "Monthly reports" --bodyContents "Here are the reports of this month." --attachment "C:/Reports/File1.jpg" --attachment "C:/Reports/File2.docx" --attachment "C:/Reports/File3.xlsx"

For more information, see the outlook mail send command documentation.

Hacktoberfest, what a success!

Hacktoberfest was a great success! Thank you so much to all our active and new contributors for your hard work and to all the maintainers for creating so many good first issues.

What else

These features are just the tip of the ice berg of what we’ve shipped in this version. The code base of the CLI for Microsoft 365 has received a huge update as well, making it easier for maintainers and contributors to create new functionality. And so many other fixes. Check out the release notes for the complete list of what’s new and improved.

Contributors

This release wouldn’t be possible without the help of (in alphabetical order):

New contributors

A warm welcome to this month’s new contributors! (in alphabetical order):

Thank you all for the time you chose to spend on CLI for Microsoft 365 and for your help to advance it!

Work in progress

Here are some things that we’re currently working on.

CLI for Microsoft 365 v6

For the last few months we’ve been working on a new major version of CLI for Microsoft 365 – v6. This new major version will introduce several breaking changes. A few commands have been merged with their similar command to make the usage much easier. A lot of option names have been changed to be consistent and make it easier for you to use the CLI for Microsoft 365.

We are expecting to release CLI for Microsoft 365 v6 by the end of November 2022. Once the release of v6 is complete, we’ll publish an upgrade guidance to help you determine the impact of the upgrade on your work.

Include response output in the docs

We’re actively working on improving our documentation and adding response output to all our commands. This is a lot of work because we have a ton of commands. A few commands are already done to show an example of what we are trying to do but we are definitely looking for contributors to help us. If you feel like writing some documentation be sure to take a look at this response output epic issue.

New Teams commands to work with meetings

We’re working on a series of new commands to allow you to work with teams meetings. There’s a lot of work to be done here, so if you like to join in, you’re very welcome to checkout our Teams meetings epic issue.

More Power Platform commands in the making

We’re working on a series of new commands that will help manage Power Platform solutions, Dataverse, Power Platform settings, etc. There’s a lot of work to be done here, so if you like to join in, you’re very welcome to checkout our Power Platform epic issue.

Discussions

CLI for Microsoft 365 is constantly growing and evolving. We’re always looking for ways to improve. There are still many areas not covered by the CLI as well as many amazing ideas for unique features the tool might provide. Your feedback will help us make the right decisions in which areas we should focus on. If you want to help out please do join the currently open discussions

What else could we simplify? Let us know what you think by helping out with one of our open issues or chime in on our discussions!

Try it today

Get the latest release of CLI for Microsoft 365 from npm by executing:

npm i -g @pnp/cli-microsoft365

Alternatively, you can get the latest release from Docker by executing:

docker run --rm -it m365pnp/cli-microsoft365:latest

If you need more help getting started or want more details about the commands, architecture, or project, go to aka.ms/cli-m365. If you see any room for improvement, please, don’t hesitate to reach out to us either on GitHub, Discord, or Twitter.