How to modify taxonomy metadata of a file on Sharepoint using Microsoft Graph API and C#

Andy Holvoet 0 Reputation points
2025-03-25T10:32:50.68+00:00

I want to update the value of a taxonomy field for a SharePoint document via the GraphAPI (in C#, but reproduceable via GraphExplorer). This doesn’t seem to work correctly, I’m noticing strange behavior.

These are the steps to reproduce:

  1. Create a new document, without metadata.
  2. Set metadata fields “Owner” (text) and “Source” (taxonomy field) via a PATCH request to https://graph.microsoft.com/v1.0/sites/<siteid>/lists/<listid>/items/9/fields
  • I’m using the known workaround to set the taxonomy field. I'm sure the ID of the field is correct, as I get a 400 “bad request” when I change it.
{
    "Owner": "Isabelle",
    "nea3702803f442dfa59cb0bd5d3e470d": "-1;#|2aad0d99-ed95-4c96-84b8-61f06084b9f0"
}
  • The taxonomy field is updated correctly, but not the owner.
  • If I only specify the “Owner” field, the “Owner” field is updated correctly.
  1. Once the taxonomy field is set, there is no means of updating the value anymore. Even not by resubmitting the exact same PATCH request which did set the value initially.
  2. Updating the “Owner” field works, but as soon as I add a value for the “Source”, both fields are not updated.
  3. Sometimes only passing the “Owner” field even removes the taxonomy field.
{   "Owner": "Andy"}

I understand setting taxonomy fields might be unsupported. What is the current way to request this feature from the Microsoft Graph Team? I find posts describing similar behavior with broken links.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,518 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Aashutosh Tiwari - MSFT 115 Reputation points Microsoft External Staff
    2025-04-01T11:10:03.0566667+00:00

    Hi Andy,

    Thank you for reaching out to Microsoft!

    It seems you are facing challenges with taxonomy fields but currently updating the fields/columns (of type Managed metadata / taxonomy terms) of a file in SharePoint is not possible using Graph API. Please refer to the Graph API GitHub form page for more information: https://github.com/microsoftgraph/microsoft-graph-docs/issues/4911.

    I would also suggest posting your query and feedback on the Graph Feedback Forum.

    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


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.