How to update Sharepoint list item hyperlink column

Macháček Martin 171 Reputation points
2021-11-30T08:03:33.697+00:00

I'm trying to update hyperlink column with the following request

PATCH https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/fields

Content-Type application/json

Request body:

{
    "OriginalImageLink": {
        "url": "https://example.com/img1.jpg",
        "description": "Url link"
    }
}

But it returns invalid request error

{
    "error": {
        "code": "invalidRequest",
        "message": "Invalid request",
        "innerError": {
            "date": "2021-11-30T07:53:25",
            "request-id": "229c925b-db3a-4ce6-abee-78f4e626151c",
            "client-request-id": "43e37eac-75a8-40d3-3c96-b9cb3a0e0eba"
        }
    }
}

Does Graph API support updating of hyperlink column? How can I update hyperlink column using graph sdk for .net?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,013 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,981 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.
2,563 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 35,266 Reputation points
    2021-12-01T07:13:56.483+00:00

    Hi @Macháček Martin

    Currently, the update of sharepoint listitem with hyperlink field is not supported. There was a similar problem on github before, but it has not been resolved yet. I suggest you submit a user voice to add a support request for updating hyperlink column, and I'll vote for you.


    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 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Baron, Felix 0 Reputation points
    2024-02-06T13:46:18.6366667+00:00

    How oO How is this not possible. How can any QA approve this. I'm able to read list-items from hyperlinks easily:

    {
    	"Title": "aTitle",
    	"hyperlinkColumn":
    	  {
    		"Description": "url_description",
    		"Url": "https://www.google.de" 
    	  },
    }
    

    And is has to be possible to just write exactly the same fields back, creating a new list entry...

    0 comments No comments