The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
SharePoint does not automatically copy levels of a Managed Metadata hierarchy into separate stored columns; create a GUID-keyed mapping list and use Power Automate to populate the four columns whenever the taxonomy value changes.
1. Create the destination and mapping columns
In the target list or library, create these columns:
- Account Name — Single line of text
- Account # — Single line of text
- Region — Single line of text
- Country — Single line of text
Make them optional, because the flow—not the user—will populate them.
Create a separate SharePoint list named, for example, Account Metadata Mapping, with:
| Column | Type | Example |
|---|---|---|
| Title | Single line of text | Account display name |
| TermGuid | Single line of text | Selected account term’s GUID |
| AccountNumber | Single line of text | A-10025 |
| Region | Single line of text | EMEA |
| Country | Single line of text | France |
Add one mapping item for every selectable account term. This approach does not dynamically derive ancestors from the taxonomy tree: the corresponding account, region, and country values must be maintained in this mapping list.
Use the term GUID as the key rather than its display label. SharePoint terms have unique IDs and can have multiple labels, including translated labels and synonyms.^1^
2. Build the Power Automate flow
- In Power Automate, create an Automated cloud flow.
- Select the appropriate SharePoint trigger:
- List: When an item is created or modified
- Document library: When a file is created or modified (properties only)
- Set Site Address and List Name or Library Name.
- Add Get items:
- Site Address: the site containing Account Metadata Mapping
- List Name: Account Metadata Mapping
- Filter Query: match
TermGuidto the GUID selected in the Managed Metadata field. - Top Count:
1
- Add a condition that verifies that
Get itemsreturned one row. - In the Yes branch, add:
- Update item for a list, or
- Update file properties for a document library.
- Set:
- ID to the trigger item ID.
- Account Name to the mapping item’s
Title. - Account # to
AccountNumber. - Region to
Region. - Country to
Country.
The SharePoint connector documents both the change triggers and the Get items, Update item, and Update file properties operations.^2^
For Update item, also supply any columns that SharePoint marks as required. Otherwise, the action cannot complete.
3. Extract the selected term GUID
The exact Managed Metadata trigger payload can vary, so run the flow once with a test item and open:
Flow run history → Trigger → Outputs → Show raw outputs
Find the selected taxonomy field using its SharePoint internal name. If its raw value has this form:
Account Name|81be9856-9856-81be-5698-be815698be81
add a Compose action named SelectedTermGuid with:
last(
split(
string(triggerBody()?['ManagedMetadataInternalName']),
'|'
)
)
Replace ManagedMetadataInternalName with the field’s actual internal name. Then use this Get items filter:
TermGuid eq '@{outputs('SelectedTermGuid')}'
The Label|termguid representation is observed when Managed Metadata dynamic content is passed through Power Automate.^3^
If the raw output is an object or array instead of Label|GUID, do not apply that expression unchanged. Select the GUID property shown in the actual trigger output. The available documentation does not establish one universal property path for every list/library and taxonomy-field configuration.
This design assumes the source column allows one value. For a multi-value Managed Metadata column, define whether the four destination columns should use the first term, combine all matching values, or reject multiple selections before implementing the update.
4. Prevent the update from repeatedly retriggering the flow
Updating the four columns modifies the item and can start another run. For a robust solution:
- Enable versioning on the list or library.
- Use When an item or a file is modified rather than the created-or-modified trigger.
- Add Get changes for an item or a file (properties only).
- Pass the trigger’s Trigger Window Start Token and Trigger Window End Token.
- Continue only when the source Managed Metadata column changed.
This change-detection action requires versioning, and its window tokens are available specifically with When an item or a file is modified.^2^
If creation must also be handled, use one creation flow plus one modification flow, or add a trigger condition that stops runs after only the four derived fields were updated.
Optional: Store values on the terms themselves
Instead of maintaining a mapping list, custom properties can be stored against terms, and Microsoft Graph exposes a term’s id, labels, and key/value properties.^4^ A custom solution can retrieve the selected term through Graph and then update the SharePoint fields.
This is more complex because the documented Get term API requires delegated TermStore.Read.All or TermStore.ReadWrite.All; application permission is not supported.^5^ Also, the documented term resource exposes children but no parent relationship, so walking upward through the hierarchy is not a straightforward single API lookup. For most environments, the SharePoint mapping list is simpler to maintain.
Column formatting is not a substitute: it can change how Managed Metadata is displayed, but it does not write Account Name, Account #, Region, or Country into stored item properties.^6^
References
- Introduction to managed metadata
- Microsoft SharePoint Connector in Power Automate
- Updating a managed metadata column of a document set in Power Automate based on a managed metadata column value from a list item - Microsoft Q&A
- term resource type
- Get term
- Use column formatting to customize SharePoint