-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Reporting an Issue
Using the Pages api through SharePoint REST API v2, this command:
Invoke-PnPSPRestMethod -Url "https://<tenant>.sharepoint.com/_api/v2.0/sites('<tenant>.sharepoint.com,00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000')/pages/00000000-0000-0000-0000-000000000000/oneDrive.publish" -Method "POST" -ContentType "application/json" -Content @{} -ErrorAction Stop(all guids replaced with empty guid)
returns:
The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
Expected behavior
Publish the Modern Page
Actual behavior
Error message as depicted above.
NOTE1: it does not matter if the 'Content' parameter is omitted
NOTE2: it does not matter if the Url suffix 'oneDrive.publish' is replaced with 'publish'
NOTE2: the exact same call passes without error through a direct Graph call using EasyGraph Module and Invoke-PnPGraphMethod:
Invoke-PnPGraphMethod -Method POST -Url "beta/sites/<tenant>.sharepoint.com,00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000/pages/00000000-0000-0000-0000-000000000000/publish" -ContentType "application/json" -ErrorAction StopWhat is the version of the Cmdlet module you are running?
1.12.0
Which operating system/environment are you running PnP PowerShell on?
- Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : please specify
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working