diff --git a/CHANGELOG.md b/CHANGELOG.md index a237ace..0f1e679 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,18 @@ # Change Log +## [4.3.0] - 2024-12-11 + +- Added remove confirmation prompt when removing SPFx solution from app catalog +- Added /manage GitHub Chat command +- Added generating code tour for upgrade and validate SPFx solution actions +- Added upgrade SPFx project action +- Added SPFx Fast Serve optional dependency to the scaffolding form +- Improved sign in experience with caching of Client ID and Tenant ID + ## [4.2.0] - 2024-10-19 -- Include m365 prefix and log passed CLI command options -- Refactors to ensure types for settings +- Included m365 prefix and log passed CLI command options +- Refactored to ensure types for settings - Added a new project additional step to create or not the node version manager configuration file - Added new VSCode setting createNodeVersionFileDefaultValue to define the default value of the new project additional step - Added new VSCode setting nodeVersionManagerFile to specify which configuration file to be created diff --git a/README.md b/README.md index 7d55718..831fdfc 100644 --- a/README.md +++ b/README.md @@ -104,22 +104,14 @@ Creating a new project was never easier. Just use the **create a new project** a ![Create new project](./assets/images/scaffolding.png) -Check it out in action 👇. - -![Create new project](./assets/images/scaffolding-form.gif) - It's possible to scaffold any kind of SPFx project. ![All SPFx project support](./assets/images/scaffolding-support.png) -Install additional dependencies with a single click straight from the scaffolding form. Currently we support installing [PnP reusable property pane controls](https://pnp.github.io/sp-dev-fx-property-controls/), [PnP reusable React controls](https://pnp.github.io/sp-dev-fx-controls-react/), and [PnPjs](https://pnp.github.io/pnpjs/). +Install additional dependencies with a single click straight from the scaffolding form. Currently we support installing [PnP reusable property pane controls](https://pnp.github.io/sp-dev-fx-property-controls/), [PnP reusable React controls](https://pnp.github.io/sp-dev-fx-controls-react/), [PnPjs](https://pnp.github.io/pnpjs/). Add and preconfigure [SPFx Fast Serve](https://github.com/s-KaiNet/spfx-fast-serve) and add a Node Version Manager configuration file either for NVM or NVS. ![Additional dependency step](./assets/images/scaffolding-additional-step.png) -When you can set the additional dependencies it's also possible to automatically create the node version manager file with the version of Node.js used when creating the project. These settings are available in the extension settings. - -![Additional dependency step node version](./assets/images/scaffolding-additional-step-node-version.png) - [Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.2-Scaffolding#1-scaffold-a-new-spfx-project) ### 6️⃣ Sign in to your tenant & retrieve environment details @@ -136,6 +128,8 @@ SPFx Toolkit will guide you through the process of creating a new app registrati ![entra app reg form](./assets/images/sign-in-entra-app-reg-form.png) +Check it out in action 👇 + ![app registration](./assets/images/sign-in.gif) If you already have an Entra App Registration you may use it to sign in to your tenant by providing the Client Id and Tenant Id. @@ -159,6 +153,7 @@ After successful sign in, an additional view is presented that shows a list of l - **Remove**: Removes the app from the app catalog. - **Enable**: Allows end users to add the solution to their SharePoint sites. - **Disable**: Hides the solution from end users, preventing them from adding it to sites. +- **Upgrade**: Upgrades the solution to the latest version available in the app catalog for the specified site. Additionally, it will show you all tenant-wide extensions installed on your tenant. @@ -202,13 +197,17 @@ And for Azure DevOps👇 [Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.5-Actions#cicd-github-workflow) -- **Upgrade project** - Uses CLI for Microsoft 365 to create a .md report with upgrade guidance to the latest supported SPFx version by the extension. +- **Upgrade project** - Uses CLI for Microsoft 365 to create a .md and/or code tour report with upgrade guidance to the latest supported SPFx version by the extension. The upgrade guidance provides optional as well as required steps a user needs to take manually in order to upgrade the project. At the end of the guidance file, the user may find a summary of the steps in a single script and a couple of manual steps that need to be taken. ![Upgrade project](./assets/images/upgrade-project.png) +And the code tour guidance will provide you upgrade tips directly in your code! + +![Upgrade project](./assets/images/upgrade-project-code-tour.png) + [Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.5-Actions#upgrade-project) -- **Validate project** - Creates a validation .md report against the currently used SPFx version in the project. The action will automatically detect the SPFx version used and will validate if the project is properly set up. +- **Validate project** - Creates a validation .md report and/or code tour validation guidance for the currently open SPFx project. The action will automatically detect the SPFx version used and will validate if the project is properly set up. ![Upgrade project](./assets/images/validate-project.png) @@ -315,7 +314,8 @@ Now you may use SPFx Toolkit as a chat participant in GitHub Copilot chat extens Currently, we support the following commands: - `/setup` - that is dedicated to providing information on how to setup your local workspace for SharePoint Framework development - `/new` - that may be used to get guidance on how to create a new solution or find and reuse an existing sample from the PnP SPFx sample gallery -- `/code` - that is fine-tuned to provide help in coding your SharePoint Framework project and provides additional boosters like validating the correctness of your SPFx project, scaffolding a CI/CD workflow, or renaming your project, and many more. +- `/code` - [beta] this command is fine-tuned to provide help in coding your SharePoint Framework project and provides additional boosters like validating the correctness of your SPFx project, scaffolding a CI/CD workflow, or renaming your project, and many more. +- `/manage` - [beta] this command will allow you to ask and retrieve any kind of data from you SharePoint Online tenant. This command will only work if your are signed in to your tenant. It uses CLI for Microsoft 365 commands under the hood to retrieve and explain data and assets from your SharePoint Online tenant. Currently it does support only retrieving information, it will not support you in creating, updating or removing any resources. For example, you want to check if some list item or file exists. Or how many items with specific metadata do you have on a list? Or ask for content type columns to generate an interface based on the response quickly. [Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/8.-SPFx-Toolkit-GitHub-Chat-Participant) diff --git a/assets/images/actions.png b/assets/images/actions.png index 4f61972..ca95ddc 100644 Binary files a/assets/images/actions.png and b/assets/images/actions.png differ diff --git a/assets/images/app-catalog-list.png b/assets/images/app-catalog-list.png index e8ce458..cc558d3 100644 Binary files a/assets/images/app-catalog-list.png and b/assets/images/app-catalog-list.png differ diff --git a/assets/images/chat-in-action-menage.gif b/assets/images/chat-in-action-menage.gif new file mode 100644 index 0000000..ff36e64 Binary files /dev/null and b/assets/images/chat-in-action-menage.gif differ diff --git a/assets/images/scaffolding-additional-step.png b/assets/images/scaffolding-additional-step.png index 4a9f126..0376553 100644 Binary files a/assets/images/scaffolding-additional-step.png and b/assets/images/scaffolding-additional-step.png differ diff --git a/assets/images/scaffolding.png b/assets/images/scaffolding.png index 34e3405..8c79d33 100644 Binary files a/assets/images/scaffolding.png and b/assets/images/scaffolding.png differ diff --git a/assets/images/settings.png b/assets/images/settings.png index c2a9da4..ee87e4a 100644 Binary files a/assets/images/settings.png and b/assets/images/settings.png differ diff --git a/assets/images/sign-in-existing-app.gif b/assets/images/sign-in-existing-app.gif index 26bfcfa..149adda 100644 Binary files a/assets/images/sign-in-existing-app.gif and b/assets/images/sign-in-existing-app.gif differ diff --git a/assets/images/sign-in.gif b/assets/images/sign-in.gif index ca29f58..6df0b73 100644 Binary files a/assets/images/sign-in.gif and b/assets/images/sign-in.gif differ diff --git a/assets/images/upgrade-project-code-tour.png b/assets/images/upgrade-project-code-tour.png new file mode 100644 index 0000000..040e935 Binary files /dev/null and b/assets/images/upgrade-project-code-tour.png differ diff --git a/assets/walkthrough/actions.md b/assets/walkthrough/actions.md index 5a41874..50c4468 100644 --- a/assets/walkthrough/actions.md +++ b/assets/walkthrough/actions.md @@ -20,13 +20,17 @@ And for Azure DevOps👇 [Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.5-Actions#cicd-github-workflow) -- **Upgrade project** - Uses CLI for Microsoft 365 to create a .md report with upgrade guidance to the latest supported SPFx version by the extension. +- **Upgrade project** - Uses CLI for Microsoft 365 to create a .md and/or code tour report with upgrade guidance to the latest supported SPFx version by the extension. The upgrade guidance provides optional as well as required steps a user needs to take manually in order to upgrade the project. At the end of the guidance file, the user may find a summary of the steps in a single script and a couple of manual steps that need to be taken. ![Upgrade project](../images/upgrade-project.png) +And the code tour guidance will provide you upgrade tips directly in your code! + +![Upgrade project](./assets/images/upgrade-project-code-tour.png) + [Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.5-Actions#upgrade-project) -- **Validate project** - Creates a validation .md report against the currently used SPFx version in the project. The action will automatically detect the SPFx version used and will validate if the project is properly set up. +- **Validate project** - Creates a validation .md report and/or code tour validation guidance for the currently open SPFx project. The action will automatically detect the SPFx version used and will validate if the project is properly set up. ![Upgrade project](../images/validate-project.png) diff --git a/assets/walkthrough/create-new-project.md b/assets/walkthrough/create-new-project.md index 756bb6c..8d8a05e 100644 --- a/assets/walkthrough/create-new-project.md +++ b/assets/walkthrough/create-new-project.md @@ -4,10 +4,6 @@ Creating a new project was never easier. Just use the **create a new project** a ![Create new project](../images/scaffolding.png) -Check it out in action 👇. - -![Create new project](../images/scaffolding-form.gif) - It's possible to scaffold any kind of SPFx project including web parts, extensions, library components, and adaptive card extensions. ![All SPFx project support](../images/scaffolding-support.png) @@ -17,7 +13,7 @@ It's possible to scaffold any kind of SPFx project including web parts, extensio - **Library components** are reusable code elements that can be shared across all the components in the tenant. - **Adaptive Card Extensions (ACEs)** allow you to build rich, native extensions for Viva Connections Dashboards and SharePoint Pages. -Install additional dependencies with a single click straight from the scaffolding form. Currently we support installing [PnP reusable property pane controls](https://pnp.github.io/sp-dev-fx-property-controls/), [PnP reusable React controls](https://pnp.github.io/sp-dev-fx-controls-react/), and [PnPjs](https://pnp.github.io/pnpjs/). +Install additional dependencies with a single click straight from the scaffolding form. Currently we support installing [PnP reusable property pane controls](https://pnp.github.io/sp-dev-fx-property-controls/), [PnP reusable React controls](https://pnp.github.io/sp-dev-fx-controls-react/), [PnPjs](https://pnp.github.io/pnpjs/). Add and preconfigure [SPFx Fast Serve](https://github.com/s-KaiNet/spfx-fast-serve) and add a Node Version Manager configuration file either for NVM or NVS. ![Additional dependency step](../images/scaffolding-additional-step.png) diff --git a/assets/walkthrough/tenant-details.md b/assets/walkthrough/tenant-details.md index e3f439a..5ffe9a7 100644 --- a/assets/walkthrough/tenant-details.md +++ b/assets/walkthrough/tenant-details.md @@ -29,6 +29,7 @@ After successful sign in, an additional view is presented that shows a list of l - **Remove**: Removes the app from the app catalog. - **Enable**: Allows end users to add the solution to their SharePoint sites. - **Disable**: Hides the solution from end users, preventing them from adding it to sites. +- **Upgrade**: Upgrades the solution to the latest version available in the app catalog for the specified site. Additionally, it will show you all tenant-wide extensions installed on your tenant. diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 8996ff9..8e3d475 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "viva-connections-toolkit", - "version": "4.2.0", + "version": "4.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "viva-connections-toolkit", - "version": "4.2.0", + "version": "4.3.0", "license": "MIT", "dependencies": { "@pnp/cli-microsoft365": "6.11.0", diff --git a/package.json b/package.json index e0a1897..e5f5aa6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "viva-connections-toolkit", "displayName": "SharePoint Framework Toolkit", "description": "SharePoint Framework Toolkit aims to boost your productivity in developing and managing SharePoint Framework solutions helping at every stage of your development flow, from setting up your development workspace to deploying a solution straight to your tenant without the need to leave VS Code and now even create a CI/CD pipeline to introduce automate deployment of your app. This toolkit is provided by the community.", - "version": "4.2.0", + "version": "4.3.0", "publisher": "m365pnp", "preview": false, "homepage": "https://github.com/pnp/vscode-viva", @@ -63,12 +63,17 @@ { "name": "new", "isSticky": true, - "description": "Create a new SharePoint Framework project." + "description": "Create a new SharePoint Framework project" + }, + { + "name": "manage", + "isSticky": true, + "description": "[beta] Manage your SharePoint Online tenant" }, { "name": "code", "isSticky": true, - "description": "Let's write some SPFx code (I am still learning this, please consider this as beta)" + "description": "[beta] Let's write some SPFx code" } ] } @@ -205,6 +210,28 @@ ".node-version" ], "description": "The file to be used to store the Node version for the selected Node version manager. Remember that the .node-version file is supported only while using nvs." + }, + "spfx-toolkit.projectUpgradeOutputMode": { + "title": "Project upgrade output mode", + "type": "string", + "default": "both", + "enum": [ + "both", + "markdown", + "code tour" + ], + "description": "Choose the output mode for the project upgrade. You can choose between `both`, `markdown`, or `code tour`." + }, + "spfx-toolkit.projectValidateOutputMode": { + "title": "Project validate output mode", + "type": "string", + "default": "both", + "enum": [ + "both", + "markdown", + "code tour" + ], + "description": "Choose the output mode for the project validation. You can choose between `both`, `markdown`, or `code tour`." } } }, @@ -433,6 +460,12 @@ "category": "SharePoint Framework Toolkit", "icon": "$(circle-slash)" }, + { + "command": "spfx-toolkit.upgradeAppCatalogApp", + "title": "Upgrade", + "category": "SharePoint Framework Toolkit", + "icon": "$(sync)" + }, { "command": "spfx-toolkit.showMoreActions", "title": "...", @@ -504,6 +537,10 @@ { "command": "spfx-toolkit.disableAppCatalogApp", "group": "actions.more@4" + }, + { + "command": "spfx-toolkit.upgradeAppCatalogApp", + "group": "actions.more@5" } ], "explorer/context": [ diff --git a/scripts/cli-for-microsoft365-create-grounding-data.ps1 b/scripts/cli-for-microsoft365-create-grounding-data.ps1 new file mode 100644 index 0000000..af3ebe6 --- /dev/null +++ b/scripts/cli-for-microsoft365-create-grounding-data.ps1 @@ -0,0 +1,81 @@ +param ([string[]]$workspacePath) + +$cliLocalProjectPath = "$workspacePath\cli-microsoft365" + +if (-not (Test-Path -Path $cliLocalProjectPath -PathType Container)) { + return +} + +[hashtable]$commandsData = @{} + +$allSpoCommands = Get-ChildItem -Path "$workspacePath\cli-microsoft365\docs\docs\cmd\spo\*.mdx" -Recurse -Force -Exclude "_global*" + +foreach ($command in $allSpoCommands) { + $commandDocs = ConvertFrom-Markdown -Path $command + $html = New-Object -Com 'HTMLFile' + $html.write([ref]$commandDocs.Html) + + $title = $html.all.tags('h1')[0] + $commandTitle = $title.innerText + + if (-not ($commandTitle -match "\b(list|get)$")) { + continue + } + + $titleIndex = @($html.all).IndexOf($title) + + $usage = $html.all.tags('h2') | Where-Object { $_.tagName -eq 'H2' } | Select-Object -First 1 + $usageIndex = @($html.all).IndexOf($usage) + + $commandDescription = @($html.all)[($titleIndex + 1)..($usageIndex - 1)] + $commandDescription = $commandDescription | ForEach-Object { $_.innerText } + + $subTitles = $html.all.tags('h2') | Where-Object { $_.tagName -eq 'H2' } | Select-Object -First 5 + $optionsStartIndex = @($html.all).IndexOf($subTitles[1]) + $optionsEndIndex = @($html.all).IndexOf($subTitles[2]) + $commandOptions = @($html.all)[($optionsStartIndex + 1)..($optionsEndIndex - 1)] + $commandOptions = $commandOptions | Where-Object { $_.nodeName -eq 'CODE' } | ForEach-Object { $_.innerText } + $commandOptions = $commandOptions | ForEach-Object { $_.Replace("`r`n", '') } + + $examples = $subTitles[2].innerText + $examplesStartIndex = @($html.all).IndexOf($subTitles[2]) + $examplesEndIndex = @($html.all).IndexOf($subTitles[3]) + if (-not ($examples -match "Example")) { + $examples = $subTitles[3].innerText + $examplesStartIndex = @($html.all).IndexOf($subTitles[3]) + $examplesEndIndex = @($html.all).IndexOf($subTitles[4]) + } + $commandExamples = @($html.all)[($examplesStartIndex + 1)..($examplesEndIndex - 1)] + $commandExamples = $commandExamples | Where-Object { $_.nodeName -match 'CODE|P' } | ForEach-Object { $_.innerText } + $commandExamples = $commandExamples | Select-Object -Unique + $commandExamples = $commandExamples -split '\r?\n' + $commandExamplesObjects = @() + for ($i = 0; $i -lt $commandExamples.Length; $i += 2) { + $example = $commandExamples[$i] + $description = $commandExamples[$i + 1] + $commandExamplesObject = @{ + Example = $example + Description = $description + } + $commandExamplesObjects += $commandExamplesObject + } + + $commandsData["m365 $commandTitle"] = @{ + Description = $commandDescription + Options = $commandOptions + Examples = $commandExamplesObjects + } +} + +$dataArray = @() +foreach ($key in $commandsData.Keys) { + $orderedHashtable = [ordered]@{ + Command = $key + Description = $commandsData[$key].Description + Options = $commandsData[$key].Options + Examples = $commandsData[$key].Examples + } + $dataArray += $orderedHashtable +} + +$dataArray | ConvertTo-Json -Depth 3 | Out-File "$workspacePath\vscode-viva\src\chat\CliForMicrosoft365SpoCommands.ts" \ No newline at end of file diff --git a/src/chat/CliForMicrosoft365SpoCommands.ts b/src/chat/CliForMicrosoft365SpoCommands.ts new file mode 100644 index 0000000..202f07f --- /dev/null +++ b/src/chat/CliForMicrosoft365SpoCommands.ts @@ -0,0 +1,2288 @@ +/* eslint-disable quotes */ + +export const Commands = [ + { + "Command": "m365 spo page template list", + "Description": "Lists all page templates in the given site", + "Options": "`-u, --webUrl `: URL of the site from which to retrieve available pages.", + "Examples": [ + { + "Description": "m365 spo page template list --webUrl https://contoso.sharepoint.com/sites/team-a", + "Example": "Lists all page templates in the given site" + } + ] + }, + { + "Command": "m365 spo homesite get", + "Description": "Gets information about the Home Site", + "Options": null, + "Examples": [ + { + "Description": "m365 spo homesite get", + "Example": "Get information about the Home Site." + } + ] + }, + { + "Command": "m365 spo theme list", + "Description": "Retrieves the list of custom themes", + "Options": null, + "Examples": [ + { + "Description": "m365 spo theme list", + "Example": "List available themes" + } + ] + }, + { + "Command": "m365 spo file sharinginfo get", + "Description": "Generates a sharing information report for the specified file", + "Options": "`-u, --webUrl `: The URL of the site where the file is located`--fileUrl [fileUrl]`: The server- or site-relative decoded URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both`-i, --fileId [fileId]`: The UniqueId (GUID) of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both", + "Examples": [ + { + "Description": "`-u, --webUrl `: The URL of the site where the file is located", + "Example": "Get file sharing information report for the file with server-relative url /sites/M365CLI/Shared Documents/SharedFile.docx located in site https://contoso.sharepoint.com/sites/project-x" + }, + { + "Description": ": The server- or site-relative decoded URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both", + "Example": "`--fileUrl [fileUrl]`" + }, + { + "Description": ": The UniqueId (GUID) of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both", + "Example": "`-i, --fileId [fileId]`" + }, + { + "Description": ": The URL of the site where the file is located", + "Example": "`-u, --webUrl `" + }, + { + "Description": "`--fileUrl [fileUrl]`", + "Example": "" + }, + { + "Description": "", + "Example": ": The server- or site-relative decoded URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both" + }, + { + "Description": ": The UniqueId (GUID) of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both", + "Example": "`-i, --fileId [fileId]`" + }, + { + "Description": "Generates a sharing information report for the specified file", + "Example": "m365 spo file sharinginfo get [options]" + }, + { + "Description": "m365 spo file sharinginfo get --webUrl https://contoso.sharepoint.com/sites/project-x --fileId \"b2307a39-e878-458b-bc90-03bc578531d6\"", + "Example": "import Global from '/docs/cmd/_global.mdx';" + } + ] + }, + { + "Command": "m365 spo get", + "Description": "Gets the context URL for the root SharePoint site collection and SharePoint tenant admin site", + "Options": null, + "Examples": [ + { + "Description": "m365 spo get --output json", + "Example": "Get the context URL for the root SharePoint site collection and SharePoint tenant admin site" + } + ] + }, + { + "Command": "m365 spo sitedesign run status get", + "Description": "Gets information about the site scripts executed for the specified site design", + "Options": "`-u, --webUrl `: The URL of the site for which to get the information`-i, --runId `: ID of the site design applied to the site as retrieved using `spo sitedesign run list`", + "Examples": [ + { + "Description": "m365 spo sitedesign run status get --webUrl https://contoso.sharepoint.com/sites/team-a --runId b4411557-308b-4545-a3c4-55297d5cd8c8", + "Example": "List information about site scripts executed for the specified site design" + } + ] + }, + { + "Command": "m365 spo app instance list", + "Description": "Retrieve apps installed in a site", + "Options": "`-u, --siteUrl `: URL of the site collection to retrieve the apps for", + "Examples": [ + { + "Description": "`-u, --siteUrl `: URL of the site collection to retrieve the apps for", + "Example": "Return a list of installed apps on site https://contoso.sharepoint.com/sites/site1." + }, + { + "Description": ": URL of the site collection to retrieve the apps for", + "Example": "`-u, --siteUrl `" + }, + { + "Description": "Retrieve apps installed in a site", + "Example": "m365 spo app instance list [options]" + }, + { + "Description": "m365 spo app instance list --siteUrl https://contoso.sharepoint.com/sites/site1", + "Example": "import Global from '/docs/cmd/_global.mdx';" + } + ] + }, + { + "Command": "m365 spo page control get", + "Description": "Gets information about the specific control on a modern page", + "Options": "`-i, --id `: ID of the control to retrieve information for.`-n, --pageName `: Name of the page where the control is located.`-u, --webUrl `: URL of the site where the page to retrieve is located.", + "Examples": [ + { + "Description": "m365 spo page control get --id 3ede60d3-dc2c-438b-b5bf-cc40bb2351e1 --webUrl https://contoso.sharepoint.com/sites/team-a --pageName home.aspx", + "Example": "Get information about the control with ID 3ede60d3-dc2c-438b-b5bf-cc40bb2351e1 placed on a modern page with name home.aspx" + } + ] + }, + { + "Command": "m365 spo page get", + "Description": "Gets information about the specific modern page", + "Options": "`-n, --name `: Name of the page to retrieve.`-u, --webUrl `: URL of the site where the page to retrieve is located.`--metadataOnly`: Specify to only retrieve the metadata without the section and control information.", + "Examples": [ + { + "Description": "m365 spo page get --webUrl https://contoso.sharepoint.com/sites/team-a --name home.aspx", + "Example": "Get information about the modern page" + }, + { + "Description": "m365 spo page get --webUrl https://contoso.sharepoint.com/sites/team-a --name home.aspx --metadataOnly", + "Example": "Get all the metadata from the modern page, without the section and control count information" + } + ] + }, + { + "Command": "m365 spo web list", + "Description": "Lists subsites of the specified site", + "Options": "`-u, --url `: URL of the parent site for which to retrieve the list of subsites", + "Examples": [ + { + "Description": "m365 spo web list --url https://contoso.sharepoint.com", + "Example": "Return all subsites from site https://contoso.sharepoint.com/" + } + ] + }, + { + "Command": "m365 spo listitem get", + "Description": "Gets a list item from the specified list", + "Options": "`-u, --webUrl `: URL of the site where the item is located.`-i, --id [id]`: ID of the item to retrieve. Specify either `id` or `uniqueId` but not both.`--uniqueId [uniqueId]`: The Unique ID (GUID) of the item to retrieve. Specify either `id` or `uniqueId` but not both.`-l, --listId [listId]`: ID of the list. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.`-t, --listTitle [listTitle]`: Title of the list. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.`--listUrl [listUrl]`: Server- or site-relative URL of the list. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.`-p, --properties [properties]`: Comma-separated list of properties to retrieve. Will retrieve all properties if not specified and json output is requested.`--withPermissions`: Set if you want to return associated roles and permissions.", + "Examples": [ + { + "Description": "m365 spo listitem get --listTitle \"Demo List\" --id 147 --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get an item with the ID parameter from a given list in a given site." + }, + { + "Description": "m365 spo listitem get --listTitle \"Demo List\" --uniqueId \"64dc28c4-3c43-45f6-ba66-307d9eb7e6aa\" --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get an item with the Unique ID parameter from a given list in a given site." + }, + { + "Description": "m365 spo listitem get --listTitle \"Demo List\" --id 147 --webUrl https://contoso.sharepoint.com/sites/project-x --properties \"Title,Created\"", + "Example": "Get an item columns with the ID parameter from a given list in a given site." + }, + { + "Description": "m365 spo listitem get --listTitle \"Demo List\" --id 147 --webUrl https://contoso.sharepoint.com/sites/project-x --properties \"Title,Created,Company/Title\"", + "Example": "Get an item columns and lookup column with the ID parameter from a given list in a given site." + }, + { + "Description": "m365 spo listitem get --listUrl /sites/project-x/documents --id 147 --webUrl https://contoso.sharepoint.com/sites/project-x --properties \"Title,Created,Company/Title\"", + "Example": "Get an item with specific properties from a given list based on the server-relative URL in a specific site." + }, + { + "Description": "m365 spo listitem get --listTitle \"Demo List\" --id 147 --webUrl https://contoso.sharepoint.com/sites/project-x --withPermissions", + "Example": "Get an item with ID parameter from a given list based on the server-relative URL in a specific site with permissions." + } + ] + }, + { + "Command": "m365 spo app list", + "Description": "Lists apps from the specified app catalog", + "Options": "`-s, --appCatalogScope [appCatalogScope]`: Target app catalog. `tenant,sitecollection`. Default `tenant``-u, --appCatalogUrl [appCatalogUrl]`: URL of the tenant or site collection app catalog. It must be specified when the scope is `sitecollection`", + "Examples": [ + { + "Description": "m365 spo app list", + "Example": "Return the list of available apps from the tenant app catalog. Show the installed version in the site if applicable." + }, + { + "Description": "m365 spo app list --appCatalogScope sitecollection --appCatalogUrl https://contoso.sharepoint.com/sites/site1", + "Example": "Return the list of available apps from a site collection app catalog of site https://contoso.sharepoint.com/sites/site1." + } + ] + }, + { + "Command": "m365 spo contenttype get", + "Description": "Retrieves information about the specified list or site content type", + "Options": "`-u, --webUrl `: Absolute URL of the site where the content type is located`-l, --listTitle [listTitle]`: Title of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`.`--listId [listId]`: ID of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`.`--listUrl [listUrl]`: Server- or site-relative URL of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`.`-i, --id [id]`: The ID of the content type to retrieve. Specify either id or name but not both`-n, --name [name]`: The name of the content type to retrieve. Specify either id or name but not both", + "Examples": [ + { + "Description": "If no content type with the specified is found in the site or the list, you will get the Content type with ID 0x010012 not found error.", + "Example": "Retrieve site content type by id" + }, + { + "Description": ": Absolute URL of the site where the content type is located", + "Example": "`-u, --webUrl `" + }, + { + "Description": ": Title of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`.", + "Example": "`-l, --listTitle [listTitle]`" + }, + { + "Description": ": ID of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`.", + "Example": "`--listId [listId]`" + }, + { + "Description": ": Server- or site-relative URL of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`.", + "Example": "`--listUrl [listUrl]`" + }, + { + "Description": ": The ID of the content type to retrieve. Specify either id or name but not both", + "Example": "`-i, --id [id]`" + }, + { + "Description": ": The name of the content type to retrieve. Specify either id or name but not both", + "Example": "`-n, --name [name]`" + }, + { + "Description": ": Absolute URL of the site where the content type is located", + "Example": "`-u, --webUrl `" + }, + { + "Description": "`-l, --listTitle [listTitle]`", + "Example": "" + }, + { + "Description": "", + "Example": ": Title of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`." + }, + { + "Description": ": ID of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`.", + "Example": "`--listId [listId]`" + }, + { + "Description": "`--listUrl [listUrl]`", + "Example": "" + }, + { + "Description": "", + "Example": ": Server- or site-relative URL of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`." + }, + { + "Description": ": The ID of the content type to retrieve. Specify either id or name but not both", + "Example": "`-i, --id [id]`" + }, + { + "Description": "`-n, --name [name]`", + "Example": "" + }, + { + "Description": "m365 spo contenttype get [options]", + "Example": ": The name of the content type to retrieve. Specify either id or name but not both" + }, + { + "Description": "import Global from '/docs/cmd/_global.mdx';", + "Example": "Retrieves information about the specified list or site content type" + }, + { + "Description": null, + "Example": "m365 spo contenttype get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/Shared Documents' --id 0x0100558D85B7216F6A489A499DB361E1AE2F" + } + ] + }, + { + "Command": "m365 spo storageentity list", + "Description": "Lists tenant properties stored on the specified SharePoint Online app catalog", + "Options": "`-u, --appCatalogUrl `: URL of the app catalog site", + "Examples": [ + { + "Description": "m365 spo storageentity list -u https://contoso.sharepoint.com/sites/appcatalog", + "Example": "List all tenant properties stored in the https://contoso.sharepoint.com/sites/appcatalog app catalog site" + } + ] + }, + { + "Command": "m365 spo site get", + "Description": "Gets information about the specific site collection", + "Options": "`-u, --url `: URL of the site collection to retrieve information for", + "Examples": [ + { + "Description": "m365 spo site get -u https://contoso.sharepoint.com/sites/project-x", + "Example": "Return information about the https://contoso.sharepoint.com/sites/project-x site collection." + } + ] + }, + { + "Command": "m365 spo web installedlanguage list", + "Description": "Lists all installed languages on site", + "Options": "`-u, --webUrl `: URL of the site for which to retrieve the list of installed languages", + "Examples": [ + { + "Description": "m365 spo web installedlanguage list --webUrl https://contoso.sharepoint.com", + "Example": "Return all installed languages from site https://contoso.sharepoint.com/" + } + ] + }, + { + "Command": "m365 spo field list", + "Description": "Retrieves columns for the specified list or site", + "Options": "`-u, --webUrl `: Absolute URL of the site where fields are located`-t, --listTitle [listTitle]`: Title of the list where fields are located. Specify `listTitle`, `listId` or `listUrl``-i --listId [listId]`: ID of the list where fields are located. Specify `listTitle`, `listId` or `listUrl``--listUrl [listUrl]`: Server- or web-relative URL of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`", + "Examples": [ + { + "Description": "`-u, --webUrl `: Absolute URL of the site where fields are located", + "Example": "Retrieves site columns for site https://contoso.sharepoint.com/sites/contoso-sales." + }, + { + "Description": ": Title of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`", + "Example": "`-t, --listTitle [listTitle]`" + }, + { + "Description": ": ID of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`", + "Example": "`-i --listId [listId]`" + }, + { + "Description": ": Server- or web-relative URL of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`", + "Example": "`--listUrl [listUrl]`" + }, + { + "Description": ": Absolute URL of the site where fields are located", + "Example": "`-u, --webUrl `" + }, + { + "Description": "`-t, --listTitle [listTitle]`", + "Example": "" + }, + { + "Description": "", + "Example": ": Title of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`" + }, + { + "Description": ": ID of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`", + "Example": "`-i --listId [listId]`" + }, + { + "Description": "`--listUrl [listUrl]`", + "Example": "" + }, + { + "Description": "m365 spo field list [options]", + "Example": ": Server- or web-relative URL of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`" + }, + { + "Description": "import Global from '/docs/cmd/_global.mdx';", + "Example": "Retrieves columns for the specified list or site" + }, + { + "Description": null, + "Example": "m365 spo field list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/sites/contoso-sales/lists/Events'" + } + ] + }, + { + "Command": "m365 spo list sitescript get", + "Description": "Extracts a site script from a SharePoint list", + "Options": "`-u, --webUrl `: URL of the site where the list to extract the site script from is located.`-l, --listId [listId]`: ID of the list to extract the site script from. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.`-t, --listTitle [listTitle]`: Title of the list to extract the site script from. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.`--listUrl [listUrl]`: Server- or site-relative URL of the list. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.", + "Examples": [ + { + "Description": "m365 spo list sitescript get --listTitle ContosoList --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Extract a site script from an existing SharePoint list with specified title located in the specified site." + }, + { + "Description": "m365 spo list sitescript get --listId cc27a922-8224-4296-90a5-ebbc54da2e85 --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Extract a site script from an existing SharePoint list with specified id located in the specified site." + }, + { + "Description": "m365 spo list sitescript get --listUrl 'sites/project-x/Documents' --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Extract a site script from an existing SharePoint list with specified server relative url located in the specified site." + }, + { + "Description": "m365 spo list sitescript get --listUrl 'Shared Documents' --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Extract a site script from an existing SharePoint list with specified site-relative URL located in the specified site." + } + ] + }, + { + "Command": "m365 spo tenant commandset get", + "Description": "Get a ListView Command Set that is installed tenant wide", + "Options": "`-t, --title [title]`: The title of the ListView Command Set. Specify either `title`, `id`, or `clientSideComponentId`.`-i, --id [id]`: The id of the ListView Command Set. Specify either `title`, `id`, or `clientSideComponentId`.`-c, --clientSideComponentId [clientSideComponentId]`: The Client Side Component Id (GUID) of the ListView Command Set. Specify either `title`, `id`, or `clientSideComponentId`.", + "Examples": [ + { + "Description": "m365 spo tenant commandset get --title \"Some customizer\"", + "Example": "Retrieves a ListView Command Set by title." + }, + { + "Description": "m365 spo tenant commandset get --id 3", + "Example": "Retrieves a ListView Command Set by id." + }, + { + "Description": "m365 spo tenant commandset get --clientSideComponentId 7096cded-b83d-4eab-96f0-df477ed7c0bc", + "Example": "Retrieves a ListView Command Set by clientSideComponentId." + } + ] + }, + { + "Command": "m365 spo site list", + "Description": "Lists modern sites of the given type", + "Options": "`-t, --type [type]`: convenience option for type of sites to list. Allowed values are `TeamSite,CommunicationSite`.`--webTemplate [webTemplate]`: type of sites to list. To be used with values like `GROUP#0` and `SITEPAGEPUBLISHING#0`. Specify either `type` or `webTemplate`, but not both. `--filter [filter]`: filter to apply when retrieving sites`--includeOneDriveSites`: use this switch to include OneDrive sites in the result when retrieving sites. Do not specify the `type` or `webTemplate` options when using this.", + "Examples": [ + { + "Description": "m365 spo site list", + "Example": "List all sites in the currently connected tenant" + }, + { + "Description": "m365 spo site list --type TeamSite", + "Example": "List all group connected team sites in the currently connected tenant" + }, + { + "Description": "m365 spo site list --type CommunicationSite", + "Example": "List all communication sites in the currently connected tenant" + }, + { + "Description": "m365 spo site list --type TeamSite --filter \"Url -like 'project'\"", + "Example": "List all group connected team sites that contain project in the URL" + }, + { + "Description": "m365 spo site list --includeOneDriveSites", + "Example": "List all sites in the currently connected tenant including OneDrive sites" + } + ] + }, + { + "Command": "m365 spo storageentity get", + "Description": "Get details for the specified tenant property", + "Options": "`-k, --key `: Name of the tenant property to retrieve", + "Examples": [ + { + "Description": "m365 spo storageentity get -k AnalyticsId", + "Example": "Show the value, description and comment of the AnalyticsId tenant property" + } + ] + }, + { + "Command": "m365 spo cdn policy list", + "Description": "Lists CDN policies settings for the current SharePoint Online tenant", + "Options": "`-t, --cdnType [cdnType]`: Type of CDN to manage. `Public,Private`. Default `Public`", + "Examples": [ + { + "Description": "m365 spo cdn policy list", + "Example": "Show the list of policies configured for the Public CDN" + }, + { + "Description": "m365 spo cdn policy list --cdnType Private", + "Example": "Show the list of policies configured for the Private CDN" + } + ] + }, + { + "Command": "m365 spo web get", + "Description": "Retrieve information about the specified site", + "Options": "`-u, --url `: URL of the site for which to retrieve the information`--withGroups`: Set if you want to return associated groups (associatedOwnerGroup, associatedMemberGroup and associatedVisitorGroup) along with other properties`--withPermissions`: Set if you want to return associated roles and permissions", + "Examples": [ + { + "Description": "m365 spo web get --url https://contoso.sharepoint.com/subsite", + "Example": "Retrieve information about a site" + }, + { + "Description": "m365 spo web get --url https://contoso.sharepoint.com/subsite --withGroups", + "Example": "Retrieve information about a site along with associated groups for the web" + }, + { + "Description": "m365 spo web get --url https://contoso.sharepoint.com/subsite --withPermissions", + "Example": "Retrieve information about a site along with the RoleAssignments for the web" + } + ] + }, + { + "Command": "m365 spo sitedesign list", + "Description": "Lists available site designs for creating modern sites", + "Options": null, + "Examples": [ + { + "Description": "m365 spo sitedesign list", + "Example": "List available site designs" + } + ] + }, + { + "Command": "m365 spo term list", + "Description": "Lists taxonomy terms from the given term set", + "Options": "`-u, --webUrl [webUrl]`: If specified, allows you to list terms from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.`--termGroupId [termGroupId]`: ID of the term group where the term set is located. Specify `termGroupId` or `termGroupName` but not both.`--termGroupName [termGroupName]`: Name of the term group where the term set is located. Specify `termGroupId` or `termGroupName` but not both.`--termSetId [termSetId]`: ID of the term set for which to retrieve terms. Specify `termSetId` or `termSetName` but not both.`--termSetName [termSetName]`: Name of the term set for which to retrieve terms. Specify `termSetId` or `termSetName` but not both.`--includeChildTerms`: If specified, child terms are loaded as well.", + "Examples": [ + { + "Description": "m365 spo term list --webUrl https://contoso.sharepoint.com/sites/project-x --termGroupName PnPTermSets --termSetName PnP-Organizations", + "Example": "List taxonomy terms from the specified sitecollection, the term group and term set with the given name" + }, + { + "Description": "m365 spo term list --termGroupName PnPTermSets --termSetName PnP-Organizations", + "Example": "List taxonomy terms from the term group and term set with the given name." + }, + { + "Description": "m365 spo term list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --termSetId 0e8f395e-ff58-4d45-9ff7-e331ab728bec", + "Example": "List taxonomy terms from the term group and term set with the given ID." + }, + { + "Description": "m365 spo term list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --termSetId 0e8f395e-ff58-4d45-9ff7-e331ab728bec --includeChildTerms", + "Example": "List taxonomy terms from the term group and term set with the given ID including child terms if any are found." + } + ] + }, + { + "Command": "m365 spo term group get", + "Description": "Gets information about the specified taxonomy term group", + "Options": "`-u, --webUrl [webUrl]`: If specified, allows you to get a term group from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.`-i, --id [id]`: ID of the term group to retrieve. Specify `name` or `id` but not both.`-n, --name [name]`: Name of the term group to retrieve. Specify `name` or `id` but not both.", + "Examples": [ + { + "Description": "m365 spo term group get --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb", + "Example": "Get information about a taxonomy term group using its ID." + }, + { + "Description": "m365 spo term group get --name PnPTermSets", + "Example": "Get information about a taxonomy term group using its name." + }, + { + "Description": "m365 spo term group get --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get information about a taxonomy term group from the specified sitecollection using its ID." + } + ] + }, + { + "Command": "m365 spo eventreceiver get", + "Description": "Retrieves specific event receiver for the specified web, site or list by event receiver name or id.", + "Options": "`-u, --webUrl `: The URL of the web for which to retrieve the event receivers.`--listTitle [listTitle]`: The title of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.`--listId [listId]`: The id of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.`--listUrl [listUrl]`: The url of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.`-n, --name [name]`: The name of the event receiver to retrieve. Specify either `name` or `id` but not both.`-i, --id [id]`: The id of the event receiver to retrieve. Specify either `name` or `id` but not both.`-s, --scope [scope]`: The scope of which to retrieve the event receivers. Can be either `site` or `web`. Defaults to `web`. Only applicable when not specifying any of the list properties.", + "Examples": [ + { + "Description": "m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --name 'PnP Test Receiver'", + "Example": "Retrieve event receivers in web https://contoso.sharepoint.com/sites/contoso-sales with name PnP Test Receiver." + }, + { + "Description": "m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --scope site --id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec", + "Example": "Retrieve event receivers in site https://contoso.sharepoint.com/sites/contoso-sales with id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec." + }, + { + "Description": "m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listTitle Events --name 'PnP Test Receiver'", + "Example": "Retrieve event receivers for list with title Events in web https://contoso.sharepoint.com/sites/contoso-sales with name PnP Test Receiver." + }, + { + "Description": "m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listId '202b8199-b9de-43fd-9737-7f213f51c991' --id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec", + "Example": "Retrieve event receivers for list with ID 202b8199-b9de-43fd-9737-7f213f51c991 in web https://contoso.sharepoint.com/sites/contoso-sales with id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec." + }, + { + "Description": "m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/sites/contoso-sales/lists/Events' --name 'PnP Test Receiver'", + "Example": "Retrieve event receivers for list with url /sites/contoso-sales/lists/Events in web https://contoso.sharepoint.com/sites/contoso-sales with name PnP Test Receiver." + } + ] + }, + { + "Command": "m365 spo tenant commandset list", + "Description": "Retrieves a list of ListView Command Sets that are installed tenant-wide", + "Options": null, + "Examples": [ + { + "Description": "m365 spo tenant commandset list", + "Example": "Retrieves a list of ListView Command Sets." + } + ] + }, + { + "Command": "m365 spo user get", + "Description": "Gets a site user within specific web", + "Options": "`-u, --webUrl `: URL of the web to get the user within`-i, --id [id]`: ID of the user to retrieve information for. Use either `email`, `id` or `loginName`, but not all.`--email [email]`: Email of the user to retrieve information for. Use either `email`, `id` or `loginName`, but not all.`--loginName [loginName]`: Login name of the user to retrieve information for. Use either `email`, `id` or `loginName`, but not all.", + "Examples": [ + { + "Description": "m365 spo user get --webUrl https://contoso.sharepoint.com/sites/project-x --email john.doe@mytenant.onmicrosoft.com", + "Example": "Get user by email for a web" + }, + { + "Description": "m365 spo user get --webUrl https://contoso.sharepoint.com/sites/project-x --id 6", + "Example": "Get user by ID for a web" + }, + { + "Description": "m365 spo user get --webUrl https://contoso.sharepoint.com/sites/project-x --loginName \"i:0#.f|membership|john.doe@mytenant.onmicrosoft.com\"", + "Example": "Get user by login name for a web" + }, + { + "Description": "m365 spo user get --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get the currently logged-in user" + } + ] + }, + { + "Command": "m365 spo customaction list", + "Description": "Lists user custom actions for site or site collection", + "Options": "`-u, --webUrl `: Url of the site or site collection to retrieve the custom action from`-s, --scope [scope]`: Scope of the custom action. Allowed values `Site`, `Web`, `All`. Default `All`", + "Examples": [ + { + "Description": "m365 spo customaction list --webUrl https://contoso.sharepoint.com/sites/test", + "Example": "Return details about all user custom actions located in site or site collection https://contoso.sharepoint.com/sites/test" + }, + { + "Description": "m365 spo customaction list --webUrl https://contoso.sharepoint.com/sites/test --scope Site", + "Example": "Return details about all user custom actions located in site collection https://contoso.sharepoint.com/sites/test" + }, + { + "Description": "m365 spo customaction list --webUrl https://contoso.sharepoint.com/sites/test --scope Web", + "Example": "Return details about all user custom actions located in site https://contoso.sharepoint.com/sites/test" + } + ] + }, + { + "Command": "m365 spo tenant settings list", + "Description": "Lists the global tenant settings", + "Options": null, + "Examples": [ + { + "Description": "m365 spo tenant settings list", + "Example": "Lists the settings of the tenant" + } + ] + }, + { + "Command": "m365 spo roledefinition get", + "Description": "Gets specified role definition from web", + "Options": "`-u, --webUrl `: URL of the site for which to retrieve the role definition.`-i, --id `: The Id of the role definition to retrieve.", + "Examples": [ + { + "Description": "m365 spo roledefinition get --webUrl https://contoso.sharepoint.com/sites/project-x --id 1", + "Example": "Retrieve the role definition for the given site" + } + ] + }, + { + "Command": "m365 spo field get", + "Description": "Retrieves information about the specified list- or site column", + "Options": "`-u, --webUrl `: Absolute URL of the site where the field is located`-l, --listTitle [listTitle]`: Title of the list where the field is located. Specify only one of listTitle, listId or listUrl`--listId [listId]`: ID of the list where the field is located. Specify only one of listTitle, listId or listUrl`--listUrl [listUrl]`: Server- or web-relative URL of the list where the field is located. Specify only one of listTitle, listId or listUrl`-i, --id [id]`: The ID of the field to retrieve. Specify id or title but not both`-t, --title [title]`: The display name (case-sensitive) of the field to remove. Specify id or title, or group but not both", + "Examples": [ + { + "Description": "`-u, --webUrl `: Absolute URL of the site where the field is located", + "Example": "Retrieves site column by id located in site https://contoso.sharepoint.com/sites/contoso-sales" + }, + { + "Description": ": Title of the list where the field is located. Specify only one of listTitle, listId or listUrl", + "Example": "`-l, --listTitle [listTitle]`" + }, + { + "Description": ": ID of the list where the field is located. Specify only one of listTitle, listId or listUrl", + "Example": "`--listId [listId]`" + }, + { + "Description": ": Server- or web-relative URL of the list where the field is located. Specify only one of listTitle, listId or listUrl", + "Example": "`--listUrl [listUrl]`" + }, + { + "Description": ": The ID of the field to retrieve. Specify id or title but not both", + "Example": "`-i, --id [id]`" + }, + { + "Description": ": The display name (case-sensitive) of the field to remove. Specify id or title, or group but not both", + "Example": "`-t, --title [title]`" + }, + { + "Description": ": Absolute URL of the site where the field is located", + "Example": "`-u, --webUrl `" + }, + { + "Description": "`-l, --listTitle [listTitle]`", + "Example": "" + }, + { + "Description": "", + "Example": ": Title of the list where the field is located. Specify only one of listTitle, listId or listUrl" + }, + { + "Description": ": ID of the list where the field is located. Specify only one of listTitle, listId or listUrl", + "Example": "`--listId [listId]`" + }, + { + "Description": "`--listUrl [listUrl]`", + "Example": "" + }, + { + "Description": "", + "Example": ": Server- or web-relative URL of the list where the field is located. Specify only one of listTitle, listId or listUrl" + }, + { + "Description": ": The ID of the field to retrieve. Specify id or title but not both", + "Example": "`-i, --id [id]`" + }, + { + "Description": "`-t, --title [title]`", + "Example": "" + }, + { + "Description": "m365 spo field get [options]", + "Example": ": The display name (case-sensitive) of the field to remove. Specify id or title, or group but not both" + }, + { + "Description": "import Global from '/docs/cmd/_global.mdx';", + "Example": "Retrieves information about the specified list- or site column" + }, + { + "Description": null, + "Example": "m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl \"Lists/Events\" --title \"Title\"" + } + ] + }, + { + "Command": "m365 spo list list", + "Description": "Gets all lists within the specified site", + "Options": "`-u, --webUrl `: URL of the site where the lists to retrieve are located.`-p, --properties [properties]`: Comma-separated list of properties to retrieve. Will retrieve all properties if not specified.`--filter [filter]`: OData filter to use to query the lists with.", + "Examples": [ + { + "Description": "m365 spo list list --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Return all lists located in in a specific site." + }, + { + "Description": "m365 spo list list --webUrl https://contoso.sharepoint.com/sites/project-x --properties \"BaseTemplate,ParentWebUrl\"", + "Example": "Return all lists located in in a specific site with specific properties." + }, + { + "Description": "m365 spo list list --webUrl https://contoso.sharepoint.com/sites/project-x --properties \"Id,Title,RootFolder/ServerRelativeUrl\"", + "Example": "Return all lists located in in a specific site with the Id, Title and ServerRelativeUrl properties." + }, + { + "Description": "m365 spo list list --webUrl https://contoso.sharepoint.com/sites/project-x --filter \"BaseTemplate eq 100\"", + "Example": "Return all lists located in in a specific site based on the given filter." + } + ] + }, + { + "Command": "m365 spo applicationcustomizer list", + "Description": "Get a list of application customizers that are added to a site.", + "Options": "`-u, --webUrl `: The url of the site.`-s, --scope [scope]`: Scope of the application customizers. Allowed values `Site`, `Web`, `All`. Defaults to `All`", + "Examples": [ + { + "Description": "m365 spo applicationcustomizer list --webUrl https://contoso.sharepoint.com/sites/sales", + "Example": "Retrieves a list of application customizers." + } + ] + }, + { + "Command": "m365 spo term group list", + "Description": "Lists taxonomy term groups", + "Options": "`-u, --webUrl [webUrl]`: If specified, allows you to list term groups from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.", + "Examples": [ + { + "Description": "m365 spo term group list", + "Example": "List taxonomy term groups." + }, + { + "Description": "m365 spo term group list --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "List taxonomy term groups from the specified sitecollection." + } + ] + }, + { + "Command": "m365 spo site apppermission get", + "Description": "Get a specific application permissions for the site", + "Options": "`-u, --siteUrl `: URL of the site collection where the permission to retrieve is located`-i, --id `: ID of the permission to retrieve", + "Examples": [ + { + "Description": "m365 spo site apppermission get --siteUrl https://contoso.sharepoint.com/sites/project-x --id aTowaS50fG1zLnNwLmV4dHw4OWVhNWM5NC03NzM2LTRlMjUtOTVhZC0zZmE5NWY2MmI2NmVAZGUzNDhiYzctMWFlYi00NDA2LThjYjMtOTdkYjAyMWNhZGI0", + "Example": "Return a specific application permissions for the https://contoso.sharepoint.com/sites/project-x site collection with permission id aTowaS50fG1zLnNwLmV4dHw4OWVhNWM5NC03NzM2LTRlMjUtOTVhZC0zZmE5NWY2MmI2NmVAZGUzNDhiYzctMWFlYi00NDA2LThjYjMtOTdkYjAyMWNhZGI0" + } + ] + }, + { + "Command": "m365 spo web clientsidewebpart list", + "Description": "Lists available client-side web parts", + "Options": "`-u, --webUrl `: URL of the site for which to retrieve the information", + "Examples": [ + { + "Description": "m365 spo web clientsidewebpart list --webUrl https://contoso.sharepoint.com", + "Example": "Lists all the available client-side web parts for the specified site" + } + ] + }, + { + "Command": "m365 spo user list", + "Description": "Lists all the users within specific web", + "Options": "`-u, --webUrl `: URL of the web to list the users from", + "Examples": [ + { + "Description": "m365 spo user list --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get list of users in a web" + } + ] + }, + { + "Command": "m365 spo group list", + "Description": "Lists all the groups within specific web", + "Options": "`-u, --webUrl `: Url of the web to list the group within`--associatedGroupsOnly`: Get only the associated visitor, member and owner groups of the site.", + "Examples": [ + { + "Description": "`-u, --webUrl `: Url of the web to list the group within", + "Example": "Lists all the groups within a specific web" + }, + { + "Description": ": Get only the associated visitor, member and owner groups of the site.", + "Example": "`--associatedGroupsOnly`" + }, + { + "Description": ": Url of the web to list the group within", + "Example": "`-u, --webUrl `" + }, + { + "Description": "`--associatedGroupsOnly`", + "Example": "" + }, + { + "Description": "m365 spo group list [options]", + "Example": ": Get only the associated visitor, member and owner groups of the site." + }, + { + "Description": "import Global from '/docs/cmd/_global.mdx';", + "Example": "Lists all the groups within specific web" + }, + { + "Description": null, + "Example": "m365 spo group list --webUrl \"https://contoso.sharepoint.com/sites/contoso\" --associatedGroupsOnly" + } + ] + }, + { + "Command": "m365 spo orgassetslibrary list", + "Description": "List all libraries that are assigned as asset library", + "Options": null, + "Examples": [ + { + "Description": "m365 spo orgassetslibrary list", + "Example": "List all libraries that are assigned as asset library" + } + ] + }, + { + "Command": "m365 spo sitedesign task list", + "Description": "Lists site designs scheduled for execution on the specified site", + "Options": "`-u, --webUrl `: The URL of the site for which to list site designs scheduled for execution", + "Examples": [ + { + "Description": "m365 spo sitedesign task list --webUrl https://contoso.sharepoint.com/sites/team-a", + "Example": "List site designs scheduled for execution on the specified site" + } + ] + }, + { + "Command": "m365 spo file sharinglink get", + "Description": "Gets details about a specific sharing link of a file", + "Options": "`-u, --webUrl `: The URL of the site where the file is located.`--fileUrl [fileUrl]`: The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.`--fileId [fileId]`: The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.`-i, --id `: The ID of the sharing link.", + "Examples": [ + { + "Description": "m365 spo file sharinglink get --webUrl 'https://contoso.sharepoint.com/sites/demo' --fileId daebb04b-a773-4baa-b1d1-3625418e3234 --id 1ba739c5-e693-4c16-9dfa-042e4ec62972", + "Example": "Gets a specific sharing link of a file by id." + }, + { + "Description": "m365 spo file sharinglink get --webUrl 'https://contoso.sharepoint.com/sites/demo' --fileUrl 'Shared Documents/document.docx' --id 1ba739c5-e693-4c16-9dfa-042e4ec62972", + "Example": "Gets a specific sharing link of a file by a specified site-relative URL." + }, + { + "Description": "m365 spo file sharinglink get --webUrl 'https://contoso.sharepoint.com/sites/demo' --fileUrl '/sites/demo/Shared Documents/document.docx' --id 1ba739c5-e693-4c16-9dfa-042e4ec62972", + "Example": "Gets a specific sharing link of a file by a specified server-relative URL." + } + ] + }, + { + "Command": "m365 spo contenttypehub get", + "Description": "Returns the URL of the SharePoint Content Type Hub of the Tenant", + "Options": null, + "Examples": [ + { + "Description": "m365 spo contenttypehub get [options]", + "Example": "Retrieve the Content Type Hub URL" + }, + { + "Description": "import Global from '/docs/cmd/_global.mdx';", + "Example": "Returns the URL of the SharePoint Content Type Hub of the Tenant" + }, + { + "Description": null, + "Example": "m365 spo contenttypehub get" + } + ] + }, + { + "Command": "m365 spo serviceprincipal permissionrequest list", + "Description": "Lists pending permission requests", + "Options": "m365 spo sp permissionrequest list", + "Examples": [ + { + "Description": null, + "Example": "The admin role that's required to list permissions depends on the API. To approve permissions to any of the third-party APIs registered in the tenant, the application administrator role is sufficient. To approve permissions for Microsoft Graph or any other Microsoft API, the Global Administrator role is required." + } + ] + }, + { + "Command": "m365 spo applicationcustomizer get", + "Description": "Get an application customizer that is added to a site.", + "Options": "`-u, --webUrl `: URL of the site.`-t, --title [title]`: The title of the Application Customizer. Specify either `title`, `id`, or `clientSideComponentId`.`-i, --id [id]`: The id of the Application Customizer. Specify either `title`, `id`, or `clientSideComponentId`.`-c, --clientSideComponentId [clientSideComponentId]`: The Client Side Component Id (GUID) of the application customizer. Specify either `title`, `id`, or `clientSideComponentId`.`-s, --scope [scope]`: Scope of the application customizer. Allowed values: `Site`, `Web`, `All`. Defaults to `All`.", + "Examples": [ + { + "Description": "m365 spo applicationcustomizer get --title \"Some customizer\" --webUrl https://contoso.sharepoint.com/sites/sales", + "Example": "Retrieves an application customizer by title." + }, + { + "Description": "m365 spo applicationcustomizer get --id 14125658-a9bc-4ddf-9c75-1b5767c9a337 --webUrl https://contoso.sharepoint.com/sites/sales", + "Example": "Retrieves an application customizer by id." + }, + { + "Description": "m365 spo applicationcustomizer get --clientSideComponentId 7096cded-b83d-4eab-96f0-df477ed7c0bc --webUrl https://contoso.sharepoint.com/sites/sales", + "Example": "Retrieves an application customizer by clientSideComponentId." + }, + { + "Description": "m365 spo applicationcustomizer get --title \"Some customizer\" --webUrl https://contoso.sharepoint.com/sites/sales --scope site", + "Example": "Retrieves an application customizer by title available at the site scope." + } + ] + }, + { + "Command": "m365 spo navigation node get", + "Description": "Gets information about a specific navigation node.", + "Options": "`-u, --webUrl `: Absolute URL of the site.`--id `: Id of the navigation node.", + "Examples": [ + { + "Description": "m365 spo navigation node get --webUrl https://contoso.sharepoint.com/sites/team-a --id 2209", + "Example": "Retrieve information for a specific navigation node." + } + ] + }, + { + "Command": "m365 spo hidedefaultthemes get", + "Description": "Gets the current value of the HideDefaultThemes setting", + "Options": null, + "Examples": [ + { + "Description": "m365 spo hidedefaultthemes get", + "Example": "Get the current value of the HideDefaultThemes setting" + } + ] + }, + { + "Command": "m365 spo serviceprincipal grant list", + "Description": "Lists permissions granted to the service principal", + "Options": "m365 spo sp grant list", + "Examples": [ + { + "Description": null, + "Example": "To use this command you must be a Global administrator." + } + ] + }, + { + "Command": "m365 spo file sharinglink list", + "Description": "Lists all the sharing links of a specific file", + "Options": "`-u, --webUrl `: The URL of the site where the file is located.`--fileUrl [fileUrl]`: The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.`--fileId [fileId]`: The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.`-s, --scope [scope]`: Filter the results to only sharing links of a given scope: `anonymous`, `users` or `organization`. By default all sharing links are listed.", + "Examples": [ + { + "Description": "m365 spo file sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --fileId daebb04b-a773-4baa-b1d1-3625418e3234", + "Example": "List sharing links of a file by id" + }, + { + "Description": "m365 spo file sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --fileUrl \"/sites/demo/shared documents/document.docx\"", + "Example": "List sharing links of a file by url" + }, + { + "Description": "m365 spo file sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --fileUrl \"/sites/demo/shared documents/document.docx\" --scope anonymous", + "Example": "List anonymous sharing links of a file by url" + } + ] + }, + { + "Command": "m365 spo hubsite data get", + "Description": "Get hub site data for the specified site", + "Options": "`-u, --webUrl `: URL of the site for which to retrieve hub site data.`--forceRefresh`: Set, to refresh the server cache with the latest updates.", + "Examples": [ + { + "Description": "m365 spo hubsite data get --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get information about the hub site data for a specific site with URL." + } + ] + }, + { + "Command": "m365 spo listitem attachment get", + "Description": "Gets an attachment from a list item", + "Options": "`-u, --webUrl `: URL of the site where the list item is located.`--listId [listId]`: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.`--listTitle [listTitle]`: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.`--listUrl [listUrl]`: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.`--listItemId `: The ID of the list item.`-n, --fileName `: Name of the file to get.", + "Examples": [ + { + "Description": "m365 spo listitem attachment get --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle \"Demo List\" --listItemId 147 --fileName \"File1.jpg\"", + "Example": "Get an attachment from a list item by using list title." + }, + { + "Description": "m365 spo listitem attachment get --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl \"/sites/project-x/Lists/DemoList\" --listItemId 147 --fileName \"File1.jpg\"", + "Example": "Get an attachment from a list item by using list URL." + } + ] + }, + { + "Command": "m365 spo hubsite list", + "Description": "Lists hub sites in the current tenant", + "Options": "`-i, --includeAssociatedSites`: Include the associated sites in the result (only in JSON output).", + "Examples": [ + { + "Description": "m365 spo hubsite list", + "Example": "List hub sites in the current tenant" + }, + { + "Description": "m365 spo hubsite list --includeAssociatedSites --output json", + "Example": "List hub sites, including their associated sites, in the current tenant. Associated site info is only shown in JSON output." + } + ] + }, + { + "Command": "m365 spo page column get", + "Description": "Get information about a specific column of a modern page", + "Options": "`-u, --webUrl `: URL of the site where the page to retrieve is located.`-n, --pageName `: Name of the page to get column information of.`-s, --section
`: ID of the section where the column is located.`-c, --column `: ID of the column for which to retrieve more information.", + "Examples": [ + { + "Description": "m365 spo page column get --webUrl https://contoso.sharepoint.com/sites/team-a --pageName home.aspx --section 1 --column 1", + "Example": "Get information about the first column in the first section of a modern page" + } + ] + }, + { + "Command": "m365 spo userprofile get", + "Description": "Get SharePoint user profile properties for the specified user", + "Options": "`-u, --userName `: Account name of the user", + "Examples": [ + { + "Description": "m365 spo userprofile get --userName 'john.doe@mytenant.onmicrosoft.com'", + "Example": "Get SharePoint user profile for the specified user" + } + ] + }, + { + "Command": "m365 spo page list", + "Description": "Lists all modern pages in the given site", + "Options": "`-u, --webUrl `: URL of the site from which to retrieve available pages.", + "Examples": [ + { + "Description": "m365 spo page list --webUrl https://contoso.sharepoint.com/sites/team-a", + "Example": "List all modern pages in the specific site" + } + ] + }, + { + "Command": "m365 spo tenant appcatalogurl get", + "Description": "Gets the URL of the tenant app catalog", + "Options": null, + "Examples": [ + { + "Description": "m365 spo tenant appcatalogurl get", + "Example": "Get the URL of the tenant app catalog" + } + ] + }, + { + "Command": "m365 spo sitedesign get", + "Description": "Gets information about the specified site design", + "Options": "`-i, --id [id]`: Site design ID. Specify either `id` or `title` but not both.`--title [title]`: Site design title. Specify either `id` or `title` but not both.", + "Examples": [ + { + "Description": "m365 spo sitedesign get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a", + "Example": "Get information about the site design with ID 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a" + }, + { + "Description": "m365 spo sitedesign get --title \"Contoso Site Design\"", + "Example": "Get information about the site design with title Contoso Site Design" + } + ] + }, + { + "Command": "m365 spo eventreceiver list", + "Description": "Retrieves event receivers for the specified web, site or list.", + "Options": "`-u, --webUrl `: The URL of the web for which to retrieve the event receivers.`--listTitle [listTitle]`: The title of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.`--listId [listId]`: The id of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.`--listUrl [listUrl]`: The url of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.`-s, --scope [scope]`: The scope of which to retrieve the Event Receivers. Can be either \"site\" or \"web\". Defaults to \"web\". Only applicable when not specifying any of the list properties.", + "Examples": [ + { + "Description": "`-u, --webUrl `", + "Example": "Retrieves event receivers in web https://contoso.sharepoint.com/sites/contoso-sales." + }, + { + "Description": "`--listTitle [listTitle]`", + "Example": ": The URL of the web for which to retrieve the event receivers." + }, + { + "Description": "`--listId [listId]`", + "Example": ": The title of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`." + }, + { + "Description": "`--listUrl [listUrl]`", + "Example": ": The id of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`." + }, + { + "Description": "`-s, --scope [scope]`", + "Example": ": The url of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`." + }, + { + "Description": "`-u, --webUrl `", + "Example": ": The scope of which to retrieve the Event Receivers. Can be either \"site\" or \"web\". Defaults to \"web\". Only applicable when not specifying any of the list properties." + }, + { + "Description": "", + "Example": ": The URL of the web for which to retrieve the event receivers." + }, + { + "Description": ": The title of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.", + "Example": "`--listTitle [listTitle]`" + }, + { + "Description": "`--listId [listId]`", + "Example": "" + }, + { + "Description": "", + "Example": ": The id of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`." + }, + { + "Description": ": The url of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.", + "Example": "`--listUrl [listUrl]`" + }, + { + "Description": "`-s, --scope [scope]`", + "Example": "" + }, + { + "Description": "m365 spo eventreceiver list [options]", + "Example": ": The scope of which to retrieve the Event Receivers. Can be either \"site\" or \"web\". Defaults to \"web\". Only applicable when not specifying any of the list properties." + }, + { + "Description": "import Global from '/docs/cmd/_global.mdx';", + "Example": "Retrieves event receivers for the specified web, site or list." + }, + { + "Description": null, + "Example": "m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/sites/contoso-sales/lists/Events'" + } + ] + }, + { + "Command": "m365 spo listitem list", + "Description": "Gets a list of items from the specified list", + "Options": "`-u, --webUrl `: URL of the site from which the item should be retrieved.`-l, --listId [listId]`: ID of the list. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.`-t, --listTitle [listTitle]`: Title of the list. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.`--listUrl [listUrl]`: Server- or site-relative URL of the list. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.`-q, --camlQuery [camlQuery]`: CAML query to use to query the list of items with.`--fields [fields]`: Comma-separated list of fields to retrieve. Will retrieve all fields if not specified and json output is requested. Specify `camlQuery` or `fields` but not both.`-l, --filter [filter]`: OData filter to use to query the list of items with. Specify `camlQuery` or `filter` but not both.`-s, --pageSize [pageSize]`: Number of list items to return. Specify `camlQuery` or `pageSize` but not both. The default value is 5000.`-n, --pageNumber [pageNumber]`: Page number to return if `pageSize` is specified (first page is indexed as value of 0).", + "Examples": [ + { + "Description": "m365 spo listitem list --listTitle \"Demo List\" --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get all items from a list named Demo List" + }, + { + "Description": "m365 spo listitem list --listId 935c13a0-cc53-4103-8b48-c1d0828eaa7f --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get all items from a list with ID 935c13a0-cc53-4103-8b48-c1d0828eaa7f" + }, + { + "Description": "m365 spo listitem list --listTitle \"Demo List\" --webUrl https://contoso.sharepoint.com/sites/project-x --fields \"ID,Title,Modified\"", + "Example": "Get all items from list named Demo List. For each item, retrieve the value of the ID, Title and Modified fields" + }, + { + "Description": "m365 spo listitem list --listTitle \"Demo List\" --webUrl https://contoso.sharepoint.com/sites/project-x --fields \"ID,Title,Modified,Company/Title\"", + "Example": "Get all items from list named Demo List. For each item, retrieve the value of the ID, Title, Modified fields, and the value of lookup field Company" + }, + { + "Description": "m365 spo listitem list --listTitle \"Demo List\" --webUrl https://contoso.sharepoint.com/sites/project-x --filter \"Title eq 'Demo list item'\"", + "Example": "From a list named Demo List get all items with title Demo list item using an OData filter" + }, + { + "Description": "m365 spo listitem list --listTitle \"Demo List\" --webUrl https://contoso.sharepoint.com/sites/project-x --pageSize 100 --pageNumber 0", + "Example": "From a list named Demo List get the first 100 items" + }, + { + "Description": "m365 spo listitem list --listTitle \"Demo List\" --webUrl https://contoso.sharepoint.com/sites/project-x --pageSize 10 --pageNumber 1", + "Example": "From a list named Demo List get the second batch of 10 items" + }, + { + "Description": "m365 spo listitem list --listUrl /sites/project-x/documents --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get all items from a list by server-relative URL" + }, + { + "Description": "m365 spo listitem list --listTitle \"Demo List\" --webUrl https://contoso.sharepoint.com/sites/project-x --camlQuery \"Demo list item5000\"", + "Example": "From a list named Demo List get all items with title Demo list item using a CAML query" + }, + { + "Description": "m365 spo listitem list --listTitle \"Demo List\" --webUrl https://contoso.sharepoint.com/sites/project-x --camlQuery \"5000\"", + "Example": "From a library named Demo Library with 5000+ files and folders, get all items recursively without running into a list view threshold exception, using a CAML query" + } + ] + }, + { + "Command": "m365 spo propertybag list", + "Description": "Gets property bag values", + "Options": "`-u, --webUrl `: The URL of the site from which the property bag value should be retrieved.`--folder [folder]`: Site-relative URL of the folder from which to retrieve property bag value. Case-sensitive.", + "Examples": [ + { + "Description": "m365 spo propertybag list --webUrl https://contoso.sharepoint.com/sites/test", + "Example": "Return property bag values located in the given site" + }, + { + "Description": "m365 spo propertybag list --webUrl https://contoso.sharepoint.com/sites/test --folder /", + "Example": "Return property bag values located in the given site root folder" + }, + { + "Description": "m365 spo propertybag list --webUrl https://contoso.sharepoint.com/sites/test --folder '/Shared Documents'", + "Example": "Return property bag values located in the given site document library" + }, + { + "Description": "m365 spo propertybag list --webUrl https://contoso.sharepoint.com/sites/test --folder '/Shared Documents/MyFolder'", + "Example": "Return property bag values located in folder in the given site document library" + }, + { + "Description": "m365 spo propertybag list --webUrl https://contoso.sharepoint.com/sites/test --folder /Lists/MyList", + "Example": "Return property bag values located in the given site list" + } + ] + }, + { + "Command": "m365 spo list view get", + "Description": "Gets information about specific list view", + "Options": "`-u, --webUrl `: URL of the site where the list is located`--listId [listId]`: ID of the list where the view is located. Specify only one of `listTitle`, `listId` or `listUrl``--listTitle [listTitle]`: Title of the list where the view is located. Specify only one of `listTitle`, `listId` or `listUrl``--listUrl [listUrl]`: Server- or web-relative URL of the list where the view is located. Specify only one of `listTitle`, `listId` or `listUrl``--id [id]`: ID of the view to get. Specify `title` or `id` but not both`--title [title]`: Title of the view to get. Specify `title` or `id` but not both", + "Examples": [ + { + "Description": "m365 spo list view get --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'My List' --title 'All Items'", + "Example": "Gets a list view by name from a list located in site https://contoso.sharepoint.com/sites/project-x" + }, + { + "Description": "m365 spo list view get --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'Lists/My List' --id 330f29c5-5c4c-465f-9f4b-7903020ae1ce", + "Example": "Gets a list view by ID from a list located in site https://contoso.sharepoint.com/sites/project-x" + }, + { + "Description": "m365 spo list view get --webUrl https://contoso.sharepoint.com/sites/project-x --listId 330f29c5-5c4c-465f-9f4b-7903020ae1c1 --title 'All Items'", + "Example": "Gets a list view by name from a list located in site https://contoso.sharepoint.com/sites/project-x. Retrieve the list by its ID" + } + ] + }, + { + "Command": "m365 spo list view list", + "Description": "Lists views configured on the specified list", + "Options": " `-u, --webUrl `: URL of the site where the list is located `-i, --listId [listId]`: ID of the list for which to list configured views. Specify either `listId`, `listTitle`, or `listUrl`. `-t, --listTitle [listTitle]`: Title of the list for which to list configured views. Specify either `listId`, `listTitle`, or `listUrl`. `--listUrl [listUrl]`: Server- or site-relative URL of the list. Specify either `listId` , `listTitle` or `listUrl`.", + "Examples": [ + { + "Description": "m365 spo list view list --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents", + "Example": "List all views for a list by title" + }, + { + "Description": "m365 spo list view list --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf", + "Example": "List all views for a list by ID" + }, + { + "Description": "m365 spo list view list --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl '/sites/project-x/lists/Events'", + "Example": "List all views for a list by URL" + } + ] + }, + { + "Command": "m365 spo page section list", + "Description": "List sections in the specific modern page", + "Options": "`-u, --webUrl `: URL of the site where the page to retrieve is located.`-n, --pageName `: Name of the page to list sections of.", + "Examples": [ + { + "Description": "m365 spo page section list --webUrl https://contoso.sharepoint.com/sites/team-a --pageName home.aspx", + "Example": "List sections of a modern page" + } + ] + }, + { + "Command": "m365 spo propertybag get", + "Description": "Gets the value of the specified property from the property bag", + "Options": "`-u, --webUrl `: The URL of the site from which the property bag value should be retrieved.`-k, --key `: Key of the property for which the value should be retrieved. Case-sensitive.`--folder [folder]`: Site-relative URL of the folder from which to retrieve property bag value. Case-sensitive.", + "Examples": [ + { + "Description": "m365 spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1", + "Example": "Returns the value of the property from the property bag located in the given site" + }, + { + "Description": "m365 spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1 --folder /", + "Example": "Returns the value of the property from the property bag located in root folder of the given site" + }, + { + "Description": "m365 spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1 --folder '/Shared Documents'", + "Example": "Returns the value of the property from the property bag located in document library of the given site" + }, + { + "Description": "m365 spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1 --folder '/Shared Documents/MyFolder'", + "Example": "Returns the value of the property from the property bag located in folder in a document library located in the given site" + }, + { + "Description": "m365 spo propertybag get --webUrl https://contoso.sharepoint.com/sites/test --key key1 --folder /Lists/MyList", + "Example": "Returns the value of the property from the property bag located in a list in the given site" + } + ] + }, + { + "Command": "m365 spo knowledgehub get", + "Description": "Gets the Knowledge Hub Site URL for your tenant", + "Options": null, + "Examples": [ + { + "Description": "m365 spo knowledgehub get", + "Example": "Gets the Knowledge Hub Site URL for your tenant." + } + ] + }, + { + "Command": "m365 spo list contenttype list", + "Description": "Lists content types configured on the list", + "Options": "`-u, --webUrl `: URL of the site where the list is located.`-l, --listId [listId]`: ID of the list. Specify either `listTitle`, `listId`, or `listUrl`.`-t, --listTitle [listTitle]`: Title of the list. Specify either `listTitle`, `listId`, or `listUrl`.`--listUrl [listUrl]`: Server- or site-relative URL of the list. Specify either `listTitle`, `listId`, or `listUrl`.", + "Examples": [ + { + "Description": "m365 spo list contenttype list --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf", + "Example": "List all content types configured on a specific list retrieved by id in a specific site." + }, + { + "Description": "m365 spo list contenttype list --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents", + "Example": "List all content types configured on a specific list retrieved by title in a specific site." + }, + { + "Description": "m365 spo list contenttype list --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'sites/project-x/Documents'", + "Example": "List all content types configured on a specific list retrieved by server relative URL in a specific site." + } + ] + }, + { + "Command": "m365 spo term get", + "Description": "Gets information about the specified taxonomy term", + "Options": "`-u, --webUrl [webUrl]`: If specified, allows you to get a term from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.`-i, --id [id]`: ID of the term to retrieve. Specify `name` or `id` but not both.`-n, --name [name]`: Name of the term to retrieve. Specify `name` or `id` but not both.`--termGroupId [termGroupId]`: ID of the term group to which the term set belongs. Specify `termGroupId` or `termGroupName` but not both.`--termGroupName [termGroupName]`: Name of the term group to which the term set belongs. Specify `termGroupId` or `termGroupName` but not both.`--termSetId [termSetId]`: ID of the term set to which the term belongs. Specify `termSetId` or `termSetName` but not both.`--termSetName [termSetName]`: Name of the term set to which the term belongs. Specify `termSetId` or `termSetName` but not both.", + "Examples": [ + { + "Description": "m365 spo term get --webUrl https://contoso.sharepoint.com/sites/project-x --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb", + "Example": "Get information about a taxonomy term using its ID from the specified sitecollection." + }, + { + "Description": "m365 spo term get --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb", + "Example": "Get information about a taxonomy term using its ID." + }, + { + "Description": "m365 spo term get --name IT --termGroupName People --termSetName Department", + "Example": "Get information about a taxonomy term using its name, retrieving the parent term group and term set using their names." + }, + { + "Description": "m365 spo term get --name IT --termGroupId 5c928151-c140-4d48-aab9-54da901c7fef --termSetId 8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f", + "Example": "Get information about a taxonomy term using its name, retrieving the parent term group and term set using their IDs." + } + ] + }, + { + "Command": "m365 spo list get", + "Description": "Gets information about the specific list", + "Options": "`-u, --webUrl `: URL of the site where the list to retrieve is located.`-i, --id [id]`: ID of the list to retrieve information for. Specify either `id`, `title`, or `url` but not multiple.`-t, --title [title]`: Title of the list to retrieve information for. Specify either `id`, `title`, or `url` but not multiple.`--url [url]`: Server- or site-relative URL of the list. Specify either `id`, `title`, or `url` but not multiple.`-p, --properties [properties]`: Comma-separated list of properties to retrieve from the list. Will retrieve all properties possible from default response, if not specified.`--withPermissions`: Set if you want to return associated roles and permissions of the list.", + "Examples": [ + { + "Description": "m365 spo list get --id 0cd891ef-afce-4e55-b836-fce03286cccf --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get information about a list with specified ID located in the specified site." + }, + { + "Description": "m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get information about a list with specified title located in the specified site." + }, + { + "Description": "m365 spo list get --url 'sites/project-x/Documents' --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get information about a list with specified server relative url located in the specified site." + }, + { + "Description": "m365 spo list get --url 'Shared Documents' --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Get information about a list with specified site-relative URL located in the specified site." + }, + { + "Description": "m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x --properties \"Title,Id,HasUniqueRoleAssignments,AllowContentTypes\"", + "Example": "Get information about a list returning the specified list properties." + }, + { + "Description": "m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x --properties \"Title,Id,RootFolder/ServerRelativeUrl\"", + "Example": "Get information about a list returning the list Id, Title and ServerRelativeUrl properties." + }, + { + "Description": "m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x --withPermissions", + "Example": "Get information about a list along with the roles and permissions." + } + ] + }, + { + "Command": "m365 spo web retentionlabel list", + "Description": "Get a list of retention labels that are available on a site.", + "Options": "`-u, --webUrl `: URL of the site.", + "Examples": [ + { + "Description": "m365 spo web retentionlabel list --webUrl 'https://contoso.sharepoint.com/sites/sales'", + "Example": "Get a list of retention labels for the Sales site" + } + ] + }, + { + "Command": "m365 spo commandset get", + "Description": "Get a ListView Command Set that is added to a site.", + "Options": "`-u, --webUrl `: Url of the site.`-t, --title [title]`: The title of the ListView Command Set. Specify either `title`, `id` or `clientSideComponentId`.`-i, --id [id]`: The id of the ListView Command Set. Specify either `title`, `id` or `clientSideComponentId`.`-c, --clientSideComponentId [clientSideComponentId]`: The id of the ListView Command Set. Specify either `title`, `id` or `clientSideComponentId`.`-s, --scope [scope]`: Scope of the ListView Command Set. Allowed values: `Site`, `Web`, `All`. Defaults to `All`.", + "Examples": [ + { + "Description": "m365 spo commandset get --title \"Some customizer\" --webUrl https://contoso.sharepoint.com/sites/sales", + "Example": "Retrieves a ListView Command Set by title." + }, + { + "Description": "m365 spo commandset get --id 14125658-a9bc-4ddf-9c75-1b5767c9a337 --webUrl https://contoso.sharepoint.com/sites/sales -scope Web", + "Example": "Retrieves a ListView Command Set by id with scope 'Web'." + }, + { + "Description": "m365 spo commandset get --clientSideComponentId c1cbd896-5140-428d-8b0c-4873be19f5ac --webUrl https://contoso.sharepoint.com/sites/sales --scope Site", + "Example": "Retrieves a ListView Command Set by clientSideComponentId with scope 'Site'." + } + ] + }, + { + "Command": "m365 spo term set list", + "Description": "Lists taxonomy term sets from the given term group", + "Options": "`-u, --webUrl [webUrl]`: If specified, allows you to list term sets from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.`--termGroupId [termGroupId]`: ID of the term group from which to retrieve term sets. Specify `termGroupName` or `termGroupId` but not both.`--termGroupName [termGroupName]`: Name of the term group from which to retrieve term sets. Specify `termGroupName` or `termGroupId` but not both.", + "Examples": [ + { + "Description": "m365 spo term set list --termGroupName PnPTermSets", + "Example": "List taxonomy term sets from the term group with the given name." + }, + { + "Description": "m365 spo term set list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb", + "Example": "List taxonomy term sets from the term group with the given ID." + }, + { + "Description": "m365 spo term set list --termGroupName PnPTermSets --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "List taxonomy term sets from the specified sitecollection, from the term group with the given name." + } + ] + }, + { + "Command": "m365 spo commandset list", + "Description": "Get a list of ListView Command Sets that are added to a site.", + "Options": "`-u, --webUrl `: The url of the site.`-s, --scope [scope]`: Scope of the ListView Command Sets. Allowed values `Site`, `Web`, `All`. Default to `All`", + "Examples": [ + { + "Description": "m365 spo commandset list --webUrl https://contoso.sharepoint.com/sites/sales", + "Example": "Retrieves a list of ListView Command Sets." + } + ] + }, + { + "Command": "m365 spo page control list", + "Description": "Lists controls on the specific modern page", + "Options": "`-n, --pageName `: Name of the page to list controls of.`-u, --webUrl `: URL of the site where the page to retrieve is located.", + "Examples": [ + { + "Description": "m365 spo page control list --webUrl https://contoso.sharepoint.com/sites/team-a --pageName home.aspx", + "Example": "List controls on the modern page" + } + ] + }, + { + "Command": "m365 spo listitem attachment list", + "Description": "Gets the attachments associated to a list item", + "Options": "`-u, --webUrl `: URL of the site from which the item should be retrieved`--listId [listId]`: ID of the list where the item should be retrieved. Specify either `listTitle`, `listId` or `listUrl``--listTitle [listTitle]`: Title of the list where the item should be retrieved. Specify either `listTitle`, `listId` or `listUrl``--listUrl [listUrl]`: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl``--listItemId `: ID of the list item", + "Examples": [ + { + "Description": "m365 spo listitem attachment list --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle \"Demo List\" --listItemId 147", + "Example": "Gets the attachments from list item with listItemId 147 in list with title Demo List in site https://contoso.sharepoint.com/sites/project-x" + }, + { + "Description": "m365 spo listitem attachment list --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --listItemId 147", + "Example": "Gets the attachments from list item with listItemId 147 in list with id 0cd891ef-afce-4e55-b836-fce03286cccf in site https://contoso.sharepoint.com/sites/project-x" + }, + { + "Description": "m365 spo listitem attachment list --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl /sites/project-x/Documents --listItemId 147", + "Example": "Gets the attachments from a specific list item in a specific list obtained by server-relative URL in a specific site" + } + ] + }, + { + "Command": "m365 spo file get", + "Description": "Gets information about the specified file", + "Options": "`-u, --webUrl `: The URL of the site where the file is located`--url [url]`: The server- or site-relative decoded URL of the file to retrieve. Specify either `url` or `id` but not both`-i, --id [id]`: The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both`--asString`: Set to retrieve the contents of the specified file as string`--asListItem`: Set to retrieve the underlying list item`--asFile`: Set to save the file to the path specified in the path option`-p, --path [path]`: The local path where to save the retrieved file. Must be specified when the `--asFile` option is used`--withPermissions`: Set if you want to return associated roles and permissions", + "Examples": [ + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --id 'b2307a39-e878-458b-bc90-03bc578531d6'", + "Example": "Get file properties for a file with id (UniqueId) parameter located in a site" + }, + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --id 'b2307a39-e878-458b-bc90-03bc578531d6' --asString", + "Example": "Get contents of the file with id (UniqueId) parameter located in a site" + }, + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --id 'b2307a39-e878-458b-bc90-03bc578531d6' --asListItem", + "Example": "Get list item properties for a file with id (UniqueId) parameter located in a site" + }, + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --id 'b2307a39-e878-458b-bc90-03bc578531d6' --asFile --path /Users/user/documents/SavedAsTest1.docx", + "Example": "Saves the file with id (UniqueId) parameter located in a site to a local file" + }, + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --url '/sites/project-x/documents/Test1.docx'", + "Example": "Return file properties for a file with server-relative url located in a site" + }, + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --url '/sites/project-x/documents/Test1.docx' --asString", + "Example": "Returns a file as string for a file with server-relative url located in a site" + }, + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --url '/sites/project-x/documents/Test1.docx' --asListItem", + "Example": "Returna the list item properties for a file with the server-relative url located in a site" + }, + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --url '/sites/project-x/documents/Test1.docx' --asFile --path /Users/user/documents/SavedAsTest1.docx", + "Example": "Saves a file with the server-relative url located in a site to a local file" + }, + { + "Description": "m365 spo file get --webUrl https://contoso.sharepoint.com/sites/project-x --id 'b2307a39-e878-458b-bc90-03bc578531d6' --withPermissions", + "Example": "Gets the file properties for a file with id (UniqueId) parameter located in a site with permissions" + } + ] + }, + { + "Command": "m365 spo list retentionlabel get", + "Description": "Gets the default retention label set on the specified list or library.", + "Options": "`-u, --webUrl `: URL of the site where the list to get the label from is located.`-l, --listId [listId]`: ID of the list to get the label from. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.`-t, --listTitle [listTitle]`: Title of the list to get the label from. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.`--listUrl [listUrl]`: Server- or site-relative URL of the list. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.", + "Examples": [ + { + "Description": "m365 spo list retentionlabel get --listTitle ContosoList --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Gets retention label set on the list with specified title located in the specified site." + }, + { + "Description": "m365 spo list retentionlabel get --listId cc27a922-8224-4296-90a5-ebbc54da2e85 --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Gets retention label set on the list with specified id located in the specified site." + }, + { + "Description": "m365 spo list retentionlabel get --listUrl 'sites/project-x/Documents' --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Gets retention label set on the list with specified server relative url located in the specified site." + }, + { + "Description": "m365 spo list retentionlabel get --listUrl 'Shared Documents' --webUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Gets retention label set on the list with specified site-relative URL located in the specified site." + } + ] + }, + { + "Command": "m365 spo folder list", + "Description": "Returns all folders under the specified parent folder", + "Options": "`-u, --webUrl `: The URL of the site where the folders to list are located.`-p, --parentFolderUrl `: The server- or site-relative decoded URL of the parent folder.`--fields [fields]`: Comma-separated list of fields to retrieve. Will retrieve all fields if not specified and json output is requested.`--filter [filter]`: OData filter to use to query the list of folders with.`-r, --recursive`: Set to retrieve nested folders.", + "Examples": [ + { + "Description": "m365 spo folder list --webUrl https://contoso.sharepoint.com/sites/project-x --parentFolderUrl '/Shared Documents'", + "Example": "Gets list of folders under a parent folder with site-relative URL" + }, + { + "Description": "m365 spo folder list --webUrl https://contoso.sharepoint.com/sites/project-x --parentFolderUrl '/sites/project-x/Shared Documents' --recursive", + "Example": "Gets recursive list of folders under a specific folder on a specific site" + }, + { + "Description": "m365 spo folder list --webUrl https://contoso.sharepoint.com/sites/project-x --parentFolderUrl '/Shared Documents' --fields ListItemAllFields/Id --filter \"startswith(Name,'Folder')\"", + "Example": "Return a filtered list of folders and only return the list item ID" + } + ] + }, + { + "Command": "m365 spo tenant recyclebinitem list", + "Description": "Returns all modern and classic site collections in the tenant scoped recycle bin", + "Options": null, + "Examples": [ + { + "Description": "m365 spo tenant recyclebinitem list", + "Example": "Returns all modern and classic site collections in the tenant scoped recycle bin" + } + ] + }, + { + "Command": "m365 spo sitedesign rights list", + "Description": "Gets a list of principals that have access to a site design", + "Options": "`-i, --siteDesignId `: The ID of the site design to get rights information from", + "Examples": [ + { + "Description": "m365 spo sitedesign rights list --siteDesignId 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a", + "Example": "Get information about rights granted for the site design with ID 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a" + } + ] + }, + { + "Command": "m365 spo sitedesign run list", + "Description": "Lists information about site designs applied to the specified site", + "Options": "`-u, --webUrl `: The URL of the site for which to list applied site designs`-i, --siteDesignId [siteDesignId]`: The ID of the site design for which to display information", + "Examples": [ + { + "Description": "m365 spo sitedesign run list --webUrl https://contoso.sharepoint.com/sites/team-a", + "Example": "List site designs applied to the specified site" + }, + { + "Description": "m365 spo sitedesign run list --webUrl https://contoso.sharepoint.com/sites/team-a --siteDesignId 6ec3ca5b-d04b-4381-b169-61378556d76e", + "Example": "List information about the specified site design applied to the specified site" + } + ] + }, + { + "Command": "m365 spo site recyclebinitem list", + "Description": "Lists items from recycle bin", + "Options": "`-u, --siteUrl `: URL of the site for which to retrieve the recycle bin items`--type [type]`: Type of items which should be retrieved (listItems, folders, files)`--secondary`: Use this switch to retrieve items from secondary recycle bin", + "Examples": [ + { + "Description": "m365 spo site recyclebinitem list --siteUrl https://contoso.sharepoint.com/site", + "Example": "Lists all files, items and folders from recycle bin for site https://contoso.sharepoint.com/site" + }, + { + "Description": "m365 spo site recyclebinitem list --siteUrl https://contoso.sharepoint.com/site --type files", + "Example": "Lists only files from recycle bin for site https://contoso.sharepoint.com/site" + } + ] + }, + { + "Command": "m365 spo page section get", + "Description": "Get information about the specified modern page section", + "Options": "`-u, --webUrl `: URL of the site where the page to retrieve is located.`-n, --pageName `: Name of the page to get section information of.`-s, --section `: ID of the section for which to retrieve information.", + "Examples": [ + { + "Description": "m365 spo page section get --webUrl https://contoso.sharepoint.com/sites/team-a --pageName home.aspx --section 1", + "Example": "Get information about the specified section of the modern page" + } + ] + }, + { + "Command": "m365 spo page column list", + "Description": "Lists columns in the specific section of a modern page", + "Options": "`-u, --webUrl `: URL of the site where the page to retrieve is located.`-n, --pageName `: Name of the page to list columns of.`-s, --section `: ID of the section for which to list columns.", + "Examples": [ + { + "Description": "m365 spo page column list --webUrl https://contoso.sharepoint.com/sites/team-a --pageName home.aspx --section 1", + "Example": "List columns in the first section of a modern page" + } + ] + }, + { + "Command": "m365 spo tenant applicationcustomizer list", + "Description": "Retrieves a list of application customizers that are installed tenant-wide", + "Options": null, + "Examples": [ + { + "Description": "m365 spo tenant applicationcustomizer list", + "Example": "Retrieves a list of application customizers." + } + ] + }, + { + "Command": "m365 spo site apppermission list", + "Description": "Lists application permissions for a site", + "Options": "`-u, --siteUrl `: URL of the site collection to retrieve information for`-i, --appId [appId]`: Id of the application to filter by`-n, --appDisplayName [appDisplayName]`: Display name of the application to filter by", + "Examples": [ + { + "Description": "m365 spo site apppermission list --siteUrl https://contoso.sharepoint.com/sites/project-x", + "Example": "Return list of application permissions for the https://contoso.sharepoint.com/sites/project-x site collection." + }, + { + "Description": "m365 spo site apppermission list --siteUrl https://contoso.sharepoint.com/sites/project-x --appDisplayName Foo", + "Example": "Return list of application permissions for the https://contoso.sharepoint.com/sites/project-x site collection and filter by an application called Foo" + } + ] + }, + { + "Command": "m365 spo hubsite get", + "Description": "Gets information about the specified hub site", + "Options": "`-i, --id [id]`: ID of the hub site. Specify either `id`, `title`, or `url` but not multiple.`-t, --title [title]`: Title of the hub site. Specify either `id`, `title`, or `url` but not multiple.`-u, --url [url]`: URL of the hub site. Specify either `id`, `title`, or `url` but not multiple.`--includeAssociatedSites`: Include the associated sites in the result (only in JSON output)", + "Examples": [ + { + "Description": "m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a", + "Example": "Get information about the hub site with specific ID." + }, + { + "Description": "m365 spo hubsite get --title 'My Hub Site'", + "Example": "Get information about the hub site with specific title." + }, + { + "Description": "m365 spo hubsite get --url 'https://contoso.sharepoint.com/sites/HubSite'", + "Example": "Get information about the hub site with specific URL." + }, + { + "Description": "m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a --includeAssociatedSites --output json", + "Example": "Get information about the hub site with specific ID, including its associated sites. Associated site info is only shown in JSON output." + } + ] + }, + { + "Command": "m365 spo file version get", + "Description": "Gets information about a specific version of a specified file", + "Options": "`-u, --webUrl `: The URL of the site where the file is located`--label