Manage Office 365 and SharePoint Framework projects on any platform
New major version
Grouping per service vs. grouping per API
graph teams, because they used the Microsoft Graph but Microsoft Flow commands would start with
azmgmt flowbecause they were built using the Azure Management API. This naming convention required the user to know how we implemented the particular command.
spo loginto connect to SharePoint or
graph loginto connect to the Microsoft Graph. Theoretically, it gave you the flexibility to use different accounts with different services. In practice however, no one really used the CLI that way. So in Office 365 CLI v2, we decided to move away from the per-service/-API log in and have one login in the CLI that automatically takes care of the authorization when switching between services.
logincommand. Once you’re signed in, you can start using all commands in the CLI.
Auto-detect SharePoint URL
Comparing to other Office 365 services, SharePoint Online has a unique URL on every tenant. Where the Microsoft Graph, for example, is always available at
https://graph.microsoft.com, SharePoint needs to be called using its unique URL, like
spo login https://contoso.sharepoint.com. If you wanted to use admin-level commands, you had to specify the tenant admin URL instead or these commands would fail, eg.
spo login https://contoso-admin.sharepoint.com.
logincommand, the CLI will automatically detect the URL of SharePoint Online and automatically switch between the root site or the tenant admin URL depending on the commands you use.
spo set --url https://contosoeur.sharepoint.comcommand to specify the URL of the geography that you want to manage.
New commands and improvements
- Stefan Bauer (N8D)
- Stijn Brouwers (Amplexor)
- Velin Georgiev (Pramerica)
- Waldek Mastykarz (Rencore)
- Mark Priem
- Albert-Jan Schot (Mavention)
- Peter Tane
- Joseph Velliah
- Rabia Williams (Engage Squared)
as well as all other contributors who helped with previous releases of the Office 365 CLI. There wouldn’t be a v2 without the v1, which you helped to build. Thank you all so much for the time you chose to spend on the Office 365 CLI!
Try it today
npm i -g @pnp/office365-cli
“Sharing is caring”
SharePoint Team, Microsoft – 11th of September 2019