
CLI for Microsoft 365 v12.1
CLI for Microsoft 365 v12.1 builds on the latest minor release with improvements across SharePoint, Entra, Viva, and SPFx. This release continues the migration to Zod schema validation, makes it easier to follow least-privilege practices, and brings support for the latest SPFx v1.24 release. CLI for Microsoft 365 remains the cross-platform tool you rely on to manage your Microsoft 365 tenant and SharePoint Framework projects.
Explore the release notes to see every detail that landed in v12.1.
What’s changed
SharePoint Framework v1.24.2 support
SPFx keeps moving forward, and your CLI tooling should keep pace. With v12.1, the SPFx commands in CLI for Microsoft 365 support SPFx v1.24.2, helping you bring your projects up to date and check that your development environment is ready.
The SPFx v1.24 release introduced Copilot UX components into general availability, updated the React runtime to React 18.3.1.
To get step-by-step guidance on upgrading your project to SPFx v1.24.2, run this command from the root of your project:
m365 spfx project upgrade --toVersion 1.24.2 --output md > "upgrade-report.md"
Before you start developing with the new version, check that your local environment is ready:
m365 spfx doctor --spfxVersion 1.24.2 --output text
For additional options and response details, see spfx project upgrade and spfx doctor.
More guidance for least-privilege permissions
You can now find minimal-permission guidance for spo listitem record commands, spo listitem commands, and related. We’ve also added this guidance for Viva Engage community commands, making it easier to grant your app registrations only the access they need.
Fixed CSV parsing in SharePoint list item commands
CSV parsing has been fixed in spo listitem batch add, spo listitem batch remove, and spo listitem batch set. Batch operations can now process CSV input as expected.
More useful results from spo user get
The spo user get command now returns the Microsoft Entra object ID for the retrieved SharePoint user. This gives you another useful identifier when connecting SharePoint user information with Microsoft Entra.
Improved command input and escaping
We’ve relaxed GUID validation for Microsoft 365 entity IDs in command options, so valid entity IDs are less likely to be rejected by overly strict validation.
We also fixed double escaping of apostrophes in teams chat get, entra m365group recyclebinitem list, and spo page add. Names and text containing apostrophes are now handled as intended.
Keep the momentum going
Every improvement in this release is driven by real-world usage and community input. If you want to help shape the next version, browse the open “help wanted” issues or share your ideas on Discord.
Contributors
We want to extend our heartfelt appreciation to the incredible individuals who have made this release possible. Without their valuable contributions and dedication, CLI for Microsoft 365 wouldn’t be where it is today. Let’s give a round of applause to the following contributors (in alphabetical order):
- Adam Wójcik
- bardrop
- Martin Machacek
- Milan Holemans
- Nabeel Hassan
- Nanddeep Nachan
- Neha Biswas
- Waldek Mastykarz
A special welcome to Anikesh, Elliot, Fabian, Kevin, and Sarthak, who made their first contributions to CLI for Microsoft 365 in this release. We’re thrilled to have you on board!
High fives
We would like to give a big shout-out and high-fives to the amazing individuals who have shared their invaluable feedback and ideas for improving CLI for Microsoft 365. We greatly appreciate your engagement and contribution to the growth of our platform. Let’s celebrate the following users (in alphabetical order) for taking the time to share their insights:
Thank you for making CLI for Microsoft 365 better for everyone!
Get started today!
Experience the power of CLI for Microsoft 365 by getting the latest release from npm:
npm i -g @pnp/cli-microsoft365
Alternatively, you can access the latest release from Docker:
docker run --rm -it m365pnp/cli-microsoft365:latest
Need more information?
For additional guidance on getting started or to explore detailed information about commands, architecture, or the project itself, visit aka.ms/cli-m365.
Stay connected!
We value your feedback and are eager to hear from you. If you have any suggestions for improvement or want to engage with our community, you can reach out to us on GitHub, Discord or Bluesky. Don’t hesitate to connect with us. Your input plays a vital role in shaping the future of CLI for Microsoft 365.
