How to deprecate a term in sharepoint term store using Microsoft Graph?

Job Scheffers 1 Reputation point
2022-01-27T12:15:25.907+00:00

Has anybody succeeded in deprecating a term using Microsoft Graph? If I deprecate a term using the Sharepoint web site and then get that term using Microsoft Graph, there is nothing in the properties of the term that indicates that the term is deprecated. Adding a property ("deprecated", "true") is persisted, but does not make the term deprecated.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,682 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 31,606 Reputation points Microsoft Vendor
    2022-01-28T01:56:40.32+00:00

    Hi @Job Scheffers ,
    The properties is just a key-value pair updated in your term. It will update the content of the term but not if the term is deprecated. In Microsoft Graph, we are unable to deprecate the term. We can only delete a term.
    I will recommend you to try deprecate a term by following steps. Please make a reference.
    https://www.sharepointdiary.com/2017/08/sharepoint-online-how-to-deprecate-term-in-term-store-using-powershell.html

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    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.



  2. sadomovalex 3,626 Reputation points
    2022-02-07T15:29:45.49+00:00

    here in similar question (Deprecate term from term store using Microsoft Graph API) it was tried by the following code:

    PATCH sites/{site-id}/termStore/sets/{set-id}/terms/{term-id}
    {
        "properties": [
            {
                "deprecated": true
            }
        ]
    }
    

    However based on comments it returned error. You may tried that on your env too. If it won't work you will probably need to do that via CSOM how it was suggested in another reply.

    0 comments No comments