Forum Discussion

grant_jenkins's avatar
grant_jenkins
Iron Contributor
Jun 02, 2025

Retrieve Term Navigation Properties using REST API

I've set up a Term set in the global term store and enabled Navigation so I can add URLs for each of the Terms. Note that I'm not going to use the Term set navigation in my site - it's only there to try and retrieve it from my SPFx webpart.

Note that I can get all the terms under my Term set - just not the navigation properties. Below is what I'm trying to get the navigation properties:

https://TENANT.sharepoint.com/_api/v2.1/termStore/sets/TERMSETGUID/terms/TERMGUID/properties

But I get: "The property 'properties' is null or does not exist". Also, expand doesn't seem to work at all.

I'm not looking to use pnpjs or even graph if I can help it. Any ideas welcome.

7 Replies

  • _derma_'s avatar
    _derma_
    Copper Contributor

    I’m running into the same problem: Microsoft now recommends using Graph, but it doesn’t expose all the properties we need. It used to work via the PnP JS, but that call has since been deprecated.

  • Parisian's avatar
    Parisian
    Copper Contributor

    Yes I have tried Microsoft Graph including the beta version but it still doesn’t return the navigation-related settings like custom URLs or target audiences. Even though some custom properties can be retrieved, the navigation settings shown in the Term Store UI are not available through Graph either.

    These seem to be tied more to the publishing features in SharePoint than to the taxonomy APIs. If you really need to get those values, a possible workaround could be using a background process with higher permissions like PowerShell or an Azure Function.

    Let me know if you want help exploring that approach.

  • Have you tried accessing the customProperties or the localCustomProperties?
    GET /_api/v2.1/termStore/sets('{set-id}')/terms('{term-id}')/customProperties

    GET /_api/v2.1/termStore/sets('{set-id}')/terms('{term-id}')/localCustomProperties

    • grant_jenkins's avatar
      grant_jenkins
      Iron Contributor

      Hi Matthias_Glubrecht​. Thanks for your reply, but is says customProperties and localCustomProperties don't exist - the same as when I use /properties

      {"error":{"code":"itemNotFound","message":"The property 'customProperties' is null or does not exist"}}

       

      Did you try this yourself and is it working?

      • Matthias_Glubrecht's avatar
        Matthias_Glubrecht
        Icon for Microsoft rankMicrosoft

        No, unfortunately I didn't have the time to try it myself. Seems that I was a little bit too optimistic. Sorry for that!
        I once had the requirement to read all terms from a term set, which is in fact possible using CSOM or JSOM. I remembered that in the "@pnp/sp-dev-fx-controls-react" library they had the same requirement to display a tree of terms, and I copied their solution which mimics a JSOM call by posting the XML that JSOM would generate to the server and evaluates the returned data to extract the terms including all localCustomProperties like "_Sys_Nav_SimpleLinkUrl" and "_Sys_Nav_HoverText".
        Maybe that's the only way?

  • Parisian's avatar
    Parisian
    Copper Contributor

    I have faced a similar issue. The SharePoint REST API v2.1 often does not expose navigation properties like simpleLinkUrl or targetUrl because the "properties" field usually returns null unless custom properties are explicitly set. Navigation URLs configured in the term store might not be accessible through this endpoint. Also, $expand does not always work as expected. While you prefer not to use Graph or PnPjs, the Microsoft Graph API currently provides more complete access to taxonomy metadata including custom properties on terms. If REST API is not returning the data you need, using Graph might be the best option. Hope this helps.

    • grant_jenkins's avatar
      grant_jenkins
      Iron Contributor

      Parisian​ Thanks for your response. I have tried using Graph but gave up as couldn't find a way to get the properties including navigation, etc. Have you tried and been successful using Graph for this?

Resources