spo apppage add
Creates a single-part app page
Usage
m365 spo apppage add [options]
Options
-u, --webUrl <webUrl>
The URL of the site where the page should be created.
-t, --title <title>
The title of the page to be created.
-d, --webPartData <webPartData>
JSON string of the web part to put on the page.
--addToQuickLaunch
Set, to add the page to the quick launch.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
If you want to add the single-part app page to quick launch, use the addToQuickLaunch flag.
Examples
Create a single-part app page in the specified site, webpart data is stored in the $webPartData
variable
m365 spo apppage add --title "Contoso" --webUrl "https://contoso.sharepoint.com" --webPartData $webPartData --addToQuickLaunch
Response
- JSON
- Text
- CSV
- Markdown
{
"value": "SitePages/Contoso.aspx"
}
value: SitePages/Contoso.aspx
value
SitePages/Contoso.aspx
# spo apppage add --title "Contoso" --webUrl "https://contoso.sharepoint.com/sites/sales" --webPartData "{"id": "62ca
c389-787f-495d-beca-e11786162ef4", "instanceId": "9c6edb6e-199a-4a30-a3b6-73466a68187b", "title": "Full App Page Countdo
wn Timer", "description": "This web part is used to allow a site admin to count down/up to an important event.", "dataVe
rsion": "1.0", "properties": { "showButton": false, "countDate": "Mon May 13 2019 14:00:00 GMT+0100", "title": "My count
down", "description": "", "countDirection": "COUNT_DOWN", "dateDisplay": "DAY_HOUR_MINUTE_SECOND", "buttonText": ""}}"
Date: 10/2/2023
Property | Value
---------|-------
value | SitePages/Contoso.aspx