Description
Using the command spo page set, I've tried to promote a site page as a news page using the command spo page set. This didn't seem to work on my end. After consulting the code, I saw that the call being executed to change the page to a news page is a regular SharePoint REST API update command. I have noticed however, that updating the PromotedState field from a site page to change a page to a news page needs a systemupdate however, which is impossible using the REST API. I think that we should implement the use of the spo listitem set command here to make this work.
Same thing happens when using the command spo page add with --promoteAs NewsPage
Steps to reproduce
- Look for a site page in your environment
- Make sure that this site page is currently not a news page
- Execute the command
m365 spo page set --webUrl '{yourWebUrl}' --name 'yourPageName' --promoteAs NewsPage
Expected results
The page to become a news page
Actual results
Nothing changed to the page. PromotedState value didn't change
Diagnostics
No response
CLI for Microsoft 365 version
v6.0.0
nodejs version
v16.13.0
Operating system (environment)
Windows
Shell
PowerShell
Description
Using the command
spo page set, I've tried to promote a site page as a news page using the commandspo page set. This didn't seem to work on my end. After consulting the code, I saw that the call being executed to change the page to a news page is a regular SharePoint REST API update command. I have noticed however, that updating thePromotedStatefield from a site page to change a page to a news page needs asystemupdatehowever, which is impossible using the REST API. I think that we should implement the use of thespo listitem setcommand here to make this work.Same thing happens when using the command
spo page addwith--promoteAs NewsPageSteps to reproduce
m365 spo page set --webUrl '{yourWebUrl}' --name 'yourPageName' --promoteAs NewsPageExpected results
The page to become a news page
Actual results
Nothing changed to the page. PromotedState value didn't change
Diagnostics
No response
CLI for Microsoft 365 version
v6.0.0
nodejs version
v16.13.0
Operating system (environment)
Windows
Shell
PowerShell