How to make POST/PATCH request to add Hyperlink/Picture field in List?

Vikharankar, Vishakha 20 Reputation points
2023-10-05T07:51:12.9966667+00:00

I am trying to make a POST Request via Microsoft Graph Explorer Version v1 as well as Beta, to a list that has field of type HyperLink/Picture. I added request body for that field as

{  
	"fields": {
		"fieldName": {
            "Description": "This is desc",
            "Url": "abc.com"
        }
	}
}

But, this is giving invalidRequest error, which looks like

{
    "error": {
        "code": "invalidRequest",
        "message": "Invalid request",
        "innerError": {
            "date": "2023-10-05T07:49:15",
            "request-id": "XXXXXXXX-96c4-4a63-abcd-XXXXXXXXXXX",
            "client-request-id": ""
        }
    }
}

I went through a existing similar query - https://learn.microsoft.com/en-us/answers/questions/648271/upload-image-to-sharepoint-list-using-graph-api which was posted in 2021, but there is no solution to it. What is the issue? How can I make this request using GraphAPI?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,370 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.
3,067 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 36,406 Reputation points Microsoft Vendor
    2023-10-05T08:48:21.3266667+00:00

    Hi @Vikharankar, Vishakha,

    Per my research, currently we are still unable to update Hyperlink column by graph api. As a workaround, I would recommend you to use rest api to update the column. Here is a similar issue with yours to reference

    https://sharepoint.stackexchange.com/questions/88540/how-do-i-update-a-hyperlink-field-using-the-rest-api


    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.


1 additional answer

Sort by: Most helpful
  1. Michael Weinhardt 0 Reputation points
    2024-11-21T05:57:03.1566667+00:00

    Currently, if this still isn't supported, that's lame.

    0 comments No comments

Your answer

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