Skip to content

Export-PnPTermGroupToXml empty for groups in "site collection" term store #3017

@mfxits

Description

@mfxits

Discussed in #2988

Export-PnPTermGroupToXml produces an empty string when used on term groups in the "site local" term store.

This behavior came up on a customer's live tenant and could be reproduced on a current test tenant.
Term groups in the "global" term store are exported to XML as expected.

Using pnp/pwershell 1.12.0.
Please refer to the discussion cited below.

Originally posted by mfxits April 7, 2023
Hi,

I'm using PnP.Powershell 1.12.0 and want to export a term group from the "site collection term store" of the root site collection.

Let's say the group is named "ABC". It's the only group in the "site local" terms store.

Get-PnpTermGroup lists all groups from the global term store including the local "ABC".
For any global group piped to Export-PnPTermGroupToXml the result is as expected:

Get-PnpTermGroup -Identity "XYZ" | Export-PnPTermGroupToXml

<pnp:TermGroups xmlns:pnp="http://schemas.dev.office.com/PnP/2022/09/ProvisioningSchema">
  <pnp:TermGroup Name="XYZ" ID="8574c038-e187-435d-b2e5-e0520ffafea7" Description="" UpdateBehavior="Overwrite">
    <pnp:TermSets> ... </pnp:TermSets> 
  </pnp:TermGroup>
</pnp:TermGroups>

But when I do the same with "ABC", the result is empty. It doesn't matter if I use the ID or name as parameter for "Identity".

Get-PnpTermGroup -Identity "ABC" | Export-PnPTermGroupToXml

   

Both groups returned from Get-PnpTermGroup have the type "Microsoft.SharePoint.Client.Taxonomy.TermGroup" and I can't see any difference between them.

I also played with Get-PnPSiteCollectionTermStore, but that command just returns the same term group object.

I searched for the topic but found nothing. Can anyone help please?

  • Markus

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions