Cli-microsoft365: Bug report: spo apppage add errors out

Created on 10 Dec 2020  路  7Comments  路  Source: pnp/cli-microsoft365

Description

"spo apppage add" errors out with the message: Cannot find resource for the request CreateFullPageApp.

My suspicion is that CreateFullPageApp is not provisioned on all tenants.

Running the request with the same webpart data but using the CreateAppPage API works as expected.

Steps to reproduce

m365 spo apppage add --title "TestAppPage" --webUrl "https://kloyberdev.sharepoint.com/sites/ClosingProcessTracking" --webPartData $webpartdata --debug

where $webpart is a json text with correct webpart data.

Expected result

Should create the app page.

Actual result

Errors out.

Environment

Latest version of CLI.

bug work in progress

Most helpful comment

The workaround, for those who need to create app pages, is to use the CreateAppPage API (I call it directly from Insomnia for my current needs) - so its not really a blocking issue.

But in terms of CLI - the functionality is missing for now.

Thanks for the quick response... awesome team.

All 7 comments

Thank you for reporting the issue @ksdaniel we are sorry for the trouble. Lets see if we can solve this for you.

Could you provide the error message that you receive after running the command?

If you run the command with the --debug flag, could you provide the output, omitting the bearer tokens shown in the response.

Could you also tell us what shell you are using? Bash, PowerShell, cmder?

Error message is: Cannot find resource for the request CreateFullPageApp.

Command runs in Windows Terminal / Powershell.

Full debug output below.

Executing command spo apppage add with options {"options":{"_":["spo","apppage","add"],"title":"TestAppPage","t":"TestAppPage","webUrl":"https://kloyberdev.sharepoint.com/sites/ClosingProcessTracking","u":"https://kloyberdev.sharepoint.com/sites/ClosingProcessTracking","webPartData":"{\"id\": \"e84a4f44-30d2-4962-b203-f8bf42114860\", \"instanceId\": \"15353e8b-cb55-4794-b871-4cd74abf78b4\", \"title\": \"Milestone Tracking\", \"description\": \"A tool used for tracking project milestones\", \"serverProcessedContent\": { \"htmlStrings\": {}, \"searchablePlainTexts\": {}, \"imageSources\": {}, \"links\": {} }, \"dataVersion\": \"1.0\", \"properties\": {\"description\": \"Milestone Tracking\"}}","d":"{\"id\": \"e84a4f44-30d2-4962-b203-f8bf42114860\", \"instanceId\": \"15353e8b-cb55-4794-b871-4cd74abf78b4\", \"title\": \"Milestone Tracking\", \"description\": \"A tool used for tracking project milestones\", \"serverProcessedContent\": { \"htmlStrings\": {}, \"searchablePlainTexts\": {}, \"imageSources\": {}, \"links\": {} }, \"dataVersion\": \"1.0\", \"properties\": {\"description\": \"Milestone Tracking\"}}","debug":true}}
Existing access token still valid. Returning...
Request:
{
"url": "https://kloyberdev.sharepoint.com/sites/ClosingProcessTracking/_api/sitepages/Pages/CreateFullPageApp",
"method": "post",
"data": {
"title": "TestAppPage",
"addToQuickLaunch": false,
"webPartDataAsJson": "{\"id\": \"e84a4f44-30d2-4962-b203-f8bf42114860\", \"instanceId\": \"15353e8b-cb55-4794-b871-4cd74abf78b4\", \"title\": \"Milestone Tracking\", \"description\": \"A tool used for tracking project milestones\", \"serverProcessedContent\": { \"htmlStrings\": {}, \"searchablePlainTexts\": {}, \"imageSources\": {}, \"links\": {} }, \"dataVersion\": \"1.0\", \"properties\": {\"description\": \"Milestone Tracking\"}}"
},
"headers": {
"common": {
"Accept": "application/json, text/plain, /"
},
"delete": {},
"get": {},
"head": {},
"post": {
"Content-Type": "application/x-www-form-urlencoded"
},
"put": {
"Content-Type": "application/x-www-form-urlencoded"
},
"patch": {
"Content-Type": "application/x-www-form-urlencoded"
},
"user-agent": "NONISV|SharePointPnP|CLIMicrosoft365/3.3.0",
"accept-encoding": "gzip, deflate",
"content-type": "application/json;odata=nometadata",
"accept": "application/json;odata=nometadata",
"authorization":
},
"responseType": "json",
"decompress": true
}
Request error
{
"status": 404,
"statusText": "Not Found",
"headers": {
"cache-control": "private, max-age=0",
"transfer-encoding": "chunked",
"content-type": "application/json;odata=nometadata;streaming=true;charset=utf-8",
"expires": "Wed, 25 Nov 2020 22:50:17 GMT",
"last-modified": "Thu, 10 Dec 2020 22:50:17 GMT",
"server": "Microsoft-IIS/10.0",
"x-sharepointhealthscore": "3",
"x-sp-serverstate": "ReadOnly=0",
"dataserviceversion": "3.0",
"spclientservicerequestduration": "36",
"x-aspnet-version": "4.0.30319",
"sprequestguid": "5e10969f-60b7-2000-9093-a6147aed9fdd",
"request-id": "5e10969f-60b7-2000-9093-a6147aed9fdd",
"ms-cv": "n5YQXrdgACCQk6YUeu2f3Q.0",
"strict-transport-security": "max-age=31536000",
"x-frame-options": "SAMEORIGIN",
"content-security-policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.stream.azure-test.net *.microsoftstream.com;",
"x-powered-by": "ASP.NET",
"microsoftsharepointteamservices": "16.0.0.20725",
"x-content-type-options": "nosniff",
"x-ms-invokeapp": "1; RequireReadOnly",
"p3p": "CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"",
"date": "Thu, 10 Dec 2020 22:50:17 GMT",
"connection": "close"
},
"data": {
"odata.error": {
"code": "-1, Microsoft.SharePoint.Client.ResourceNotFoundException",
"message": {
"lang": "en-US",
"value": "Cannot find resource for the request CreateFullPageApp."
}
}
}
}

Hey @ksdaniel, I can reproduce the error. Let me see if I can find out more about it.

It's seems like there was a change in the underlying API that we use for this. Let's see if we can fix it quickly. Sorry for the trouble.

The workaround, for those who need to create app pages, is to use the CreateAppPage API (I call it directly from Insomnia for my current needs) - so its not really a blocking issue.

But in terms of CLI - the functionality is missing for now.

Thanks for the quick response... awesome team.

We have a PR with a fix to the issue which we will get merged and release in a preview release in the coming days. I'll post an update here when it's available for testing. Thanks again for reporting the bug 馃憤

We have just released a preview version with the fix to this issue. You can install it by running npm i -g @pnp/cli-microsoft365@next. Once again, thank you for reporting the issue 馃憦

Was this page helpful?
0 / 5 - 0 ratings