Get page custom webparts

Aimery Thomas 20 Reputation points
2023-03-20T09:57:45.33+00:00

Hello,

I'm using Microsft Graph API (from Graph Explorer) to get webparts of a page :

/sites/{sitesId}/pages/{sitePageId}/webparts

it works fine until I add a custom SPFx webpart to the page. In this case I get the following error :

{
    "error": {
        "code": "invalidRequest",
        "message": "One of the provided arguments is not acceptable.",
        "innerError": {
            "code": "badArgument",
            "date": "2023-03-20T09:50:07",
            "request-id": "2db50723-4a6f-44ab-b9a8-6838669297ee",
            "client-request-id": "5491da8e-fa10-39c1-c194-ed38e7d44531"
        }
    }
}

Am I missing something ?

Thank you for your help :)

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,540 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,592 questions
{count} votes

Accepted answer
  1. Gopinath Chennamadhavuni 2,431 Reputation points
    2023-03-24T12:02:39.3833333+00:00

    Hi @Aimery Thomas ,

    Great to know that it works now and thanks for sharing the update here.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    [Get page custom webparts]

    Issue Symptom:
    Graph API: /sites/{sitesId}/pages/{sitePageId}/webparts throwing the following error after a custom SPFx webpart to the page:

    "code": "One of the provided arguments is not acceptable",

    Current status:
    The issue has been resolved after trying it again a few hours later. The reasons could be either, service temporarily unavailable for maintenance / is overloaded / changes made on the page took time to reflect.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful