Managed Metadata Column, Term Label Returns Some ID Instead of Actual String Value

Copper Contributor

I have a flow which will get file properties from a library that contains a managed metadata column. But when I run the flow, the term label value returns some ID instead of the actual string value.

 

The actual Label value should be something like "Fire Protection" and not 109.

 

dotem_0-1672041279576.png

I can't find a way to get the Label string using any other way. 

Is this the actual behavior or it's a bug? I'm not sure. 

Is there any other way to get the Label value?

 

Thanks. 

 

 

4 Replies

Hi @dotem 

 

I tried to replicate your scenario but I was able to get the managed metadata column value correctly in the flow. 

 

My column name is 'MMD', and I used the step 'Get file properties' (SharePoint) and was able to get the output as below :

aneetz_0-1672224649538.png

 

Do you not get the same output when using the step 'Get file properties'? 

How is your term store values configured? 

 

Regards,

 

 

Hi @dotem ,

 

this issue depends on how exactly you are accessing the file properties from the document library.

This for example works without problems if i use the action "Get files (properties only)".
But i get the same (wrong) results as you, if i use an "Send an HTTP request to SharePoint" action like this

_api/web/lists/getbytitle('<ListName>')/items


If you use the "Send an HTTP request to SharePoint" action you should take a look at the following article for a workaround to that case:

"https://sympmarc.com/2017/06/19/retrieving-multiple-sharepoint-managed-metadata-columns-via-rest/" .
The idea is to expand the "TaxCatchAll" Field like this (MM is my metadata colum)

_api/web/lists/getbytitle(<ListName>)/items?$select=Title,MM,TaxCatchAll/ID,TaxCatchAll/Term&$expand=TaxCatchAll

Now you will still get the wrong value for die metadata column, but you will now get an additional "TaxCatchAll" property where you can lookup the correct label for the id

"MM": {
    "__metadata": {
      "type": "SP.Taxonomy.TaxonomyFieldValue"
    },
    "Label": "5",
    "TermGuid": "cd04183c-45ce-4e21-b53d-c36659f5cee9",
    "WssId": 5
  },
  "TaxCatchAll": {
    "results": [
      {
        "__metadata": {
          "id": "771205b8-8892-442b-a76a-a4e22a786883",
          "type": "SP.Data.TaxonomyHiddenListListItem"
        },
        "ID": 5,
        "Term": "Term2"
      }
    ]
  }



If it is not the case that you are using the "Send an HTTP request to SharePoint" action to get the file metadata...
Which PowerAutomate action exactly are you using to get the properties from SharePoint?


I'm having the same issue.  I'm using the "Get files (properties only)" action. 

 

Power Automate - Get files (properties only).png

 

This is what I see in the raw output.  

 

Power Automate - Managed Term Result.png

I haven't been able to figure out how to get the actual label name. 

@Murphybp2 

 

I have had a similar issue, when i am running Power Automate, Flow using the SharePoint, Get List Item, to return metadata value, labels.

Jeza518_0-1702755651326.png

the output returns the metadata ID, not the label that was requested.

Jeza518_1-1702755699512.png

This does not works on some lists and other are fine, they return the label.

Jeza518_5-1702756693383.png

 

After testing, lists that have been created using the 'From existing list' option,

Jeza518_2-1702755881563.png

create lists with Content Types, that are local to the list, (there parent is the Item)

Jeza518_3-1702755976224.png

 

Where as the lists that are working as expected, have been created manually with the Site Column and the Content Type being set up first, in the site, then added to a new list. This give you a parent Content Type in the site content type list

Jeza518_4-1702756173669.png

 

Note: Doing this manually or using PowerShell to the the list up both create list that does not have the metadata issues with Power Automate flows.

 

To resolve this I have rebuilt my problematic lists setting up the Content Type first manually (or with PowerShell) adding them to my new list and migrated the data.

 

Note: I create list like this ordinarily, but i notices this when you let the users lose with list creation, and they turn in to a 'Critical System' that needs some automation applied.

 

anyway, hope this helps.