How can I post multiple news with Microsoft Graph API?

Olivier 41 Reputation points
2021-06-09T09:29:52.107+00:00

I am using Microsoft Graph API beta to post news with the endpoint https://graph.microsoft.com/beta/sites/{siteId}/pages. It works fine, but when I want to create several news, I get an error message :

[page] Parsing JSON Light resource sets or entries in requests without entity set is not supported. Pass in the entity set as a parameter to ODataMessageReader.CreateODataResourceReader or ODataMessageReader.CreateODataResourceSetReader method.

Do I have to add something in my HTTP body request such as @odata.context ?

Thanks for our help.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,702 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-06-10T03:04:31.447+00:00

    Hi @Olivier ,

    Creating multiple pages through Graph API is not supported currently. We can only create a new sitePage once a time with Graph API.

    You could create a PR in the github: https://github.com/microsoftgraph/microsoft-graph-docs/pulls


    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.


0 additional answers

Sort by: Most helpful