Upload image to sharepoint list using graph API

Patel, Hetal 1 Reputation point
2021-12-01T21:26:07.473+00:00

I am trying to upload an image to image type column into sharepoint list. Below is the request detail but that gives a bad request.

Does anyone know more about how to do it

POST - https://graph.microsoft.com/v1.0/sites/\<site-id>/lists/<list-id>/items

Request Body
{
"fields": {
"Title": "Group 1",
"Image": {
"Url" : "https://myimageurl",
"Description": "This is Image"
}
}
}

Also, tried this but this gives server error.

{
"fields": {
"Title": "Group 1",
"Image": "https://myimageurl",
}
}

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,401 Reputation points
    2021-12-02T03:03:51.547+00:00

    Hi dear @Patel, Hetal

    You can refer to the question I answered yesterday. The use of hyperlink fields to create or update SharePoint list items is currently not supported.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.