Issue with Site Page BETA API - Quick link webpart

Rohit Devmore 21 Reputation points
2021-09-24T11:03:27.483+00:00

Have documented this at two places.

https://github.com/microsoftgraph/microsoft-graph-docs/issues/14359

https://sharepoint.stackexchange.com/questions/297709/unable-to-create-quick-links-web-part-on-modern-page-json-issue

I am sending below payload with create page endpoint . While page gets created , i get attached error.

134989-image.png

{ "name": "LinPage1.aspx", "title": "EriDefault", "publishingState": { "level": "checkout", "versionId": "0.1" }, "webParts": [ { "type": "c70391ea-0b10-4ee9-b2b4-006d3fcad0cd", "data": { "title": "Quick links", "description": "Quick links", "dataVersion": "2.0", "properties": { "items": [ { "sourceItem": { "progId": "", "url": "https://www.google.com", "itemType": 2, "fileExtension": "" }, "thumbnailType": 3, "title": "Google", "id": 2 }, { "sourceItem": { "progId": "", "url": "https://www.youtube.com", "itemType": 2, "fileExtension": "" }, "thumbnailType": 3, "title": "Youtube", "id": 1 } ], "isMigrated": true, "layoutId": "CompactCard", "layoutComponentId": "706e33c8-af37-4e7b-9d22-6e5694d92a6f", "shouldShowThumbnail": true, "title": "QuickLinks 2", "hideWebPartWhenEmpty": "true" }, "dynamicDataPaths": {}, "dynamicDataValues": {}, "serverProcessedContent": {} } } ] }

This payload is copied from response of Add-PnPWebPart command (Through Fiddler)

When page gets created , it does have quick links webpart however JSON it has is diffrent than the payload submitted above. Items gets nested for some reason and hence comalins with ForEach.

Below is the Webpart Data (Got through MaintiananceMode) which is created from above payload, as you see Items chils is appearing twice, even though original payload has it once. . Any idea if its issue with payload or API itself? I could successfuly create other webpart type. Just quick links has issue

{ "id": "c70391ea-0b10-4ee9-b2b4-006d3fcad0cd", "instanceId": "aad89b1a-1dad-4abc-8006-2b8faceb8ecc", "title": "Quick links", "description": "Quick links", "dataVersion": "2.0", "properties": { "isMigrated": true, "layoutId": "CompactCard", "layoutComponentId": "706e33c8-af37-4e7b-9d22-6e5694d92a6f", "shouldShowThumbnail": true, "title": "QuickLinks 2", "hideWebPartWhenEmpty": "true", "items": { "items": [ { "thumbnailType": 3, "title": "Google", "id": 2, "sourceItem": { "progId": "", "url": "https://www.google.com", "itemType": 2, "fileExtension": "" } }, { "thumbnailType": 3, "title": "Youtube", "id": 1, "sourceItem": { "progId": "", "url": "https://www.youtube.com", "itemType": 2, "fileExtension": "" } } ] } }, "dynamicDataPaths": null, "dynamicDataValues": null, "serverProcessedContent": { "htmlStrings": {}, "searchablePlainTexts": {}, "imageSources": {}, "links": {} } }

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,521 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,655 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-09-28T09:04:27.947+00:00

    Hi @Rohit Devmore ,

    Per my test, I could reproduce this issue on my side. Creating site page with Quick links webpart did not work. We will check this issue.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.