I'm using REST to retrieve some information from a document library. There are some managed metadata fields attached to the items I'm returning. I've found that if the managed metadata column is a single pick then REST only returns the ID number not the actual label for the term. (Multipicks work as expected).
To work around that I'm following this blog which says to use the getitems endpoint, CAML query, and POST to retrieve list data with correct managed metadata fields. And it works! Ugly as the work around is it is so good so far.
The problem is that I need to retrieve both the Document ID and MyManaged columns.
If I don't include any in my CAML query I get all kinds of information including the document id, but not MyManaged.
If I include viewfields like so:
"<ViewFields>" + "<FieldRef Name='MyManaged' />" + "<FieldRef Name='Title' />" + "<FieldRef Name='OData__dlc_DocId' />" + "</ViewFields>"
I get MyManaged properly expanded with a readable label, but the Document ID is nowhere to be found. (And yes that is the correct name for the document id.)
Any idea how to get the columns returned by default AND include custom ones?
Or a different way to get properly expanded managed metadata labels?