CLI for Microsoft 365 v3.13

Published Aug 30 2021 11:35 PM 1,182 Views
Microsoft

banner-cli-m365.png

 

We've just published a new version of the CLI for Microsoft 365 with new commands for working with and managing Microsoft 365 tenants 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 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 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 – v3.13

Following our monthly release cadence, we’ve released a new version of the CLI for Microsoft 365 with some new capabilities. Here are a few of the most noteworthy additions.

 

Upgrade SharePoint Framework projects to SPFx v1.13 preview

Recently, Microsoft released a new preview version of the SharePoint Framework - v1.13. This version of SPFx, introduces new exciting capabilities for extending Viva Connections using Adaptive Card Extensions.

 

To help you try these capabilities in your projects, we extended CLI for Microsoft 365 with support for upgrading your existing SharePoint Framework projects to SharePoint Framework v1.13.0-beta.17.

 

To upgrade your SPFx project to this preview version, change the working directory to your project and execute:

m365 spfx project upgrade --preview --output md > report.md

 

We'd also recommend that you try a richer upgrade report based on the Visual Studio Code CodeTour extension:

m365 spfx project upgrade --preview --output tour

For more information about upgrading SharePoint Framework projects, see the CLI documentation.

 

Login with client ID and secret

When using CLI for Microsoft 365 in unattended scenarios, like building monitoring solutions or long-running automations, it's recommended that you login to Microsoft 365 using a certificate. If for some reason you're unable to do that, you can now fallback to logging in using a client ID and secret registered with your custom Azure Active Directory application.

 

To login to Microsoft 365 using client ID and secret, execute:

m365 login --authType secret --secret topSeCr3t@007

 

For more information about the different abilities to login to Microsoft 365 with CLI for Microsoft 365 see the documentation.

 

Retrieve apps installed in a SharePoint site

A part of governance of every Microsoft 365 tenant is keeping track of which applications are installed where in the tenant. Since Microsoft 365 doesn't provide this information readily for you, it's a common scenario for automation scripts to scan all sites in the tenant and retrieve this information periodically.

 

In this version of CLI for Microsoft 365, we introduced a new command for retrieving the list of apps installed in the given site. To retrieve the list of installed apps, execute:

m365 spo app instance list --siteUrl https://contoso.sharepoint.com/sites/site1

 

For more information about managing apps with the CLI for Microsoft 365, see the documentation.

 

Add one or more users to a SharePoint group

Permission management is one of the core activities of every Microsoft 365 tenant admin. Whenever someone joins or leaves the organization or switches jobs, they need to adjust permissions in the tenant to reflect this change. There are many ways to implement permissions in Microsoft 365. One way is to add users to SharePoint groups.

 

In this version of CLI for Microsoft 365 we introduced a command to add one or more users to a SharePoint group. To add users to a SharePoint group, execute:

m365 spo group user add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "Alex.Wilber@contoso.com"

 

For more information about managing users in SharePoint groups, see the documentation.

 

Manage application permissions for SharePoint sites

When building applications, one of the common requirements is to grant these applications access to information stored in SharePoint. Typically though, applications should only have access to information stored in specific sites rather than the whole tenant. To support this need, recently Microsoft released a new set of permissions that allow you to grant an application access to a specific site.

 

In the previous versions of CLI for Microsoft 365 we introduced support for managing application permissions for SharePoint sites. In this version, we extend the support with removing application permissions. To remove an application permission from the specific site, execute:

m365 spo site apppermission remove --siteUrl https://contoso.sharepoint.com/sites/project-x --appDisplayName "My app"

 

For more information about managing application permissions for SharePoint sites, see the documentation.

 

Retrieve information about a Microsoft Planner plan

In the previous versions of CLI for Microsoft 365, we introduced support for managing Microsoft Planner plans. In this version, we extended it, with retrieving the information about a specific plans. To retrieve it, execute:

m365 planner plan get --title "MyPlan" --ownerGroupName "My Planner Group"

 

For more information about managing Microsoft Planner plans, see the documentation.

 

New script samples

CLI for Microsoft 365 is a great tool both for quick adjustments to the configuration of your Microsoft 365 tenant as well as automating more complex tasks. Because CLI for Microsoft 365 is cross-platform you can use it on any OS and in any shell. To help you get started using the CLI for Microsoft 365 for automation scenarios, we started gathering some sample scripts.

 

If you have any scripts that you use frequently, please share them with us so that we can learn more about the common automation scenarios.

 

Share social champions to Teams

This sample script shows how to retrieve activities for SharePoint Online, Teams and Yammer and shares the top 3 contributors for each category as an adaptive card to the specified webhook url.

 

Recognize most active users for a specific Team

This sample script shows how to retrieve all activities for a specific Microsoft Teams Team and shares the top 3 contributors based on their score as an adaptive card to the specified webhook url.

 

Contributors

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

Thank you all for your help and effort to improve CLI for Microsoft 365 for our users.

Work in progress

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

 

CLI for Microsoft 365 v4

For the last few months we've been working on a new major version of CLI for Microsoft 365 - v4. The v4 release is a result of the evolution of the CLI over time. We planned it, to improve the consistency of the CLI and make it more intuitive to use. Some changes required us to introduce breaking changes, which is why we'll be releasing a new major version. Along with these changes, v4 will contain new and improved commands, just as we ship them in each release.

 

CLI for Microsoft 365 v3.13 is the last v3.x version of the CLI. Starting with our next monthly release, scheduled for the end of September, we will start releasing v4.x versions. v3.13, as well as all previous versions, will remain available and working, but won't be updated, which is why we recommend that you upgrade to v4. Along with the release, we'll publish an upgrade guidance to help you determine the impact of the upgrade on your work.

 

More commands, what else

Microsoft 365 is evolving and new capabilities are being released every day. With CLI for Microsoft 365, we aim to help you manage your tenant on any platform in a consistent way, no matter which part of Microsoft 365 you interact with. While we keep adding new commands to CLI for Microsoft 365 each release, we still barely scratched the surface with what’s possible in Microsoft 365. In the upcoming versions of the CLI for Microsoft, you can expect us to add more commands across the different workloads in Microsoft 365.

 

Script examples

In every release of the CLI for Microsoft 365, we introduce new commands for managing Microsoft 365. With over 350 commands across the different Microsoft 365 services, the CLI for Microsoft 365 has become a powerful tool, not just for managing your tenant but also for automating your daily work.

 

We’d love to show you how you can use the CLI for Microsoft 365 to build automation scripts in PowerShell Core and Bash. If you have any scripts using SPO or PnP PowerShell that you use frequently, please share them with us so that we can learn more about the common automation scenarios.

 

Try it today

Get the latest release of the 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, the architecture or the 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 or twitter.

%3CLINGO-SUB%20id%3D%22lingo-sub-2701414%22%20slang%3D%22en-US%22%3ECLI%20for%20Microsoft%20365%20v3.13%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2701414%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22banner-cli-m365.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F262560i2113F3468D19AC83%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22banner-cli-m365.png%22%20alt%3D%22banner-cli-m365.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe've%20just%20published%20a%20new%20version%20of%20the%20CLI%20for%20Microsoft%20365%20with%20new%20commands%20for%20working%20with%20and%20managing%20Microsoft%20365%20tenants%20and%20SharePoint%20Framework%20projects%20on%20any%20platform.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--357154127%22%20id%3D%22toc-hId--357154122%22%3EManage%20Microsoft%20365%20and%20SharePoint%20Framework%20projects%20on%20any%20platform%3C%2FH2%3E%0A%3CP%3ECLI%20for%20Microsoft%20365%20is%20a%20cross-platform%20CLI%20that%20allows%20you%20to%20manage%20various%20configuration%20settings%20of%20Microsoft%20365%20and%20SharePoint%20Framework%20projects%20no%20matter%20which%20operating%20system%20or%20shell%20you%20use.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhile%20building%20solutions%20for%20Microsoft%20365%20expands%20beyond%20the%20Windows%20operating%20system%2C%20managing%20many%20of%20the%20platform%20settings%20is%20possible%20only%20through%20PowerShell%20on%20Windows.%20As%20more%20and%20more%20users%20work%20on%20non-Windows%20machines%2C%20it%E2%80%99s%20inconvenient%20for%20them%20to%20have%20to%20use%20a%20Windows%20virtual%20machine%20to%20configure%20their%20tenants.%20With%20the%20CLI%20for%20Microsoft%20365%2C%20you%20can%20configure%20your%20tenant%20no%20matter%20which%20operating%20system%20you%20use.%20Additionally%2C%20using%20CLI%20for%20Microsoft%20365%2C%20you%20can%20manage%20your%20SharePoint%20Framework%20projects.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-2130358706%22%20id%3D%22toc-hId-2130358711%22%3ENew%20version%20of%20CLI%20for%20Microsoft%20365%20%E2%80%93%20v3.13%3C%2FH2%3E%0A%3CP%3EFollowing%20our%20monthly%20release%20cadence%2C%20we%E2%80%99ve%20released%20a%20new%20version%20of%20the%20CLI%20for%20Microsoft%20365%20with%20some%20new%20capabilities.%20Here%20are%20a%20few%20of%20the%20most%20noteworthy%20additions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1474047116%22%20id%3D%22toc-hId--1474047111%22%3EUpgrade%20SharePoint%20Framework%20projects%20to%20SPFx%20v1.13%20preview%3C%2FH3%3E%0A%3CP%3ERecently%2C%20Microsoft%20released%20a%20new%20%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fen-us%2Fsharepoint%2Fblogs%2Fannouncing-public-preview-of-sharepoint-framework-1-13-with-viva-connections-extensibility%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Epreview%20version%20of%20the%20SharePoint%20Framework%20-%20v1.13%3C%2FA%3E.%20This%20version%20of%20SPFx%2C%20introduces%20new%20exciting%20capabilities%20for%20extending%20Viva%20Connections%20using%20Adaptive%20Card%20Extensions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20help%20you%20try%20these%20capabilities%20in%20your%20projects%2C%20we%20extended%20CLI%20for%20Microsoft%20365%20with%20support%20for%20upgrading%20your%20existing%20SharePoint%20Framework%20projects%20to%20SharePoint%20Framework%20v1.13.0-beta.17.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20upgrade%20your%20SPFx%20project%20to%20this%20preview%20version%2C%20change%20the%20working%20directory%20to%20your%20project%20and%20execute%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Em365%20spfx%20project%20upgrade%20--preview%20--output%20md%20%26gt%3B%20report.md%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe'd%20also%20recommend%20that%20you%20try%20a%20richer%20upgrade%20report%20based%20on%20the%20Visual%20Studio%20Code%20CodeTour%20extension%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Em365%20spfx%20project%20upgrade%20--preview%20--output%20tour%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EFor%20more%20information%20about%20upgrading%20SharePoint%20Framework%20projects%2C%20see%20the%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fcmd%2Fspfx%2Fproject%2Fproject-upgrade%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ECLI%20documentation%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1013465717%22%20id%3D%22toc-hId-1013465722%22%3ELogin%20with%20client%20ID%20and%20secret%3C%2FH3%3E%0A%3CP%3EWhen%20using%20CLI%20for%20Microsoft%20365%20in%20unattended%20scenarios%2C%20like%20building%20monitoring%20solutions%20or%20long-running%20automations%2C%20it's%20recommended%20that%20you%20login%20to%20Microsoft%20365%20using%20a%20certificate.%20If%20for%20some%20reason%20you're%20unable%20to%20do%20that%2C%20you%20can%20now%20fallback%20to%20logging%20in%20using%20a%20client%20ID%20and%20secret%20registered%20with%20your%20custom%20Azure%20Active%20Directory%20application.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20login%20to%20Microsoft%20365%20using%20client%20ID%20and%20secret%2C%20execute%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Em365%20login%20--authType%20secret%20--secret%20topSeCr3t%40007%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20about%20the%20different%20abilities%20to%20login%20to%20Microsoft%20365%20with%20CLI%20for%20Microsoft%20365%20see%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fcmd%2Flogin%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ethe%20documentation%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--793988746%22%20id%3D%22toc-hId--793988741%22%3ERetrieve%20apps%20installed%20in%20a%20SharePoint%20site%3C%2FH3%3E%0A%3CP%3EA%20part%20of%20governance%20of%20every%20Microsoft%20365%20tenant%20is%20keeping%20track%20of%20which%20applications%20are%20installed%20where%20in%20the%20tenant.%20Since%20Microsoft%20365%20doesn't%20provide%20this%20information%20readily%20for%20you%2C%20it's%20a%20common%20scenario%20for%20automation%20scripts%20to%20scan%20all%20sites%20in%20the%20tenant%20and%20retrieve%20this%20information%20periodically.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20version%20of%20CLI%20for%20Microsoft%20365%2C%20we%20introduced%20a%20new%20command%20for%20retrieving%20the%20list%20of%20apps%20installed%20in%20the%20given%20site.%20To%20retrieve%20the%20list%20of%20installed%20apps%2C%20execute%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Em365%20spo%20app%20instance%20list%20--siteUrl%20https%3A%2F%2Fcontoso.sharepoint.com%2Fsites%2Fsite1%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20about%20managing%20apps%20with%20the%20CLI%20for%20Microsoft%20365%2C%20see%20the%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fcmd%2Fspo%2Fapp%2Fapp-instance-list%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Edocumentation%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1693524087%22%20id%3D%22toc-hId-1693524092%22%3EAdd%20one%20or%20more%20users%20to%20a%20SharePoint%20group%3C%2FH3%3E%0A%3CP%3EPermission%20management%20is%20one%20of%20the%20core%20activities%20of%20every%20Microsoft%20365%20tenant%20admin.%20Whenever%20someone%20joins%20or%20leaves%20the%20organization%20or%20switches%20jobs%2C%20they%20need%20to%20adjust%20permissions%20in%20the%20tenant%20to%20reflect%20this%20change.%20There%20are%20many%20ways%20to%20implement%20permissions%20in%20Microsoft%20365.%20One%20way%20is%20to%20add%20users%20to%20SharePoint%20groups.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20version%20of%20CLI%20for%20Microsoft%20365%20we%20introduced%20a%20command%20to%20add%20one%20or%20more%20users%20to%20a%20SharePoint%20group.%20To%20add%20users%20to%20a%20SharePoint%20group%2C%20execute%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Em365%20spo%20group%20user%20add%20--webUrl%20https%3A%2F%2Fcontoso.sharepoint.com%2Fsites%2FSiteA%20--groupId%205%20--userName%20%22Alex.Wilber%40contoso.com%22%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20about%20managing%20users%20in%20SharePoint%20groups%2C%20see%20the%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fcmd%2Fspo%2Fgroup%2Fgroup-user-add%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Edocumentation%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--113930376%22%20id%3D%22toc-hId--113930371%22%3EManage%20application%20permissions%20for%20SharePoint%20sites%3C%2FH3%3E%0A%3CP%3EWhen%20building%20applications%2C%20one%20of%20the%20common%20requirements%20is%20to%20grant%20these%20applications%20access%20to%20information%20stored%20in%20SharePoint.%20Typically%20though%2C%20applications%20should%20only%20have%20access%20to%20information%20stored%20in%20specific%20sites%20rather%20than%20the%20whole%20tenant.%20To%20support%20this%20need%2C%20recently%20Microsoft%20released%20a%20new%20set%20of%20permissions%20that%20allow%20you%20to%20grant%20an%20application%20access%20to%20a%20specific%20site.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20previous%20versions%20of%20CLI%20for%20Microsoft%20365%20we%20introduced%20support%20for%20managing%20application%20permissions%20for%20SharePoint%20sites.%20In%20this%20version%2C%20we%20extend%20the%20support%20with%20removing%20application%20permissions.%20To%20remove%20an%20application%20permission%20from%20the%20specific%20site%2C%20execute%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Em365%20spo%20site%20apppermission%20remove%20--siteUrl%20https%3A%2F%2Fcontoso.sharepoint.com%2Fsites%2Fproject-x%20--appDisplayName%20%22My%20app%22%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20about%20managing%20application%20permissions%20for%20SharePoint%20sites%2C%20see%20the%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fcmd%2Fspo%2Fsite%2Fsite-apppermission-remove%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Edocumentation%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1921384839%22%20id%3D%22toc-hId--1921384834%22%3ERetrieve%20information%20about%20a%20Microsoft%20Planner%20plan%3C%2FH3%3E%0A%3CP%3EIn%20the%20previous%20versions%20of%20CLI%20for%20Microsoft%20365%2C%20we%20introduced%20support%20for%20managing%20Microsoft%20Planner%20plans.%20In%20this%20version%2C%20we%20extended%20it%2C%20with%20retrieving%20the%20information%20about%20a%20specific%20plans.%20To%20retrieve%20it%2C%20execute%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Em365%20planner%20plan%20get%20--title%20%22MyPlan%22%20--ownerGroupName%20%22My%20Planner%20Group%22%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20about%20managing%20Microsoft%20Planner%20plans%2C%20see%20the%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fcmd%2Fplanner%2Fplan%2Fplan-get%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Edocumentation%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-566127994%22%20id%3D%22toc-hId-566127999%22%3ENew%20script%20samples%3C%2FH3%3E%0A%3CP%3ECLI%20for%20Microsoft%20365%20is%20a%20great%20tool%20both%20for%20quick%20adjustments%20to%20the%20configuration%20of%20your%20Microsoft%20365%20tenant%20as%20well%20as%20automating%20more%20complex%20tasks.%20Because%20CLI%20for%20Microsoft%20365%20is%20cross-platform%20you%20can%20use%20it%20on%20any%20OS%20and%20in%20any%20shell.%20To%20help%20you%20get%20started%20using%20the%20CLI%20for%20Microsoft%20365%20for%20automation%20scenarios%2C%20we%20started%20gathering%20some%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fsample-scripts%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Esample%20scripts%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20any%20scripts%20that%20you%20use%20frequently%2C%20please%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fpnp%2Fcli-microsoft365%2Fissues%2Fnew%3Fassignees%3D%26amp%3Blabels%3D%26amp%3Btemplate%3Dsample.md%26amp%3Btitle%3DNew%2Bsample%2Bscript%253A%2B%253Cshort%2Bdescription%253E%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eshare%3C%2FA%3E%20them%20with%20us%20so%20that%20we%20can%20learn%20more%20about%20the%20common%20automation%20scenarios.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1256689468%22%20id%3D%22toc-hId-1256689473%22%3EShare%20social%20champions%20to%20Teams%3C%2FH4%3E%0A%3CP%3EThis%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fsample-scripts%2Fteams%2Fshare-socialchampions%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Esample%20script%3C%2FA%3E%20shows%20how%20to%20retrieve%20activities%20for%20SharePoint%20Online%2C%20Teams%20and%20Yammer%20and%20shares%20the%20top%203%20contributors%20for%20each%20category%20as%20an%20adaptive%20card%20to%20the%20specified%20webhook%20url.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-680105604%22%20id%3D%22toc-hId-680105609%22%3ERecognize%20most%20active%20users%20for%20a%20specific%20Team%3C%2FH4%3E%0A%3CP%3EThis%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fsample-scripts%2Fteams%2Frecognize-most-active-users-specific-team%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Esample%20script%3C%2FA%3E%20shows%20how%20to%20retrieve%20all%20activities%20for%20a%20specific%20Microsoft%20Teams%20Team%20and%20shares%20the%20top%203%20contributors%20based%20on%20their%20score%20as%20an%20adaptive%20card%20to%20the%20specified%20webhook%20url.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1385514297%22%20id%3D%22toc-hId--1385514292%22%3EContributors%3C%2FH2%3E%0A%3CP%3EThis%20release%20wouldn%E2%80%99t%20be%20possible%20without%20the%20help%20of%20(in%20alphabetical%20order)%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fvipulkelkar%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EVipul%20Kelkar%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fvipulkelkar%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EShantha%20Kumar%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fvipulkelkar%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EWaldek%20Mastykarz%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fvipulkelkar%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EArjun%20Menon%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fvipulkelkar%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAbderahman%20Moujahid%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fvipulkelkar%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ENanddeep%20Nachan%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fappieschot%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAlbert-Jan%20Schot%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fappieschot%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDipen%20Shah%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fappieschot%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGarry%20Trinder%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThank%20you%20all%20for%20your%20help%20and%20effort%20to%20improve%20CLI%20for%20Microsoft%20365%20for%20our%20users.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1101998536%22%20id%3D%22toc-hId-1101998541%22%3EWork%20in%20progress%3C%2FH2%3E%0A%3CP%3EHere%20are%20some%20things%20that%20we%E2%80%99re%20currently%20working%20on.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--576373208%22%20id%3D%22toc-hId--576373203%22%3ECLI%20for%20Microsoft%20365%20v4%3C%2FH3%3E%0A%3CP%3EFor%20the%20last%20few%20months%20we've%20been%20working%20on%20a%20new%20major%20version%20of%20CLI%20for%20Microsoft%20365%20-%20v4.%20The%20v4%20release%20is%20a%20result%20of%20the%20evolution%20of%20the%20CLI%20over%20time.%20We%20planned%20it%2C%20to%20improve%20the%20consistency%20of%20the%20CLI%20and%20make%20it%20more%20intuitive%20to%20use.%20Some%20changes%20required%20us%20to%20introduce%20breaking%20changes%2C%20which%20is%20why%20we'll%20be%20releasing%20a%20new%20major%20version.%20Along%20with%20these%20changes%2C%20v4%20will%20contain%20new%20and%20improved%20commands%2C%20just%20as%20we%20ship%20them%20in%20each%20release.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECLI%20for%20Microsoft%20365%20v3.13%20is%20the%20last%20v3.x%20version%20of%20the%20CLI.%20Starting%20with%20our%20next%20monthly%20release%2C%20scheduled%20for%20the%20end%20of%20September%2C%20we%20will%20start%20releasing%20v4.x%20versions.%20v3.13%2C%20as%20well%20as%20all%20previous%20versions%2C%20will%20remain%20available%20and%20working%2C%20but%20won't%20be%20updated%2C%20which%20is%20why%20we%20recommend%20that%20you%20upgrade%20to%20v4.%20Along%20with%20the%20release%2C%20we'll%20publish%20an%20upgrade%20guidance%20to%20help%20you%20determine%20the%20impact%20of%20the%20upgrade%20on%20your%20work.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1911139625%22%20id%3D%22toc-hId-1911139630%22%3EMore%20commands%2C%20what%20else%3C%2FH3%3E%0A%3CP%3EMicrosoft%20365%20is%20evolving%20and%20new%20capabilities%20are%20being%20released%20every%20day.%20With%20CLI%20for%20Microsoft%20365%2C%20we%20aim%20to%20help%20you%20manage%20your%20tenant%20on%20any%20platform%20in%20a%20consistent%20way%2C%20no%20matter%20which%20part%20of%20Microsoft%20365%20you%20interact%20with.%20While%20we%20keep%20adding%20new%20commands%20to%20CLI%20for%20Microsoft%20365%20each%20release%2C%20we%20still%20barely%20scratched%20the%20surface%20with%20what%E2%80%99s%20possible%20in%20Microsoft%20365.%20In%20the%20upcoming%20versions%20of%20the%20CLI%20for%20Microsoft%2C%20you%20can%20expect%20us%20to%20add%20more%20commands%20across%20the%20different%20workloads%20in%20Microsoft%20365.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-103685162%22%20id%3D%22toc-hId-103685167%22%3EScript%20examples%3C%2FH3%3E%0A%3CP%3EIn%20every%20release%20of%20the%20CLI%20for%20Microsoft%20365%2C%20we%20introduce%20new%20commands%20for%20managing%20Microsoft%20365.%20With%20over%20350%20commands%20across%20the%20different%20Microsoft%20365%20services%2C%20the%20CLI%20for%20Microsoft%20365%20has%20become%20a%20powerful%20tool%2C%20not%20just%20for%20managing%20your%20tenant%20but%20also%20for%20automating%20your%20daily%20work.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%E2%80%99d%20love%20to%20show%20you%20how%20you%20can%20use%20the%20CLI%20for%20Microsoft%20365%20to%20build%20automation%20scripts%20in%20PowerShell%20Core%20and%20Bash.%20If%20you%20have%20any%20scripts%20using%20SPO%20or%20PnP%20PowerShell%20that%20you%20use%20frequently%2C%20please%20share%20them%20with%20us%20so%20that%20we%20can%20learn%20more%20about%20the%20common%20automation%20scenarios.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1832852020%22%20id%3D%22toc-hId--1832852015%22%3ETry%20it%20today%3C%2FH2%3E%0A%3CP%3EGet%20the%20latest%20release%20of%20the%20CLI%20for%20Microsoft%20365%20from%20npm%20by%20executing%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Enpm%20i%20-g%20%40pnp%2Fcli-microsoft365%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlternatively%2C%20you%20can%20get%20the%20latest%20release%20from%20Docker%20by%20executing%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-sh%22%3Edocker%20run%20--rm%20-it%20m365pnp%2Fcli-microsoft365%3Alatest%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20need%20more%20help%20getting%20started%20or%20want%20more%20details%20about%20the%20commands%2C%20the%20architecture%20or%20the%20project%2C%20go%20to%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fcli-m365%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eaka.ms%2Fcli-m365%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20see%20any%20room%20for%20improvement%2C%20please%2C%20don%E2%80%99t%20hesitate%20to%20reach%20out%20to%20us%20either%20on%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fpnp%2Fcli-microsoft365%2Fissues%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGitHub%3C%2FA%3E%20or%20%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fclimicrosoft365%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Etwitter%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2701414%22%20slang%3D%22en-US%22%3E%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3EWe've%20just%20published%20a%20new%20version%20of%20the%20CLI%20for%20Microsoft%20365%20with%20new%20commands%20for%20working%20with%20and%20managing%20Microsoft%20365%20tenants%20and%20SharePoint%20Framework%20projects%20on%20any%20platform.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2701414%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAnnouncement%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Aug 30 2021 11:35 PM
Updated by: