MSGraph CreateTerm -Synonyms

Matjaz REBERC 21 Reputation points
2024-10-16T08:57:05.89+00:00

Hello!

Is it possible to set "Synonyms" when creating Term with MS Graph - C#?

User's image

Thank you, Matjaz

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

Accepted answer
  1. Hitesh Pachipulusu - MSFT 3,620 Reputation points Microsoft External Staff
    2024-10-16T11:08:14.85+00:00

    Hello Matjaz REBERC,

    Thank you for reaching out to Microsoft Support!

    Yes, you can set synonyms when creating a term using Microsoft Graph. When you create a term, you can include multiple labels for the term, which can act as synonyms. Each label can have a different name but refer to the same term.

    Here's an example of how you can create a term with synonyms using the Microsoft Graph API:

    POST https://graph.microsoft.com/v1.0/sites/{site-id}/termStore/sets/{set-id}/children
    Content-Type: application/json
    {
      "labels": [
        {
          "languageTag": "en-US",
          "name": "Car",
          "isDefault": true
        },
        {
          "languageTag": "en-US",
          "name": "Automobile",
          "isDefault": false
        },
        {
          "languageTag": "en-US",
          "name": "Vehicle",
          "isDefault": false
        }
      ]
    }
    

    In this example, "Car" is the default label, and "Automobile" and "Vehicle" are synonyms.

    image (37)

    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.