Skip to content

Bug report: Unable to promote page to news page using spo page set and spo page add #4055

@MathijsVerbeeck

Description

@MathijsVerbeeck

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

  1. Look for a site page in your environment
  2. Make sure that this site page is currently not a news page
  3. 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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions