Reputation: 48
I'm performing the following request to update the value of "ExampleColumn#" for a Sharepoint Online item:
PATCH https://graph.microsoft.com/v1.0/sites/{site_id}/lists/{list_id}/items/{item_id}
With the following request body:
{
"fields":{
"ExampleColumn#": 1
}
}
Returns a 400 bad request error, with the following message:
"message": "A metadata reference property was found in a JSON Light request payload. Metadata reference properties are only supported in responses"
As I believe Odata requires the "#" symbol to be escaped, I've tried using percent-encoding which I couldn't get to work.
Request Body:
{
"fields":{
"ExampleColumn%23": 1
}
}
Response:
"message": "Field 'ExampleColumn%23' is not recognized"
What should I be doing differently in my request body?
Upvotes: 0
Views: 867
Reputation: 1889
@Zak,
Please make sure the field in the request body is the correct internal name of that column. I am able to update a column value in my SPO list via the below request:
You can get the field internal name through its setting page:
Upvotes: 1