An API that connects multiple Microsoft services, enabling data access and automation across platforms
Hello Ravi Kataria,
Thank you for reaching out to Microsoft Support!
The error you're encountering indicates that the authors property of the web part is missing a required field, specifically the upn (User Principal Name) for the first author in the array. Here's how you can resolve this:
Understand the Error:
- The error message specifies that the
authors[0].upnproperty is required but is missing or invalid. This means the web part you're trying to upload has an incomplete or incorrectauthorsarray.
Inspect the Web Part Data:
- Review the JSON payload you're sending in the PATCH request. Specifically, check the
authorsarray for the web part with the typecbe7b0a9-3504-44dd-a3a3-0e5cacd07788. - Ensure that each author in the array has a valid
upn(User Principal Name). For example:
JSON format:
"authors": [ {
} ]"upn": "user@example.com"
Modify the Payload:
- If the
authorsarray is empty or missing, populate it with valid author data. If you don't have specific authors to assign, you can use a placeholder or default user with a validupn.
Validate the Web Part Configuration:
- Ensure that all required properties for the web part are included in the payload. Refer to the Microsoft Graph API documentation for site pages to confirm the required fields.
Retry the Request:
- After updating the payload, send the PATCH request again to update the page. Verify that the response indicates success.
Additional Tips:
- Use the Graph Explorer to test your API requests and validate the payload.
- Check the permissions of the app making the request. Ensure it has the necessary permissions to update site pages in SharePoint.
If you still encounter an issue, I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to look into this issue and assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.