I am using @pnp/sp to get list item data from sharepoint and i am getting list items with managed metadata field and user field. i can get all but not the metadata label which is the one i mainly need. this is my code.

return sp.web.lists.getByTitle(masterListName).items.select("Division", "splistname","Id",  "Editors/Title", "Editors/Id", "Editors/EMail")
        .filter("Editors/Id eq " + currentUser.Id).get().then((userDivision) => {
            return userDivision;

but this is what i get in return .

enter image description here

so instead of the label which is supposed to be "Admin" in this case, i get the ID. i have tried the code that koltyakov has written in https://github.com/pnp/pnpjs/issues/139 but when i tried it, i got an error saying TaxonomyHiddenList does not exist. and i am also not sure how to filter using his syntax.

1 Answer 1


You can use the new RenderListDataAsStream endpoint to get the label values.

PnP JS supports this endpoint which can used. Please modify from below sample code:

    RenderOptions: RenderListDataOptions.ListData,
    ViewXml :  `<View>
                        <FieldRef Name="Division"/>
                        <FieldRef Name="splistname"/>
                        <FieldRef Name="Id"/>
                        <FieldRef Name="Editors"/>
                              <FieldRef Name="Editors" LookupId="TRUE" />
                              <Value Type="Lookup">${currentUser.Id}</Value>
}).then((userDivision) => {

Also, ensure that you are importing it correctly as:

import { sp, RenderListDataParameters } from "@pnp/sp";

Reference - Using the SharePoint RenderListDataAsStream API to fetch lookup and single managed metadata field values

Getting term label values with the SharePoint RenderListDataAsStream API endpoint

Working with list items in REST API

  • thank you! but i am not sure if i am implementing this right because param is returning undefined. "Cannot set property 'RenderOptions' of undefined" i have imported RenderListDataParameters correctly
    – Page F.P.T
    Commented Sep 19, 2018 at 6:54
  • my bad, please check edited code Commented Sep 19, 2018 at 7:20
  • yes thank thank you! i should read the docs more i apologize THANK YOU!
    – Page F.P.T
    Commented Sep 19, 2018 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.